Package de.hybris.platform.cluster
Class DefaultBroadcastServiceConfiguration
- java.lang.Object
-
- de.hybris.platform.cluster.DefaultBroadcastServiceConfiguration
-
- All Implemented Interfaces:
BroadcastServiceConfiguration
public class DefaultBroadcastServiceConfiguration extends java.lang.Object implements BroadcastServiceConfiguration
Default configuration to be used forDefaultBroadcastService.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCFG_MESSAGE_KEYCACHE_SIZEstatic java.lang.StringCFG_METHOD_PREFIXstatic java.lang.StringCFG_METHODSstatic java.lang.StringCFG_SENDER_THREADS_DISABLEstatic java.lang.StringCFG_SENDER_THREADS_KEEPALIVEstatic java.lang.StringCFG_SENDER_THREADS_MAXstatic java.lang.StringCFG_SENDER_THREADS_MAXWAITstatic java.lang.StringCFG_SENDER_THREADS_MINstatic java.lang.StringCFG_SENDER_THREADS_QUEUE_FAIRNESSstatic java.lang.StringCFG_SENDER_THREADS_QUEUESIZEstatic java.lang.StringCFG_SENDER_THREADS_WAITDELAYstatic java.lang.StringCFG_START_PING_ON_TENANT_STARTUPstatic java.lang.StringDEFAULT_METHODSstatic intMESSAGE_QUEUE_SIZEThe default asynchronous message sending queue size.static intMESSAGE_QUEUE_WAIT_TIMEThe time to wait before trying to put message into sender queue again.static longMESSAGE_SENDING_TIMEOUTthe time a thread will try to place his message into message sending queue before we raise a exception.static intMESSAGE_THREADS_KEEPALIVEThe default time before a unused message thread is removed.static intMESSAGE_THREADS_MAXThe default max amount of message sending threads to create.static intMESSAGE_THREADS_MINThe default min amount of message sending threads to keep active.
-
Constructor Summary
Constructors Constructor Description DefaultBroadcastServiceConfiguration()
-
Method Summary
-
-
-
Field Detail
-
CFG_METHODS
public static java.lang.String CFG_METHODS
-
CFG_METHOD_PREFIX
public static java.lang.String CFG_METHOD_PREFIX
-
CFG_SENDER_THREADS_MIN
public static java.lang.String CFG_SENDER_THREADS_MIN
-
CFG_SENDER_THREADS_MAX
public static java.lang.String CFG_SENDER_THREADS_MAX
-
CFG_SENDER_THREADS_KEEPALIVE
public static java.lang.String CFG_SENDER_THREADS_KEEPALIVE
-
CFG_SENDER_THREADS_QUEUESIZE
public static java.lang.String CFG_SENDER_THREADS_QUEUESIZE
-
CFG_SENDER_THREADS_QUEUE_FAIRNESS
public static java.lang.String CFG_SENDER_THREADS_QUEUE_FAIRNESS
-
CFG_SENDER_THREADS_MAXWAIT
public static java.lang.String CFG_SENDER_THREADS_MAXWAIT
-
CFG_SENDER_THREADS_WAITDELAY
public static java.lang.String CFG_SENDER_THREADS_WAITDELAY
-
CFG_SENDER_THREADS_DISABLE
public static java.lang.String CFG_SENDER_THREADS_DISABLE
-
CFG_START_PING_ON_TENANT_STARTUP
public static java.lang.String CFG_START_PING_ON_TENANT_STARTUP
-
CFG_MESSAGE_KEYCACHE_SIZE
public static java.lang.String CFG_MESSAGE_KEYCACHE_SIZE
-
DEFAULT_METHODS
public static java.lang.String DEFAULT_METHODS
-
MESSAGE_SENDING_TIMEOUT
public static final long MESSAGE_SENDING_TIMEOUT
the time a thread will try to place his message into message sending queue before we raise a exception. (seconds)- See Also:
- Constant Field Values
-
MESSAGE_QUEUE_WAIT_TIME
public static final int MESSAGE_QUEUE_WAIT_TIME
The time to wait before trying to put message into sender queue again. (milliseconds)- See Also:
- Constant Field Values
-
MESSAGE_QUEUE_SIZE
public static final int MESSAGE_QUEUE_SIZE
The default asynchronous message sending queue size.- See Also:
- Constant Field Values
-
MESSAGE_THREADS_MIN
public static final int MESSAGE_THREADS_MIN
The default min amount of message sending threads to keep active.- See Also:
- Constant Field Values
-
MESSAGE_THREADS_MAX
public static final int MESSAGE_THREADS_MAX
The default max amount of message sending threads to create.- See Also:
- Constant Field Values
-
MESSAGE_THREADS_KEEPALIVE
public static final int MESSAGE_THREADS_KEEPALIVE
The default time before a unused message thread is removed. (seconds)- See Also:
- Constant Field Values
-
-
Method Detail
-
loadMethods
protected java.util.Map<java.lang.String,java.lang.Class> loadMethods(ConfigIntf cfg)
-
enableAsynchonousSending
public boolean enableAsynchonousSending()
- Specified by:
enableAsynchonousSendingin interfaceBroadcastServiceConfiguration
-
setAsynchonousSending
public void setAsynchonousSending(boolean enabled)
-
enableClusterMode
public boolean enableClusterMode()
- Specified by:
enableClusterModein interfaceBroadcastServiceConfiguration
-
setClusterMode
public void setClusterMode(boolean enabled)
-
getConfiguredNodeID
public int getConfiguredNodeID()
- Specified by:
getConfiguredNodeIDin interfaceBroadcastServiceConfiguration
-
setConfiguredNodeID
public void setConfiguredNodeID(int id)
-
getClusterIslandID
public long getClusterIslandID()
- Specified by:
getClusterIslandIDin interfaceBroadcastServiceConfiguration
-
setClusterIslandID
public void setClusterIslandID(long id)
-
getDynamicNodeID
public long getDynamicNodeID()
- Specified by:
getDynamicNodeIDin interfaceBroadcastServiceConfiguration
-
setDynamicNodeID
public void setDynamicNodeID(long id)
-
getMessageKeyCacheSize
public int getMessageKeyCacheSize()
- Specified by:
getMessageKeyCacheSizein interfaceBroadcastServiceConfiguration
-
setMessageKeyCacheSize
public void setMessageKeyCacheSize(int size)
-
getMessageSendingMaxWait
public long getMessageSendingMaxWait()
- Specified by:
getMessageSendingMaxWaitin interfaceBroadcastServiceConfiguration
-
setMessageSendingMaxWait
public void setMessageSendingMaxWait(long milliseconds)
-
getMessageSendingQueueSize
public int getMessageSendingQueueSize()
- Specified by:
getMessageSendingQueueSizein interfaceBroadcastServiceConfiguration
-
setMessageSendingQueueSize
public void setMessageSendingQueueSize(int size)
-
getMessageSendingQueueFairness
public boolean getMessageSendingQueueFairness()
- Specified by:
getMessageSendingQueueFairnessin interfaceBroadcastServiceConfiguration
-
setMessageSendingQueueFairness
public void setMessageSendingQueueFairness(boolean fair)
-
getMessageSendingWaitDelay
public int getMessageSendingWaitDelay()
- Specified by:
getMessageSendingWaitDelayin interfaceBroadcastServiceConfiguration
-
setMessageSendingWaitDelay
public void setMessageSendingWaitDelay(int milliseconds)
-
getMethods
public java.util.Map<java.lang.String,java.lang.Class> getMethods()
- Specified by:
getMethodsin interfaceBroadcastServiceConfiguration
-
setMethods
public void setMethods(java.util.Map<java.lang.String,java.lang.Class> methodClassMap)
-
getSenderMaxThreads
public int getSenderMaxThreads()
- Specified by:
getSenderMaxThreadsin interfaceBroadcastServiceConfiguration
-
setSenderMaxThreads
public void setSenderMaxThreads(int maxThreads)
-
getSenderMinThreads
public int getSenderMinThreads()
- Specified by:
getSenderMinThreadsin interfaceBroadcastServiceConfiguration
-
setSenderMinThreads
public void setSenderMinThreads(int minThreads)
-
getSenderThreadsKeepAlive
public int getSenderThreadsKeepAlive()
- Specified by:
getSenderThreadsKeepAlivein interfaceBroadcastServiceConfiguration
-
setSenderThreadsKeepAlive
public void setSenderThreadsKeepAlive(int milliseconds)
-
startPingOnTenantStartup
public boolean startPingOnTenantStartup()
- Specified by:
startPingOnTenantStartupin interfaceBroadcastServiceConfiguration
-
-