public class Config extends Object implements ConfigMBean, MBeanRegistration
LEGACY_OBJECT_NAME, OBJECT_NAME| Constructor and Description |
|---|
Config(HistoryStore pHistoryStore,
DebugStore pDebugStore,
String pOName)
Constructor with the configurable objects as parameters.
|
| Modifier and Type | Method and Description |
|---|---|
String |
debugInfo()
Get latest debug information if debugging is switched on.
|
int |
getHistoryMaxEntries()
Number of global limit for history entries.
|
int |
getHistorySize()
Get the size in bytes which the history mechanism requires in total if serialized.
|
int |
getMaxDebugEntries()
Number of debug entries to remember
|
boolean |
isDebug()
Check, whether debugging is switched on
|
void |
postDeregister() |
void |
postRegister(Boolean registrationDone) |
void |
preDeregister() |
ObjectName |
preRegister(MBeanServer server,
ObjectName name) |
void |
resetDebugInfo()
Reset all debug information stored internally
|
void |
resetHistoryEntries()
Remove all history entries and switch off history tracking globally.
|
void |
setDebug(boolean pSwitch)
Set debugging to given state
|
void |
setHistoryEntriesForAttribute(String pMBean,
String pAttribute,
String pPath,
String pTarget,
int pMaxEntries)
Switch on history tracking for a specific attribute.
|
void |
setHistoryEntriesForOperation(String pMBean,
String pOperation,
String pTarget,
int pMaxEntries)
Switch on history tracking for an operation.
|
void |
setHistoryLimitForAttribute(String pMBean,
String pAttribute,
String pPath,
String pTarget,
int pMaxEntries,
long pMaxDuration)
Switch on history tracking for a specific attribute.
|
void |
setHistoryLimitForOperation(String pMBean,
String pOperation,
String pTarget,
int pMaxEntries,
long pMaxDuration)
Switch on history tracking for an operation.
|
void |
setHistoryMaxEntries(int pLimit)
Set the global history limit
|
void |
setMaxDebugEntries(int pNumber)
Set the number of debugging info to remember
|
public Config(HistoryStore pHistoryStore, DebugStore pDebugStore, String pOName)
pHistoryStore - history store where to hold historical valuespDebugStore - debug store for holding debug messagespOName - object name under which to register this MBeanpublic void setHistoryEntriesForAttribute(String pMBean, String pAttribute, String pPath, String pTarget, int pMaxEntries) throws MalformedObjectNameException
pMaxEntries is 0
history tracking is switched off.setHistoryEntriesForAttribute in interface ConfigMBeanpMBean - MBean object namepAttribute - attribute namepPath - inner path (optional)pTarget - remote target or null for a local mbeanpMaxEntries - max last entries to remember, if 0 history tracking is switched off.MalformedObjectNameException - if the given name is not proper object namepublic void setHistoryLimitForAttribute(String pMBean, String pAttribute, String pPath, String pTarget, int pMaxEntries, long pMaxDuration) throws MalformedObjectNameException
pMaxEntries and pMaxDuration is
0 then history tracking is switched off.
If either pMaxEntries or pMaxDuration 0, then the given limit applies. If both are != 0,
then both limits are applied simultaneously.setHistoryLimitForAttribute in interface ConfigMBeanpMBean - MBean object namepAttribute - attribute namepPath - inner path (optional)pTarget - remote target or null for a local mbeanpMaxEntries - max last entries to remember, if 0 history tracking is switched off.pMaxDuration - maximum duration the maximum duration for how long to keep a value (in seconds)MalformedObjectNameException - if the given name is not proper object namepublic void setHistoryEntriesForOperation(String pMBean, String pOperation, String pTarget, int pMaxEntries) throws MalformedObjectNameException
pMaxEntries is 0
history tracking is switched off. The return value of the operation will be tracked.setHistoryEntriesForOperation in interface ConfigMBeanpMBean - MBean object namepOperation - operation to trackpTarget - remote target or null for a loal mbeanpMaxEntries - max last entries to remember, if 0 history tracking is switched off.MalformedObjectNameExceptionpublic void setHistoryLimitForOperation(String pMBean, String pOperation, String pTarget, int pMaxEntries, long pMaxDuration) throws MalformedObjectNameException
pMaxEntries and pMaxDuration is 0
history tracking is switched off. The return value of the operation will be tracked.
If either pMaxEntries or pMaxDuration 0, then the given limit applies. If both are != 0,
then both limits are applied simultaneously.setHistoryLimitForOperation in interface ConfigMBeanpMBean - MBean object namepOperation - operation to trackpTarget - remote target or null for a loal mbeanpMaxEntries - max last entries to remember, if 0 history tracking is switched off.pMaxDuration - maximum duration the maximum duration for how long to keep a value (in seconds)MalformedObjectNameExceptionpublic void resetHistoryEntries()
resetHistoryEntries in interface ConfigMBeanpublic String debugInfo()
ConfigMBean.getMaxDebugEntries() lines.debugInfo in interface ConfigMBeanpublic void resetDebugInfo()
resetDebugInfo in interface ConfigMBeanpublic int getHistoryMaxEntries()
ConfigMBean.setHistoryLimitForAttribute(String, String, String, String, int, long)
the pMaxEntries is set larger than this limit, the global limit will be taken}getHistoryMaxEntries in interface ConfigMBeanpublic void setHistoryMaxEntries(int pLimit)
setHistoryMaxEntries in interface ConfigMBeanpLimit - limit to setpublic boolean isDebug()
isDebug in interface ConfigMBeanpublic void setDebug(boolean pSwitch)
setDebug in interface ConfigMBeanpSwitch - true, if debugging should be switched on, false otherwisepublic int getMaxDebugEntries()
getMaxDebugEntries in interface ConfigMBeanpublic void setMaxDebugEntries(int pNumber)
setMaxDebugEntries in interface ConfigMBeanpNumber - entries to setpublic int getHistorySize()
getHistorySize in interface ConfigMBeanpublic ObjectName preRegister(MBeanServer server, ObjectName name) throws MalformedObjectNameException
preRegister in interface MBeanRegistrationMalformedObjectNameExceptionpublic void postRegister(Boolean registrationDone)
postRegister in interface MBeanRegistrationpublic void preDeregister()
preDeregister in interface MBeanRegistrationpublic void postDeregister()
postDeregister in interface MBeanRegistrationCopyright © 2019. All rights reserved.