|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.api.tm.TombstoneManager
public class TombstoneManager
This class is used to manage Tombstone objects. It contains methods to retrieve and delete tombstone objects on a specific criteria.
| Field Summary | |
|---|---|
static int |
COMPONENT_TYPE_ASSEMBLY_LINE
This constant could be used as value for the Tombstone.PROPERTY_NAME_COMPONENT_TYPE_ID property. |
static int |
COMPONENT_TYPE_CONFIG_INSTANCE
This constant could be used as value for the Tombstone.PROPERTY_NAME_COMPONENT_TYPE_ID property. |
static int |
COMPONENT_TYPE_EVENT_HANDLER
This constant could be used as value for the Tombstone.PROPERTY_NAME_COMPONENT_TYPE_ID property. |
static String |
PROP_AUTODEL_AGE
When this property is present and contains an integer value greater than 0 the Tombstone Manager will automatically delete all tombstone records that are older than the specified number of days. |
static String |
PROP_AUTODEL_RECORDS_MAX
This property specifies the number of tombstone records to keep when the logic for leveling is triggered as per the PROP_AUTODEL_RECORDS_TRIGGER property. |
static String |
PROP_AUTODEL_RECORDS_TRIGGER
This property specifies the total number of tombstone records that will trigger the logic for leveling the number of tombstone records to a certain number. The default value for this property is "10000". |
static String |
PROP_CREATE_ALL
When this property is set to "true" the Tombstone Manager will create tombstones for every AssemblyLine and Config Instance regardless of the values specified in the configurations. |
static String |
PROP_CREATE_TABLE
This property is used to override the default "CREATE TABLE..." SQL statement. |
static String |
PROP_FIELD_COMPONENT_NAME
A constant for the column "COMPONENT_NAME" |
static String |
PROP_FIELD_COMPONENT_TYPE_ID
A constant for the column "COMPONENT_TYPE_ID" |
static String |
PROP_FIELD_CONFIGURATION
A constant for the column "CONFIGURATION" |
static String |
PROP_FIELD_CREATED_ON
A constant for the column "CREATED_ON" |
static String |
PROP_FIELD_ERROR_DESCR
A constant for the column "ERROR_DESCR" |
static String |
PROP_FIELD_EVENT_TYPE_ID
A constant for the column "EVENT_TYPE_ID" |
static String |
PROP_FIELD_EXIT_CODE
A constant for the column "EXIT_CODE" |
static String |
PROP_FIELD_GUID
A constant for the column "GUID" |
static String |
PROP_FIELD_ID
A constant for the column - ID |
static String |
PROP_FIELD_START_TIME
A constant for the column "START_TIME" |
static String |
PROP_FIELD_STATS
A constant for the column "STATS" |
static String |
PROP_FIELD_USER_MESSAGE
A constant for the column "USER_MESSAGE" |
static String |
TABLE_NAME
This constant has the name of the table that will be created/queried. |
| Constructor Summary | |
|---|---|
TombstoneManager()
Default constructor for this object. |
|
| Method Summary | |
|---|---|
int |
deleteALTombstones(String aAssemblyLineName,
String aConfigID)
Deletes all Tombstone objects created for the specified AssemblyLine. |
int |
deleteALTombstones(String aAssemblyLineName,
String aConfigID,
Date olderThanDate)
Deletes all Tombstone objects for a specified AssemblyLine that are older than the specified date. |
int |
deleteALTombstones(String aAssemblyLineName,
String aConfigID,
Date startDate,
Date endDate)
Deletes all Tombstone objects for a specified AssemblyLine that are in the specified Date range. |
int |
deleteALTombstones(String aAssemblyLineName,
String aConfigID,
int aDays)
Deletes all Tombstone objects for a specified AssemblyLine that are older than the specified number of days. |
int |
deleteCITombstones(String aConfigID)
Deletes all tombstones for a specified Config Instance. |
int |
deleteCITombstones(String aConfigID,
int aDays)
Deletes all Tombstone objects for a specified Config Instance that are older than the specified number of days. |
boolean |
deleteTombstone(String aGUID)
Deletes a tombstone. |
int |
deleteTombstones(int aDaysCount)
Deletes all Tombstone objects that are older than the specified number of days. |
protected void |
doInsert(int aComponentTypeID,
int aEventTypeID,
long aStartTime,
long aCreatedOn,
String aComponentName,
String aConfiguration,
int aExitCode,
String aErrorDescr,
String aGUID,
byte[] aStats,
String aUserMessage)
Inserts a tombstone record in the back-end database. |
protected void |
finalize()
Close the prepared statement. |
Tombstone[] |
getAssemblyLineTombstones(String aAssemblyLineName,
String aConfigID)
Get all available tombstones for a specified AssemblyLine. |
Tombstone[] |
getAssemblyLineTombstones(String aAssemblyLineName,
String aConfigID,
Date aStartTime,
Date aEndTime)
Get all available tombstones for a specified AssemblyLine with timestamps in the interval specified by aStartTime and aEndTime. |
Tombstone[] |
getAssemblyLineTombstones(String assemblyLineName,
String configID,
int recentNumberOfTombstones)
Gets the recent n number of tombstones for a specified AssemblyLine |
Tombstone[] |
getConfigInstanceTombstones(String aConfigID)
Get all available tombstones for a specified Configuration Instance. |
Tombstone[] |
getConfigInstanceTombstones(String aConfigID,
Date aStartTime,
Date aEndTime)
Get all available tombstones for a specified ConfigInstance with timestamps in the interval specified by aStartTime and aEndTime. |
Connection |
getConnection()
Gets the JDBC connection. |
Tombstone |
getTombstone(String aGUID)
Get single tombstone object, uniquely identified by the specified GUID |
Tombstone[] |
getTombstones(Date aStartTime,
Date aEndTime)
Get all available tombstones with timestamps in the interval specified by aStartTime and aEndTime. |
int |
getTombstonesCount()
|
int |
keepMostRecentALTombstones(String aAssemblyLineName,
String aConfigID,
int aRecentTombstonesToKeep)
Deletes all tombstones for a specified AssemblyLine except a specified number of most recently created ones. |
int |
keepMostRecentCITombstones(String aConfigID,
int aRecentTombstonesToKeep)
Deletes all tombstones for a Config Instance except a specified number of recently created ones. |
int |
keepMostRecentTombstones(int aRecentTombstonesToKeep)
Deletes all tombstone object records except a specified number of most recently created ones. |
void |
setConnection(Connection aConnection)
Sets the JDBC connection. |
void |
startAutoCleaner()
Starts a new thread for the TombstoneAutoCleaner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_AUTODEL_AGE
public static final String PROP_AUTODEL_RECORDS_TRIGGER
public static final String PROP_AUTODEL_RECORDS_MAX
PROP_AUTODEL_RECORDS_TRIGGER property. Alter the cleanup only
the most recent (the value of this property) number of records will be
kept.
public static final String PROP_CREATE_ALL
public static final String PROP_CREATE_TABLE
public static final int COMPONENT_TYPE_CONFIG_INSTANCE
Tombstone.PROPERTY_NAME_COMPONENT_TYPE_ID property.
public static final int COMPONENT_TYPE_ASSEMBLY_LINE
Tombstone.PROPERTY_NAME_COMPONENT_TYPE_ID property.
public static final int COMPONENT_TYPE_EVENT_HANDLER
Tombstone.PROPERTY_NAME_COMPONENT_TYPE_ID property.
public static final String TABLE_NAME
public static final String PROP_FIELD_ID
public static final String PROP_FIELD_COMPONENT_TYPE_ID
public static final String PROP_FIELD_EVENT_TYPE_ID
public static final String PROP_FIELD_START_TIME
public static final String PROP_FIELD_CREATED_ON
public static final String PROP_FIELD_COMPONENT_NAME
public static final String PROP_FIELD_CONFIGURATION
public static final String PROP_FIELD_EXIT_CODE
public static final String PROP_FIELD_ERROR_DESCR
public static final String PROP_FIELD_GUID
public static final String PROP_FIELD_STATS
public static final String PROP_FIELD_USER_MESSAGE
| Constructor Detail |
|---|
public TombstoneManager()
throws DIException
From 7.0 the cleaning process will not be triggered in the constructor but should be started immediately after that using startAutoCleaner() method.
DIException| Method Detail |
|---|
public void startAutoCleaner()
public Tombstone getTombstone(String aGUID)
throws DIException
aGUID - The GUID of the requested tombstone
DIException
public Tombstone[] getAssemblyLineTombstones(String assemblyLineName,
String configID,
int recentNumberOfTombstones)
throws DIException
assemblyLineName - The name of the AssemblyLine.configID - The name of the AssmeblyLine's configuration.recentNumberOfTombstones - The recent n number of tombstones to be returned.
DIException
public Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName,
String aConfigID)
throws DIException
aAssemblyLineName - The name of the AssemblyLine whose tombstones will be
extracted.aConfigID - The AssemblyLine's configuration.
DIException
public Tombstone[] getAssemblyLineTombstones(String aAssemblyLineName,
String aConfigID,
Date aStartTime,
Date aEndTime)
throws DIException
aAssemblyLineName - The name of the AssemblyLine whose tombstones will be
extracted.aConfigID - The AssemblyLine's configuration.aStartTime - The start time of the period for which tombstones are
retrieved.aEndTime - The end time of the period for which tombstones are retrieved.
DIException
public Tombstone[] getConfigInstanceTombstones(String aConfigID)
throws DIException
aConfigID - The configuration ID.
DIException
public Tombstone[] getConfigInstanceTombstones(String aConfigID,
Date aStartTime,
Date aEndTime)
throws DIException
aConfigID - The configuration ID.aStartTime - The start time of the period for which tombstone records are
retrieved.aEndTime - The end time of the period for which tombstone records are
retrieved.
DIException
public Tombstone[] getTombstones(Date aStartTime,
Date aEndTime)
throws DIException
aStartTime - The start time of the period for which tombstone records are
retrieved.aEndTime - The end time of the period for which tombstone records are
retrieved.
DIException
public int deleteTombstones(int aDaysCount)
throws DIException
aDaysCount - Number of days.
DIException - if an error occurs.
public int keepMostRecentTombstones(int aRecentTombstonesToKeep)
throws DIException
aRecentTombstonesToKeep - number of recent tombstones to keep.
DIException
public int deleteALTombstones(String aAssemblyLineName,
String aConfigID)
throws DIException
aAssemblyLineName - The name of the AssemblyLine.aConfigID - The AssmeblyLine configuration.
DIException - if an error occurs.
public int deleteALTombstones(String aAssemblyLineName,
String aConfigID,
int aDays)
throws DIException
aAssemblyLineName - The name of the AssemblyLine.aConfigID - The AssemblyLine configuration.aDays - Number of days.
DIException - if an error occurs.
public int deleteALTombstones(String aAssemblyLineName,
String aConfigID,
Date olderThanDate)
throws DIException
aAssemblyLineName - The name of the AssemblyLine.aConfigID - The AssemblyLine configuration.olderThanDate - Date
DIException - if an error occurs.
public int deleteALTombstones(String aAssemblyLineName,
String aConfigID,
Date startDate,
Date endDate)
throws DIException
Date range.
aAssemblyLineName - The name of the AssemblyLine.aConfigID - The AssemblyLine configuration.startDate - DateendDate - Date
DIException - if an error occurs.
public int keepMostRecentALTombstones(String aAssemblyLineName,
String aConfigID,
int aRecentTombstonesToKeep)
throws DIException
aAssemblyLineName - The name of the AssemblyLine whose tombstone records will be
deleted.aConfigID - The AssemblyLine configuration.aRecentTombstonesToKeep - Number of recent tombstones to keep.
DIException
public int deleteCITombstones(String aConfigID)
throws DIException
aConfigID - The configuration ID.
DIException - if an error occurs.
public int deleteCITombstones(String aConfigID,
int aDays)
throws DIException
aConfigID - The configuration ID.aDays - Number of days.
DIException - if an error occurs.
public int keepMostRecentCITombstones(String aConfigID,
int aRecentTombstonesToKeep)
throws DIException
aConfigID - The configuration ID.aRecentTombstonesToKeep - The number of most recent tombstones to keep.
DIException
public boolean deleteTombstone(String aGUID)
throws DIException
aGUID - The GUID of the tombstone to delete.
DIException - if an error occurs.public void setConnection(Connection aConnection)
aConnection - the connection to use.public Connection getConnection()
public int getTombstonesCount()
throws DIException
DIException - if an error occurs.
protected void doInsert(int aComponentTypeID,
int aEventTypeID,
long aStartTime,
long aCreatedOn,
String aComponentName,
String aConfiguration,
int aExitCode,
String aErrorDescr,
String aGUID,
byte[] aStats,
String aUserMessage)
throws DIException
aComponentTypeID - the type of the component.aEventTypeID - the type of the event.aStartTime - the time the component was started.aCreatedOn - the time the component was created.aComponentName - the name of the component.aConfiguration - the configuration id of the configInstance the AL was started
in.aExitCode - the code the component exited with.aErrorDescr - the description of the error (if any) the component ended
with.aGUID - the globally unique identifier of the tombstone.aStats - the statistics as a serialized Entry object.aUserMessage - the user message.
DIException - if an error occurs.
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||