com.ibm.di.api.jmx.mbeans
Class TombstoneManager

java.lang.Object
  extended by com.ibm.di.api.jmx.mbeans.BaseAdmin
      extended by com.ibm.di.api.jmx.mbeans.TombstoneManager
All Implemented Interfaces:
BaseAdminMBean, BaseMBean, TombstoneManagerMBean

public class TombstoneManager
extends BaseAdmin
implements TombstoneManagerMBean

Represents a TombstoneManager instance. Provides various methods to deal with Tombstones.


Field Summary
static String MBEAN_ID
          Id of the MBean.
static String MBEAN_TYPE
          Type of the MBean.
 
Constructor Summary
TombstoneManager(TombstoneManager aTombstoneManager)
          Class constructor.
 
Method Summary
 int deleteALTombstones(String aAssemblyLineName, String aConfigID)
          Deletes all tombstones for specified AssemblyLine.
 int deleteALTombstones(String aAssemblyLineName, String aConfigID, Date olderThan)
          Deletes all tombstones for the specified AssemblyLine that are older than the specified date.
 int deleteALTombstones(String aAssemblyLineName, String aConfigID, Date startDate, Date endDate)
          Deletes all tombstones for the specified AssemblyLine that are in the specified Date range
 int deleteALTombstones(String aAssemblyLineName, String aConfigID, int aDays)
          Deletes all tombstones for the specified AssemblyLine that are older than the specified number of days.
 int deleteCITombstones(String aConfigID)
          Deletes all tombstones for specified Config Instance.
 int deleteCITombstones(String aConfigID, int aDays)
          Deletes all tombstones for the specified Config Instance that are older than the specified number of days.
 boolean deleteTombstone(String aGUID)
          Deletes the tombstone with the specified GUID.
 int deleteTombstones(int aDays)
          Deletes all tombstones that are older than the specified number of days.
 Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName, String aConfigID)
          Returns all available tombstones for the specified AssemblyLine.
 Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName, String aConfigID, Date aStartTime, Date aEndTime)
          Returns all available tombstones for the specified AssemblyLine with timestamps in the interval specified by aStartTime and aEndTime.
 Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName, String aConfigID, int aRecentNumberOfTombstones)
          Returns the recent n number of tombstones for a specified AssemblyLine.
 Tombstone[] getConfigInstanceTombstones(String aConfigID)
          Returns all available tombstones for the specified Config Instance.
 Tombstone[] getConfigInstanceTombstones(String aConfigID, Date aStartTime, Date aEndTime)
          Returns all available tombstones for the specified Config Instance with timestamps in the interval specified by aStartTime and aEndTime.
 String getId()
          Reads attribute "Id".
 Tombstone getTombstone(String aGUID)
          Returns a single tombstone object uniquely identified by the specified GUID.
 Tombstone[] getTombstones(Date aStartTime, Date aEndTime)
          Returns all available tombstones with timestamps in the interval specified by aStartTime and aEndTime.
 String getType()
          Reads attribute "Type".
 int keepMostRecentALTombstones(String aAssemblyLineName, String aConfigID, int aMostResentToKeep)
          After this method is executed only the aMostRecentToKeep most recent tombstone records for the specified AssemblyLine are kept and all other are deleted.
 int keepMostRecentCITombstones(String aConfigID, int aMostResentToKeep)
          After this method is executed only the aMostRecentToKeep most recent tombstone records for the specified Config Instance are kept and all other are deleted.
 int keepMostRecentTombstones(int aMostResentToKeep)
          After this method is executed only the aMostRecentToKeep most recent tombstone records are kept and all other are deleted.
 
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_TYPE

public static final String MBEAN_TYPE
Type of the MBean.

See Also:
Constant Field Values

MBEAN_ID

public static final String MBEAN_ID
Id of the MBean.

See Also:
Constant Field Values
Constructor Detail

TombstoneManager

public TombstoneManager(TombstoneManager aTombstoneManager)
                 throws DIException
Class constructor.

Parameters:
aTombstoneManager - TombstoneManager instance.
Throws:
DIException
Method Detail

getType

public String getType()
Reads attribute "Type".

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getType in interface BaseMBean
Returns:
the type of this MBean.

getId

public String getId()
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getId in interface BaseMBean
Returns:
the Id of this MBean.

getTombstone

public Tombstone getTombstone(String aGUID)
                       throws DIException
Returns a single tombstone object uniquely identified by the specified GUID.

Specified by:
getTombstone in interface TombstoneManagerMBean
Parameters:
aGUID - Tombstone GUID.
Returns:
the Tombstone object.
Throws:
DIException - if an error occurs while getting the Tombstone object.

getAssemblyLineTombstones

public Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName,
                                             String aConfigID)
                                      throws DIException
Returns all available tombstones for the specified AssemblyLine.

Specified by:
getAssemblyLineTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aConfigID - The name of the AssmeblyLine's configuration.
Returns:
an array of Tombstone objects.
Throws:
DIException - if an error occurs while getting the Tombstone objects.

getAssemblyLineTombstones

public Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName,
                                             String aConfigID,
                                             int aRecentNumberOfTombstones)
                                      throws DIException
Returns the recent n number of tombstones for a specified AssemblyLine.

Specified by:
getAssemblyLineTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aConfigID - The name of the AssmeblyLine's configuration.
aRecentNumberOfTombstones - The recent n number of tombstones to be fetched.
Returns:
an array of Tombstone objects.
Throws:
DIException

getAssemblyLineTombstones

public Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName,
                                             String aConfigID,
                                             Date aStartTime,
                                             Date aEndTime)
                                      throws DIException
Returns all available tombstones for the specified AssemblyLine with timestamps in the interval specified by aStartTime and aEndTime.

Specified by:
getAssemblyLineTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The name of the AssemblyLine.
aConfigID - The name of the AssmeblyLine's configuration.
aStartTime - period start time.
aEndTime - period end time.
Returns:
an array of Tombstone objects.
Throws:
DIException - if an error occurs while getting the Tombstone objects for the specified AssemblyLine.

getConfigInstanceTombstones

public Tombstone[] getConfigInstanceTombstones(String aConfigID)
                                        throws DIException
Returns all available tombstones for the specified Config Instance.

Specified by:
getConfigInstanceTombstones in interface TombstoneManagerMBean
Parameters:
aConfigID - The configuration name.
Returns:
an array of Tombstone objects.
Throws:
DIException - if an error occurs while getting the Tombstone objects for the specified Config Instance.

getConfigInstanceTombstones

public Tombstone[] getConfigInstanceTombstones(String aConfigID,
                                               Date aStartTime,
                                               Date aEndTime)
                                        throws DIException
Returns all available tombstones for the specified Config Instance with timestamps in the interval specified by aStartTime and aEndTime.

Specified by:
getConfigInstanceTombstones in interface TombstoneManagerMBean
Parameters:
aConfigID - The configuration name.
aStartTime - period start time.
aEndTime - period end time.
Returns:
an array of Tombstone objects.
Throws:
DIException - if an error occurs while getting the Tombstone objects for the specified Config Instance.

getTombstones

public Tombstone[] getTombstones(Date aStartTime,
                                 Date aEndTime)
                          throws DIException
Returns all available tombstones with timestamps in the interval specified by aStartTime and aEndTime.

Specified by:
getTombstones in interface TombstoneManagerMBean
Parameters:
aStartTime - period start time.
aEndTime - period end time.
Returns:
an array of Tombstone objects.
Throws:
DIException - if an error occurs while getting the Tombstone objects for the specified interval.

deleteTombstones

public int deleteTombstones(int aDays)
                     throws DIException
Deletes all tombstones that are older than the specified number of days.

Specified by:
deleteTombstones in interface TombstoneManagerMBean
Parameters:
aDays - Number of days.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

keepMostRecentTombstones

public int keepMostRecentTombstones(int aMostResentToKeep)
                             throws DIException
After this method is executed only the aMostRecentToKeep most recent tombstone records are kept and all other are deleted.

Specified by:
keepMostRecentTombstones in interface TombstoneManagerMBean
Parameters:
aMostResentToKeep - number of most recent tombstones to keep.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

deleteALTombstones

public int deleteALTombstones(String aAssemblyLineName,
                              String aConfigID)
                       throws DIException
Deletes all tombstones for specified AssemblyLine.

Specified by:
deleteALTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The AssemblyLine name.
aConfigID - The AssemblyLine's configuration name.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

deleteALTombstones

public int deleteALTombstones(String aAssemblyLineName,
                              String aConfigID,
                              int aDays)
                       throws DIException
Deletes all tombstones for the specified AssemblyLine that are older than the specified number of days.

Specified by:
deleteALTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The AssemblyLine name.
aConfigID - The AssemblyLine's configuration name.
aDays - Number of days.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

deleteALTombstones

public int deleteALTombstones(String aAssemblyLineName,
                              String aConfigID,
                              Date olderThan)
                       throws DIException
Deletes all tombstones for the specified AssemblyLine that are older than the specified date.

Specified by:
deleteALTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The AssemblyLine name.
aConfigID - The AssemblyLine's configuration name.
olderThan - Date
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

deleteALTombstones

public int deleteALTombstones(String aAssemblyLineName,
                              String aConfigID,
                              Date startDate,
                              Date endDate)
                       throws DIException
Deletes all tombstones for the specified AssemblyLine that are in the specified Date range

Specified by:
deleteALTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The AssemblyLine name.
aConfigID - The AssemblyLine's configuration name.
startDate - Date
endDate - Date
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

keepMostRecentALTombstones

public int keepMostRecentALTombstones(String aAssemblyLineName,
                                      String aConfigID,
                                      int aMostResentToKeep)
                               throws DIException
After this method is executed only the aMostRecentToKeep most recent tombstone records for the specified AssemblyLine are kept and all other are deleted.

Specified by:
keepMostRecentALTombstones in interface TombstoneManagerMBean
Parameters:
aAssemblyLineName - The AssemblyLine name.
aConfigID - The AssemblyLine's configuration name.
aMostResentToKeep - Number of most recent tombstones to keep.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

deleteCITombstones

public int deleteCITombstones(String aConfigID)
                       throws DIException
Deletes all tombstones for specified Config Instance.

Specified by:
deleteCITombstones in interface TombstoneManagerMBean
Parameters:
aConfigID - Configuration name.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

deleteCITombstones

public int deleteCITombstones(String aConfigID,
                              int aDays)
                       throws DIException
Deletes all tombstones for the specified Config Instance that are older than the specified number of days.

Specified by:
deleteCITombstones in interface TombstoneManagerMBean
Parameters:
aConfigID - Configuration name.
aDays - Number of days.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

keepMostRecentCITombstones

public int keepMostRecentCITombstones(String aConfigID,
                                      int aMostResentToKeep)
                               throws DIException
After this method is executed only the aMostRecentToKeep most recent tombstone records for the specified Config Instance are kept and all other are deleted.

Specified by:
keepMostRecentCITombstones in interface TombstoneManagerMBean
Parameters:
aConfigID - Configuration name.
aMostResentToKeep - Number of most recent tombstones to keep.
Returns:
The number of deleted tombstone records.
Throws:
DIException - if an error occurs while deleting Tombstone records.

deleteTombstone

public boolean deleteTombstone(String aGUID)
                        throws DIException
Deletes the tombstone with the specified GUID.

Specified by:
deleteTombstone in interface TombstoneManagerMBean
Parameters:
aGUID - Tombstone GUID.
Returns:
true only when the tombstone object with the specified GUID is found and deleted.
Throws:
DIException - if an error occurs while deleting Tombstone record.