public class GridStreamerConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DFLT_MAX_CONCURRENT_SESSIONS
By default maximum number of concurrent sessions is unlimited.
|
static int |
DFLT_MAX_FAILOVER_ATTEMPTS
Default value for maximum failover attempts.
|
| Constructor and Description |
|---|
GridStreamerConfiguration() |
GridStreamerConfiguration(GridStreamerConfiguration c) |
| Modifier and Type | Method and Description |
|---|---|
ExecutorService |
getExecutorService()
Gets streamer executor service.
|
int |
getMaximumConcurrentSessions()
Gets maximum number of concurrent events to be processed by streamer.
|
int |
getMaximumFailoverAttempts()
Gets maximum number of failover attempts to try when pipeline execution has failed.
|
String |
getName()
Gets streamer name.
|
GridStreamerEventRouter |
getRouter()
Gets streamer event router.
|
Collection<GridStreamerStage> |
getStages()
Gets collection of streamer stages.
|
Collection<GridStreamerWindow> |
getWindows()
Gets collection of streamer event windows.
|
boolean |
isAtLeastOnce()
Gets flag indicating whether streamer should track event execution sessions and failover event execution
if any failure detected or any node on which execution happened has left the grid before successful response
is received.
|
boolean |
isExecutorServiceShutdown()
Flag indicating whether streamer executor service should be shut down on GridGain stop.
|
void |
setAtLeastOnce(boolean atLeastOnce) |
void |
setExecutorService(ExecutorService execSvc)
Sets streamer executor service.
|
void |
setExecutorServiceShutdown(boolean execSvcShutdown)
Sets flag indicating whether executor service should be shut down on GridGain stop.
|
void |
setMaximumConcurrentSessions(int maxConcurrentSessions)
Sets maximum number of concurrent sessions.
|
void |
setMaximumFailoverAttempts(int maxFailoverAttempts)
Sets maximum number of failover attempts.
|
void |
setName(String name)
Sets the name of the streamer.
|
void |
setRouter(GridStreamerEventRouter router)
Sets router for streamer.
|
void |
setStages(Collection<GridStreamerStage> stages)
Sets stages.
|
void |
setWindows(Collection<GridStreamerWindow> win)
Sets collection of streamer windows.
|
String |
toString() |
public static final int DFLT_MAX_CONCURRENT_SESSIONS
public static final int DFLT_MAX_FAILOVER_ATTEMPTS
public GridStreamerConfiguration()
public GridStreamerConfiguration(GridStreamerConfiguration c)
c - Configuration to copy.@Nullable public String getName()
null then default streamer is returned.public void setName(String name)
name - Name.@Nullable public GridStreamerEventRouter getRouter()
null then events will be executed locally.public void setRouter(GridStreamerEventRouter router)
router - Router.public Collection<GridStreamerWindow> getWindows()
public void setWindows(Collection<GridStreamerWindow> win)
win - Window.public Collection<GridStreamerStage> getStages()
public void setStages(Collection<GridStreamerStage> stages)
stages - Stages.public boolean isAtLeastOnce()
Setting this flag to true will guarantee that all pipeline stages will be executed at least once for
each group of event submitted to streamer (or failure listener will be notified if failover cannot succeed).
However, it does not guarantee that each stage will be executed at most once.
True if event should be processed at least once,
or false if failures can be safely ignored.public void setAtLeastOnce(boolean atLeastOnce)
atLeastOnce - True to guarantee that event will be processed at least once.public int getMaximumFailoverAttempts()
isAtLeastOnce() is set to false.
If not set, default value is
public void setMaximumFailoverAttempts(int maxFailoverAttempts)
maxFailoverAttempts - Maximum number of failover attempts.getMaximumFailoverAttempts()public int getMaximumConcurrentSessions()
isAtLeastOnce() is set to true. If not positive, number of sessions
will not be limited by any value.public void setMaximumConcurrentSessions(int maxConcurrentSessions)
maxConcurrentSessions - Maximum number of concurrent sessions.getMaximumConcurrentSessions()public ExecutorService getExecutorService()
If not specified, thread pool executor with max pool size equal to number of cores will be created.
public void setExecutorService(ExecutorService execSvc)
execSvc - Executor service to use.getExecutorService()public boolean isExecutorServiceShutdown()
true, executor service will be shut down regardless of whether executor was specified externally
or it was created by GridGain.True if executor service should be shut down on GridGain stop.public void setExecutorServiceShutdown(boolean execSvcShutdown)
execSvcShutdown - True if executor service should be shut down on GridGain stop.isExecutorServiceShutdown()Copyright © 2014. All rights reserved.