@Locked, @Throttled, @Futureable?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

@Locked, @Throttled, @Futureable?

Romain Manni-Bucau
Hi guys,

wrote these last weeks few CDI extensions/interceptors, wonder if some of
them could be interesting for DS.

I pushed them on github: https://github.com/rmannibucau/mylang/

- @Locked: just an interceptor delegating to a reentrant lock (see
https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/LockedTest.java
)
- @Throttled: same idea but for a semaphore (see
https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/ThrottledTest.java
)
- @Futureable: kid of @Asynchronous for EJB but based on
CompletableStage/Future (see
https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/future/FutureableTest.java).
This one would need some work to get the pool to use but the backbone is
there.

Most of them use java 8 but none really need to require java 8 and can be
migrated to match java 7 (or even 6) if needed.

wdyt?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>
Reply | Threaded
Open this post in threaded view
|

Re: @Locked, @Throttled, @Futureable?

Gerhard Petracek-2
i haven't looked at the implementation-details, however, basically +1 for
adding versions which are compatible with the target-version configured for
the compiler-plugin.

regards,
gerhard



2016-03-11 15:04 GMT+01:00 Romain Manni-Bucau <[hidden email]>:

> Hi guys,
>
> wrote these last weeks few CDI extensions/interceptors, wonder if some of
> them could be interesting for DS.
>
> I pushed them on github: https://github.com/rmannibucau/mylang/
>
> - @Locked: just an interceptor delegating to a reentrant lock (see
>
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/LockedTest.java
> )
> - @Throttled: same idea but for a semaphore (see
>
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/ThrottledTest.java
> )
> - @Futureable: kid of @Asynchronous for EJB but based on
> CompletableStage/Future (see
>
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/future/FutureableTest.java
> ).
> This one would need some work to get the pool to use but the backbone is
> there.
>
> Most of them use java 8 but none really need to require java 8 and can be
> migrated to match java 7 (or even 6) if needed.
>
> wdyt?
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
Reply | Threaded
Open this post in threaded view
|

Re: @Locked, @Throttled, @Futureable?

Thomas Andraschko-2
basically +1 for it, too
would be great if it would work with java6/7

2016-03-11 15:21 GMT+01:00 Gerhard Petracek <[hidden email]>:

> i haven't looked at the implementation-details, however, basically +1 for
> adding versions which are compatible with the target-version configured for
> the compiler-plugin.
>
> regards,
> gerhard
>
>
>
> 2016-03-11 15:04 GMT+01:00 Romain Manni-Bucau <[hidden email]>:
>
> > Hi guys,
> >
> > wrote these last weeks few CDI extensions/interceptors, wonder if some of
> > them could be interesting for DS.
> >
> > I pushed them on github: https://github.com/rmannibucau/mylang/
> >
> > - @Locked: just an interceptor delegating to a reentrant lock (see
> >
> >
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/LockedTest.java
> > )
> > - @Throttled: same idea but for a semaphore (see
> >
> >
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/ThrottledTest.java
> > )
> > - @Futureable: kid of @Asynchronous for EJB but based on
> > CompletableStage/Future (see
> >
> >
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/future/FutureableTest.java
> > ).
> > This one would need some work to get the pool to use but the backbone is
> > there.
> >
> > Most of them use java 8 but none really need to require java 8 and can be
> > migrated to match java 7 (or even 6) if needed.
> >
> > wdyt?
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: @Locked, @Throttled, @Futureable?

Mark Struberg
Administrator
+1

LieGrue,
strub


> Am 11.03.2016 um 16:02 schrieb Thomas Andraschko <[hidden email]>:
>
> basically +1 for it, too
> would be great if it would work with java6/7
>
> 2016-03-11 15:21 GMT+01:00 Gerhard Petracek <[hidden email]>:
>
>> i haven't looked at the implementation-details, however, basically +1 for
>> adding versions which are compatible with the target-version configured for
>> the compiler-plugin.
>>
>> regards,
>> gerhard
>>
>>
>>
>> 2016-03-11 15:04 GMT+01:00 Romain Manni-Bucau <[hidden email]>:
>>
>>> Hi guys,
>>>
>>> wrote these last weeks few CDI extensions/interceptors, wonder if some of
>>> them could be interesting for DS.
>>>
>>> I pushed them on github: https://github.com/rmannibucau/mylang/
>>>
>>> - @Locked: just an interceptor delegating to a reentrant lock (see
>>>
>>>
>> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/LockedTest.java
>>> )
>>> - @Throttled: same idea but for a semaphore (see
>>>
>>>
>> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/ThrottledTest.java
>>> )
>>> - @Futureable: kid of @Asynchronous for EJB but based on
>>> CompletableStage/Future (see
>>>
>>>
>> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/future/FutureableTest.java
>>> ).
>>> This one would need some work to get the pool to use but the backbone is
>>> there.
>>>
>>> Most of them use java 8 but none really need to require java 8 and can be
>>> migrated to match java 7 (or even 6) if needed.
>>>
>>> wdyt?
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> <http://rmannibucau.wordpress.com> | Github <
>>> https://github.com/rmannibucau> |
>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>> <http://www.tomitribe.com>
>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: @Locked, @Throttled, @Futureable?

Romain Manni-Bucau
created https://issues.apache.org/jira/browse/DELTASPIKE-1094 and
https://issues.apache.org/jira/browse/DELTASPIKE-1093 will try to push
it today. Feel free to change anything after.

Romain Manni-Bucau
@rmannibucau |  Blog | Github | LinkedIn | Tomitriber


2016-03-12 15:46 GMT+01:00 Mark Struberg <[hidden email]>:

> +1
>
> LieGrue,
> strub
>
>
>> Am 11.03.2016 um 16:02 schrieb Thomas Andraschko <[hidden email]>:
>>
>> basically +1 for it, too
>> would be great if it would work with java6/7
>>
>> 2016-03-11 15:21 GMT+01:00 Gerhard Petracek <[hidden email]>:
>>
>>> i haven't looked at the implementation-details, however, basically +1 for
>>> adding versions which are compatible with the target-version configured for
>>> the compiler-plugin.
>>>
>>> regards,
>>> gerhard
>>>
>>>
>>>
>>> 2016-03-11 15:04 GMT+01:00 Romain Manni-Bucau <[hidden email]>:
>>>
>>>> Hi guys,
>>>>
>>>> wrote these last weeks few CDI extensions/interceptors, wonder if some of
>>>> them could be interesting for DS.
>>>>
>>>> I pushed them on github: https://github.com/rmannibucau/mylang/
>>>>
>>>> - @Locked: just an interceptor delegating to a reentrant lock (see
>>>>
>>>>
>>> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/LockedTest.java
>>>> )
>>>> - @Throttled: same idea but for a semaphore (see
>>>>
>>>>
>>> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/ThrottledTest.java
>>>> )
>>>> - @Futureable: kid of @Asynchronous for EJB but based on
>>>> CompletableStage/Future (see
>>>>
>>>>
>>> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/future/FutureableTest.java
>>>> ).
>>>> This one would need some work to get the pool to use but the backbone is
>>>> there.
>>>>
>>>> Most of them use java 8 but none really need to require java 8 and can be
>>>> migrated to match java 7 (or even 6) if needed.
>>>>
>>>> wdyt?
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>> <http://rmannibucau.wordpress.com> | Github <
>>>> https://github.com/rmannibucau> |
>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>>> <http://www.tomitribe.com>
>>>>
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: @Locked, @Throttled, @Futureable?

Gerhard Petracek-2
thx romain!

regards,
gerhard



2016-03-17 12:03 GMT+01:00 Romain Manni-Bucau <[hidden email]>:

> created https://issues.apache.org/jira/browse/DELTASPIKE-1094 and
> https://issues.apache.org/jira/browse/DELTASPIKE-1093 will try to push
> it today. Feel free to change anything after.
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Github | LinkedIn | Tomitriber
>
>
> 2016-03-12 15:46 GMT+01:00 Mark Struberg <[hidden email]>:
> > +1
> >
> > LieGrue,
> > strub
> >
> >
> >> Am 11.03.2016 um 16:02 schrieb Thomas Andraschko <
> [hidden email]>:
> >>
> >> basically +1 for it, too
> >> would be great if it would work with java6/7
> >>
> >> 2016-03-11 15:21 GMT+01:00 Gerhard Petracek <[hidden email]>:
> >>
> >>> i haven't looked at the implementation-details, however, basically +1
> for
> >>> adding versions which are compatible with the target-version
> configured for
> >>> the compiler-plugin.
> >>>
> >>> regards,
> >>> gerhard
> >>>
> >>>
> >>>
> >>> 2016-03-11 15:04 GMT+01:00 Romain Manni-Bucau <[hidden email]>:
> >>>
> >>>> Hi guys,
> >>>>
> >>>> wrote these last weeks few CDI extensions/interceptors, wonder if
> some of
> >>>> them could be interesting for DS.
> >>>>
> >>>> I pushed them on github: https://github.com/rmannibucau/mylang/
> >>>>
> >>>> - @Locked: just an interceptor delegating to a reentrant lock (see
> >>>>
> >>>>
> >>>
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/LockedTest.java
> >>>> )
> >>>> - @Throttled: same idea but for a semaphore (see
> >>>>
> >>>>
> >>>
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/lock/ThrottledTest.java
> >>>> )
> >>>> - @Futureable: kid of @Asynchronous for EJB but based on
> >>>> CompletableStage/Future (see
> >>>>
> >>>>
> >>>
> https://github.com/rmannibucau/mylang/blob/master/src/test/java/com/github/rmannibucau/mylang/future/FutureableTest.java
> >>>> ).
> >>>> This one would need some work to get the pool to use but the backbone
> is
> >>>> there.
> >>>>
> >>>> Most of them use java 8 but none really need to require java 8 and
> can be
> >>>> migrated to match java 7 (or even 6) if needed.
> >>>>
> >>>> wdyt?
> >>>>
> >>>> Romain Manni-Bucau
> >>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> >>>> <http://rmannibucau.wordpress.com> | Github <
> >>>> https://github.com/rmannibucau> |
> >>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> >>>> <http://www.tomitribe.com>
> >>>>
> >>>
> >
>