public class ServerLimitManager extends Object implements Initializable, XMessageCountSubscriber
| Constructor and Description |
|---|
ServerLimitManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
void |
init(org.springframework.context.ApplicationContext context) |
void |
onTheFlyMessageCountChange(long count)
Will be invoked when on-the-fly message count (i.e.
|
void |
totalReceivedMessageCountChange(long count)
Will be invoked when the total received message count (i.e.
|
ServerLimitManager |
withMessageLimit(long maxMessageCount)
Enforces a message limit for the instance
|
ServerLimitManager |
withUpTimeLimit(TimeUnit timeUnit,
int maxUptime,
int firstWarningTime,
int warningInterval)
Enforces an uptime limit for the instance
|
public ServerLimitManager withUpTimeLimit(TimeUnit timeUnit, int maxUptime, int firstWarningTime, int warningInterval)
timeUnit - TimeUnit for the following three parametersmaxUptime - maximum allowed uptime in @param timeUnitsfirstWarningTime - time to print the first warning in timeUnitswarningInterval - interval between two subsequent warnings in timeUnitsServerLimitManager instancepublic ServerLimitManager withMessageLimit(long maxMessageCount)
maxMessageCount - maximum number of messages that can be received (through ingress connectors) in a
single run of the instanceServerLimitManager instancepublic void init(org.springframework.context.ApplicationContext context)
init in interface Initializablepublic void destroy()
destroy in interface Initializablepublic void totalReceivedMessageCountChange(long count)
XMessageCountSubscribertotalReceivedMessageCountChange in interface XMessageCountSubscribercount - the total received message count since the last start of the enginepublic void onTheFlyMessageCountChange(long count)
XMessageCountSubscriberonTheFlyMessageCountChange in interface XMessageCountSubscribercount - the current on-the-fly message countCopyright © 2016–2019 AdroitLogic. All rights reserved.