Package com.avanza.astrix.gs
Class SpaceTaskDispatcher
- java.lang.Object
-
- com.avanza.astrix.gs.SpaceTaskDispatcher
-
public final class SpaceTaskDispatcher extends Object
- Author:
- Elias Lindholm (elilin)
-
-
Constructor Summary
Constructors Constructor Description SpaceTaskDispatcher(org.openspaces.core.GigaSpace gigaSpace, com.avanza.astrix.config.DynamicConfig config)Deprecated.SpaceTaskDispatcher(org.openspaces.core.GigaSpace gigaSpace, com.avanza.astrix.config.DynamicConfig config, com.avanza.astrix.beans.async.ContextPropagation contextPropagation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroys theSpaceTaskDispatcherby shutting down the underlyingExecutorService.com.j_spaces.core.IJSpacegetSpace()StringgetSpaceName()<T extends Serializable,R>
rx.Observable<R>observe(org.openspaces.core.executor.DistributedTask<T,R> distributedTask)Creates a lazy Observable that will execute a given DistributedTask asynchronously once subscribed to.<T extends Serializable>
rx.Observable<T>observe(org.openspaces.core.executor.Task<T> task, Object routingKey)Creates a lazy Observable that will execute a given Task asynchronously once subscribed to.intpartitionCount()
-
-
-
Constructor Detail
-
SpaceTaskDispatcher
@Deprecated public SpaceTaskDispatcher(org.openspaces.core.GigaSpace gigaSpace, com.avanza.astrix.config.DynamicConfig config)
Deprecated.
-
SpaceTaskDispatcher
public SpaceTaskDispatcher(org.openspaces.core.GigaSpace gigaSpace, com.avanza.astrix.config.DynamicConfig config, com.avanza.astrix.beans.async.ContextPropagation contextPropagation)
-
-
Method Detail
-
getSpace
public com.j_spaces.core.IJSpace getSpace()
-
partitionCount
public int partitionCount()
-
observe
public <T extends Serializable> rx.Observable<T> observe(org.openspaces.core.executor.Task<T> task, Object routingKey)
Creates a lazy Observable that will execute a given Task asynchronously once subscribed to.- Parameters:
task-routingKey-- Returns:
-
observe
public <T extends Serializable,R> rx.Observable<R> observe(org.openspaces.core.executor.DistributedTask<T,R> distributedTask)
Creates a lazy Observable that will execute a given DistributedTask asynchronously once subscribed to.- Parameters:
distributedTask-- Returns:
-
destroy
public void destroy()
Destroys theSpaceTaskDispatcherby shutting down the underlyingExecutorService.
-
getSpaceName
public String getSpaceName()
-
-