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 ConfigMBean
pMBean
- 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 ConfigMBean
pMBean
- 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 ConfigMBean
pMBean
- 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.MalformedObjectNameException
public 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 ConfigMBean
pMBean
- 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)MalformedObjectNameException
public void resetHistoryEntries()
resetHistoryEntries
in interface ConfigMBean
public String debugInfo()
ConfigMBean.getMaxDebugEntries()
lines.debugInfo
in interface ConfigMBean
public void resetDebugInfo()
resetDebugInfo
in interface ConfigMBean
public 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 ConfigMBean
public void setHistoryMaxEntries(int pLimit)
setHistoryMaxEntries
in interface ConfigMBean
pLimit
- limit to setpublic boolean isDebug()
isDebug
in interface ConfigMBean
public void setDebug(boolean pSwitch)
setDebug
in interface ConfigMBean
pSwitch
- true, if debugging should be switched on, false otherwisepublic int getMaxDebugEntries()
getMaxDebugEntries
in interface ConfigMBean
public void setMaxDebugEntries(int pNumber)
setMaxDebugEntries
in interface ConfigMBean
pNumber
- entries to setpublic int getHistorySize()
getHistorySize
in interface ConfigMBean
public ObjectName preRegister(MBeanServer server, ObjectName name) throws MalformedObjectNameException
preRegister
in interface MBeanRegistration
MalformedObjectNameException
public void postRegister(Boolean registrationDone)
postRegister
in interface MBeanRegistration
public void preDeregister()
preDeregister
in interface MBeanRegistration
public void postDeregister()
postDeregister
in interface MBeanRegistration
Copyright © 2016. All rights reserved.