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 timeUnit
swarningInterval
- interval between two subsequent warnings in timeUnit
sServerLimitManager
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 Initializable
public void destroy()
destroy
in interface Initializable
public void totalReceivedMessageCountChange(long count)
XMessageCountSubscriber
totalReceivedMessageCountChange
in interface XMessageCountSubscriber
count
- the total received message count since the last start of the enginepublic void onTheFlyMessageCountChange(long count)
XMessageCountSubscriber
onTheFlyMessageCountChange
in interface XMessageCountSubscriber
count
- the current on-the-fly message countCopyright © 2016–2019 AdroitLogic. All rights reserved.