Package ome.services.throttling
Class SerialThrottlingStrategy
- java.lang.Object
-
- ome.services.throttling.AbstractThrottlingStrategy
-
- ome.services.throttling.SerialThrottlingStrategy
-
- All Implemented Interfaces:
java.util.EventListener,BlitzExecutor,ThrottlingStrategy,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class SerialThrottlingStrategy extends AbstractThrottlingStrategy
Throttling implementation which only allows a single invocation to be run at any given time.
-
-
Field Summary
-
Fields inherited from class ome.services.throttling.AbstractThrottlingStrategy
ctx, log
-
-
Constructor Summary
Constructors Constructor Description SerialThrottlingStrategy(ome.system.OmeroContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcallInvokerOnRawArgs(ome.api.ServiceInterface service, IceMethodInvoker invoker, java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)Uses the givenIceMethodInvokerto make the method call.voidcallInvokerWithMappedArgs(ome.api.ServiceInterface service, IceMethodInvoker invoker, IceMapper mapper, java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)Passes the given arguments toIceMethodInvokerwith the assumption that all conversion from omero.* to ome.* has taken place.voidrunnableCall(Ice.Current __current, Task runnable)<R> voidsafeRunnableCall(Ice.Current __current, java.lang.Object __cb, boolean isVoid, java.util.concurrent.Callable<R> callable)-
Methods inherited from class ome.services.throttling.AbstractThrottlingStrategy
onApplicationEvent, setApplicationContext
-
-
-
-
Method Detail
-
callInvokerOnRawArgs
public void callInvokerOnRawArgs(ome.api.ServiceInterface service, IceMethodInvoker invoker, java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)Description copied from interface:BlitzExecutorUses the givenIceMethodInvokerto make the method call. All arguments are passed directly into the invoker, and the return value from the invoker is passed to the user.
-
callInvokerWithMappedArgs
public void callInvokerWithMappedArgs(ome.api.ServiceInterface service, IceMethodInvoker invoker, IceMapper mapper, java.lang.Object __cb, Ice.Current __current, java.lang.Object... args)Description copied from interface:BlitzExecutorPasses the given arguments toIceMethodInvokerwith the assumption that all conversion from omero.* to ome.* has taken place. Similarly, theIceMapperinstance will be used to map the return value from ome.* to omero.*.
-
runnableCall
public void runnableCall(Ice.Current __current, Task runnable)
-
safeRunnableCall
public <R> void safeRunnableCall(Ice.Current __current, java.lang.Object __cb, boolean isVoid, java.util.concurrent.Callable<R> callable)
-
-