public class StreamerConfiguration 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 |
---|
StreamerConfiguration() |
StreamerConfiguration(StreamerConfiguration c) |
Modifier and Type | Method and Description |
---|---|
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.
|
StreamerEventRouter |
getRouter()
Gets streamer event router.
|
Collection<StreamerStage> |
getStages()
Gets collection of streamer stages.
|
int |
getThreadPoolSize()
Gets streamer pool size.
|
Collection<StreamerWindow> |
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.
|
void |
setAtLeastOnce(boolean atLeastOnce) |
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(StreamerEventRouter router)
Sets router for streamer.
|
void |
setStages(Collection<StreamerStage> stages)
Sets stages.
|
void |
setThreadPoolSize(int poolSize)
Sets streamer pool size.
|
void |
setWindows(Collection<StreamerWindow> 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 StreamerConfiguration()
public StreamerConfiguration(StreamerConfiguration c)
c
- Configuration to copy.@Nullable public String getName()
null
then default streamer is returned.public void setName(String name)
name
- Name.@Nullable public StreamerEventRouter getRouter()
null
then events will be executed locally.public void setRouter(StreamerEventRouter router)
router
- Router.public Collection<StreamerWindow> getWindows()
public void setWindows(Collection<StreamerWindow> win)
win
- Window.public Collection<StreamerStage> getStages()
public void setStages(Collection<StreamerStage> 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 int getThreadPoolSize()
If not specified, thread pool executor with max pool size equal to number of cores will be created.
public void setThreadPoolSize(int poolSize)
poolSize
- Pool size.getThreadPoolSize()
Follow @ApacheIgnite
Apache Ignite Fabric : ver. 1.0.0-RC1 Release Date : February 16 2015