public class EventSessionConfig extends Object implements com.gigaspaces.config.IConfiguration, com.gigaspaces.internal.utils.Textualizable
EventSession
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
EventSessionConfig.ComType
Deprecated.
Since 9.7
|
Modifier and Type | Field and Description |
---|---|
static EventSessionConfig.ComType |
DEFAULT_COM_TYPE
Deprecated.
Since 9.7
|
static int |
DEFAULT_DURABLE_BATCH_PENDING_THRESHOLD |
static int |
DEFAULT_DURABLE_BATCH_SIZE |
static long |
DEFAULT_DURABLE_BATCH_TIME |
static long |
DEFAULT_RENEW_DURATION
Deprecated.
Since 9.7 - Custom auto-renew id deprecated.
|
static long |
DEFAULT_RENEW_EXPIRATION
Deprecated.
Since 9.7 - Custom auto-renew id deprecated.
|
static long |
DEFAULT_RENEW_RTT
Deprecated.
Since 9.7 - Custom auto-renew id deprecated.
|
static boolean |
USE_OLD_GUARANTEED_NOTIFICATIONS |
static boolean |
USE_OLD_LEASE_RENEWAL_MANAGER |
static String |
USE_OLD_LEASE_RENEWAL_MANAGER_PROPERTY |
Constructor and Description |
---|
EventSessionConfig()
creates EventSessionConfig for farther configuration.
|
EventSessionConfig(Properties props)
Deprecated.
since 9.0 use setters instead
|
EventSessionConfig(String schemaName)
Deprecated.
since 9.0 use setters instead
|
Modifier and Type | Method and Description |
---|---|
int |
getBatchPendingThreshold()
return batchPendingThreshold - number of notifications held at server before sending them
|
int |
getBatchSize() |
long |
getBatchTime() |
EventSessionConfig.ComType |
getComType()
Deprecated.
Since 9.7
|
LeaseListener |
getLeaseListener() |
long |
getRenewDuration() |
long |
getRenewExpiration() |
long |
getRenewRTT() |
boolean |
isAutoRenew() |
boolean |
isBatching()
Checks if using batch notifications.
|
boolean |
isDurableNotifications() |
boolean |
isFifo()
Checks if the order that is in use with this config is fifo.
|
boolean |
isGuaranteedNotifications() |
Boolean |
isReplicateNotifyTemplate()
Should this template be replicated.
|
Boolean |
isTriggerNotifyTemplate()
Should notify template be triggered on replication event.
|
EventSessionConfig |
setAutoRenew(boolean renew,
LeaseListener listener)
enable the auto renew of the notify.
|
void |
setAutoRenew(boolean renew,
LeaseListener listener,
long renewExpiration,
long renewDuration,
long renewRTT)
Deprecated.
Since 9.7 - Customizing auto renew is deprecated, use the simple setAutoRenew(boolean,
LeaseListener) instead.
|
void |
setBatch(int size,
long time)
set the notifications to come in batches of size.
|
void |
setBatch(int size,
long time,
int pendingThreshold)
set the notifications to come in batches of size.
|
EventSessionConfig |
setComType(EventSessionConfig.ComType comType)
Deprecated.
Since 9.7
|
EventSessionConfig |
setDurableNotifications(boolean durable)
Sets whether to generate notifications that won't be lost during failover and disconnection
|
EventSessionConfig |
setFifo(boolean fifo)
Set fifo order for the notifications.
|
void |
setGuaranteedNotifications(boolean guaranteedNotifications)
Deprecated.
Since 9.0 use
setDurableNotifications(boolean) instead. |
EventSessionConfig |
setReplicateNotifyTemplate(boolean replicateNotifyTemplate) |
EventSessionConfig |
setTriggerNotifyTemplate(boolean triggerNotifyTemplate) |
String |
toString() |
void |
toText(com.gigaspaces.internal.utils.Textualizer textualizer) |
void |
validate()
Checks configuration validity
|
public static final String USE_OLD_LEASE_RENEWAL_MANAGER_PROPERTY
public static final boolean USE_OLD_GUARANTEED_NOTIFICATIONS
public static final boolean USE_OLD_LEASE_RENEWAL_MANAGER
@Deprecated public static final EventSessionConfig.ComType DEFAULT_COM_TYPE
@Deprecated public static final long DEFAULT_RENEW_EXPIRATION
public static final long DEFAULT_RENEW_DURATION
public static final long DEFAULT_RENEW_RTT
public static final int DEFAULT_DURABLE_BATCH_SIZE
public static final int DEFAULT_DURABLE_BATCH_PENDING_THRESHOLD
public static final long DEFAULT_DURABLE_BATCH_TIME
public EventSessionConfig()
@Deprecated public EventSessionConfig(Properties props)
props
- - holds the keys and values.@Deprecated public EventSessionConfig(String schemaName) throws IOException
schemaName
- - the file name.IOException
- - thrown when fail to read from file.@Deprecated public EventSessionConfig.ComType getComType()
@Deprecated public EventSessionConfig setComType(EventSessionConfig.ComType comType)
public boolean isFifo()
public EventSessionConfig setFifo(boolean fifo)
fifo
- - true when using fifo order.public boolean isBatching()
true
if notification comes in batches both size>0 and time>0 were set.setBatch(int, long)
public void setBatch(int size, long time)
size
- - amount of notifications held at server before sending them and
the amount of notification in batch.time
- - maximum time to delay notification in not full batch.public void setBatch(int size, long time, int pendingThreshold)
size
- - amount of notification in batch.time
- - maximum time to delay notification in not full batch.pendingThreshold
- - amount of notifications held at server before sending them.public int getBatchSize()
public long getBatchTime()
public int getBatchPendingThreshold()
public boolean isAutoRenew()
public EventSessionConfig setAutoRenew(boolean renew, LeaseListener listener)
setAutoRenew(renew, listener, Lease.FOREVER, 20000, 10000)
renew
- - true when autoRenew needed.listener
- for events when renew fails.@Deprecated public void setAutoRenew(boolean renew, LeaseListener listener, long renewExpiration, long renewDuration, long renewRTT)
renew
- - true when autoRenew needed.listener
- for events when renew fails.renewExpiration
- the period of time your notifications stop being renewed.renewDuration
- the period of time that passes between client failure,
and the time your notifications stop being sent. use more than renewRTT.renewRTT
- - RoundTripTime - the time that takes to reach the server and return. default 10000.public LeaseListener getLeaseListener()
public boolean isDurableNotifications()
public EventSessionConfig setDurableNotifications(boolean durable)
durable
- public Boolean isTriggerNotifyTemplate()
true
if trigger is needed on replication event.
null
is returned when this value was never set.public EventSessionConfig setTriggerNotifyTemplate(boolean triggerNotifyTemplate)
triggerNotifyTemplate
- public Boolean isReplicateNotifyTemplate()
true
if this template should be replicated.
null
is returned when this value was not set.public EventSessionConfig setReplicateNotifyTemplate(boolean replicateNotifyTemplate)
replicateNotifyTemplate
- public long getRenewDuration()
public long getRenewExpiration()
public long getRenewRTT()
public boolean isGuaranteedNotifications()
@Deprecated public void setGuaranteedNotifications(boolean guaranteedNotifications)
setDurableNotifications(boolean)
instead.guaranteedNotifications
- public void validate()
public void toText(com.gigaspaces.internal.utils.Textualizer textualizer)
toText
in interface com.gigaspaces.internal.utils.Textualizable
Copyright © GigaSpaces.