Class AbstractCheckpointMBean
- java.lang.Object
-
- org.apache.jackrabbit.oak.commons.jmx.AbstractCheckpointMBean
-
- All Implemented Interfaces:
CheckpointMBean
- Direct Known Subclasses:
CompositeCheckpointMBean,DocumentCheckpointMBean,SegmentCheckpointMBean
public abstract class AbstractCheckpointMBean extends Object implements CheckpointMBean
Abstract base class forCheckpointMBeanimplementations. This class provides the basic functionality for converting checkpoints into tabular data.
-
-
Field Summary
-
Fields inherited from interface org.apache.jackrabbit.oak.api.jmx.CheckpointMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description AbstractCheckpointMBean()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcollectCheckpoints(TabularDataSupport tab)Called to collect the tabular data for the checkpoints.DategetOldestCheckpointCreationDate()abstract longgetOldestCheckpointCreationTimestamp()TabularDatalistCheckpoints()List the checkpoints that are currently present along with its id, creation time and expiry time.protected CompositeDataSupporttoCompositeData(String id, String created, String expires, Map<String,String> properties)Utility method for converting the fields associated with a checkpoint to the composite data format.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.api.jmx.CheckpointMBean
createCheckpoint, releaseCheckpoint
-
-
-
-
Method Detail
-
collectCheckpoints
protected abstract void collectCheckpoints(TabularDataSupport tab) throws OpenDataException
Called to collect the tabular data for the checkpoints. Each checkpoint should be represented by a single row intab. Implementors should use thetoCompositeData(java.lang.String, java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.lang.String>)utility method for converting the individual fields associated with a checkpoint into the correct composite data format.- Parameters:
tab-- Throws:
OpenDataException
-
listCheckpoints
public TabularData listCheckpoints()
Description copied from interface:CheckpointMBeanList the checkpoints that are currently present along with its id, creation time and expiry time.- Specified by:
listCheckpointsin interfaceCheckpointMBean- Returns:
-
getOldestCheckpointCreationTimestamp
public abstract long getOldestCheckpointCreationTimestamp()
- Specified by:
getOldestCheckpointCreationTimestampin interfaceCheckpointMBean- Returns:
- creation timestamp of oldest checkpoint.
-
getOldestCheckpointCreationDate
public Date getOldestCheckpointCreationDate()
- Specified by:
getOldestCheckpointCreationDatein interfaceCheckpointMBean- Returns:
- creation date of oldest checkpoint.
-
toCompositeData
protected final CompositeDataSupport toCompositeData(String id, String created, String expires, Map<String,String> properties) throws OpenDataException
Utility method for converting the fields associated with a checkpoint to the composite data format.- Parameters:
id- id of the checkpointcreated- creation data of the checkpointexpires- expiry data of the checkpoint- Returns:
- composite data representation of the fields associated with the checkpoint
- Throws:
OpenDataException
-
-