Interface HistoryMBean

All Known Implementing Classes:
History

public interface HistoryMBean
JMX interface for the history store
Since:
11.06.13
Author:
roland
  • Field Details

  • Method Details

    • updateAndAdd

      void updateAndAdd(org.jolokia.server.core.request.JolokiaRequest pJmxReq, org.jolokia.json.JSONObject pJson)
      Update the history store with the value of an an read, write or execute operation. Also, the timestamp of the insertion is recorded. Also, the recorded history values are added to the given json value. This operation must be called only internally.
      Parameters:
      pJmxReq - request for which an entry should be added in this history store
      pJson - the JSONObject to which to add the history.
    • setHistoryEntriesForAttribute

      void setHistoryEntriesForAttribute(String pMBean, String pAttribute, String pPath, String pTarget, int pMaxEntries) throws MalformedObjectNameException
      Deprecated.
      use instead
      Switch on history tracking for a specific attribute. If pMaxEntries is 0 history tracking is switched off.
      Parameters:
      pMBean - MBean object name
      pAttribute - attribute name
      pPath - inner path (optional)
      pTarget - remote target or null for a local mbean
      pMaxEntries - max last entries to remember, if 0 history tracking is switched off.
      Throws:
      MalformedObjectNameException - if the given name is not proper object name
    • setHistoryLimitForAttribute

      void setHistoryLimitForAttribute(String pMBean, String pAttribute, String pPath, String pTarget, int pMaxEntries, long pMaxDuration) throws MalformedObjectNameException
      Switch on history tracking for a specific attribute. If 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.
      Parameters:
      pMBean - MBean object name
      pAttribute - attribute name
      pPath - inner path (optional)
      pTarget - remote target or null for a local mbean
      pMaxEntries - 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)
      Throws:
      MalformedObjectNameException - if the given name is not proper object name
    • setHistoryEntriesForOperation

      void setHistoryEntriesForOperation(String pMBean, String pOperation, String pTarget, int pMaxEntries) throws MalformedObjectNameException
      Switch on history tracking for an operation. If pMaxEntries is 0 history tracking is switched off. The return value of the operation will be tracked.
      Parameters:
      pMBean - MBean object name
      pOperation - operation to track
      pTarget - remote target or null for a loal mbean
      pMaxEntries - max last entries to remember, if 0 history tracking is switched off.
      Throws:
      MalformedObjectNameException
    • setHistoryLimitForOperation

      void setHistoryLimitForOperation(String pMBean, String pOperation, String pTarget, int pMaxEntries, long pMaxDuration) throws MalformedObjectNameException
      Switch on history tracking for an operation. If 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.
      Parameters:
      pMBean - MBean object name
      pOperation - operation to track
      pTarget - remote target or null for a loal mbean
      pMaxEntries - 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)
      Throws:
      MalformedObjectNameException
    • resetHistoryEntries

      void resetHistoryEntries()
      Remove all history entries and switch off history tracking globally.
    • getHistorySize

      int getHistorySize() throws IOException
      Get the size in bytes which the history mechanism requires in total if serialized.
      Returns:
      size of the complete history in bytes
      Throws:
      IOException - if serialization (which is required for the size determination) fails.
    • getHistoryMaxEntries

      int getHistoryMaxEntries()
      Number of global limit for history entries. No attribute historization can exceed this limit (i.e if in setHistoryLimitForAttribute(String, String, String, String, int, long) the pMaxEntries is set larger than this limit, the global limit will be taken}
      Returns:
      the global history limit
    • setHistoryMaxEntries

      void setHistoryMaxEntries(int pLimit)
      Set the global history limit
      Parameters:
      pLimit - limit to set