public abstract class BatchedActivityUnitLogger extends Object implements ActivityUnitLogger, BatchedActivityUnitLoggerMBean
| Constructor and Description |
|---|
BatchedActivityUnitLogger() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
appendActivity(ActivityUnit act)
This method appends the supplied activity event to the log.
|
void |
close()
This method closes the activity logger.
|
long |
getMaxTimeInterval()
This method returns the maximum time interval
that should be logged within a single batch.
|
int |
getMaxUnitCount()
This method returns the maximum number of activity units
that should be logged within a single batch.
|
void |
init()
This method initializes the activity logger.
|
void |
log(ActivityUnit act)
This method records the supplied activity event.
|
protected void |
reset()
This method resets the counters and timers.
|
protected abstract void |
sendMessage()
This method sends the message.
|
void |
setMaxTimeInterval(long max)
This method sets the maximum time interval
that should be logged within a single batch.
|
void |
setMaxUnitCount(int max)
This method sets the maximum number of activity units
that should be logged within a single batch.
|
public void init()
init in interface ActivityUnitLoggerpublic void setMaxTimeInterval(long max)
setMaxTimeInterval in interface BatchedActivityUnitLoggerMBeanmax - The maximum number of messagespublic long getMaxTimeInterval()
getMaxTimeInterval in interface BatchedActivityUnitLoggerMBeanpublic void setMaxUnitCount(int max)
setMaxUnitCount in interface BatchedActivityUnitLoggerMBeanmax - The maximum number of activity unitspublic int getMaxUnitCount()
getMaxUnitCount in interface BatchedActivityUnitLoggerMBeanpublic void log(ActivityUnit act)
log in interface ActivityUnitLoggeract - The activity eventprotected abstract void appendActivity(ActivityUnit act) throws Exception
act - The activity eventException - Failed to append the activity event to the logprotected abstract void sendMessage()
throws Exception
Exception - Failed to send the messageprotected void reset()
public void close()
close in interface ActivityUnitLoggerCopyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.