Package com.ibm.di.api.remote.impl
Class TombstoneManagerImpl
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- com.ibm.di.api.remote.impl.APIRemoteObject
-
- com.ibm.di.api.remote.impl.TombstoneManagerImpl
-
- All Implemented Interfaces:
TombstoneManager
,java.io.Serializable
,java.rmi.Remote
public class TombstoneManagerImpl extends APIRemoteObject implements TombstoneManager
Represents a TombstoneManager instance. Provides various methods to deal with Tombstones through remote session.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TombstoneManagerImpl
createInstance(TombstoneManager aLocalTombstoneManager, SessionImpl aSession)
Creates TombstoneManagerImpl instance.int
deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID)
Deletes all tombstones for specified AssemblyLine.int
deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, int aDays)
Deletes all tombstones for the specified AssemblyLine that are older than the specified number of days.int
deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, java.util.Date olderThan)
Deletes all tombstones for the specified AssemblyLine that are older than the specified number of days.int
deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, java.util.Date startDate, java.util.Date endDate)
Deletes all tombstones for the specified AssemblyLine that are in the specifiedDate
rangeint
deleteCITombstones(java.lang.String aConfigID)
Deletes all tombstones for specified Config Instance.int
deleteCITombstones(java.lang.String aConfigID, int aDays)
Deletes all tombstones for the specified Config Instance that are older than the specified number of days.boolean
deleteTombstone(java.lang.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.java.util.List<java.lang.String>
getAssemblyLineNames(java.lang.String configInstanceId)
Obtains a list of AssemblyLine Names of the AssemblyLines for which a tombstone has been created.Tombstone[]
getAssemblyLineTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID)
Returns all available tombstones for the specified AssemblyLine.Tombstone[]
getAssemblyLineTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, int aRecentNumberOfTombstones)
Returns the recent n number of tombsones for a specified AssemblyLine.Tombstone[]
getAssemblyLineTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, java.util.Date aStartTime, java.util.Date aEndTime)
Returns all available tombstones for the specified AssemblyLine with timestamps in the interval specified by aStartTime and aEndTime.java.util.List<java.lang.String>
getConfigInstanceIDs()
Obtains a list of IDs of configInstances for which a tombstone has been created.Tombstone[]
getConfigInstanceTombstones(java.lang.String aConfigID)
Returns all available tombstones for the specified Config Instance.Tombstone[]
getConfigInstanceTombstones(java.lang.String aConfigID, java.util.Date aStartTime, java.util.Date aEndTime)
Returns all available tombstones for the specified Config Instance with timestamps in the interval specified by aStartTime and aEndTime.Tombstone
getTombstone(java.lang.String aGUID)
Returns a single tombstone object uniquely identified by the specified GUID.Tombstone[]
getTombstones(java.util.Date aStartTime, java.util.Date aEndTime)
Returns all available tombstones with timestamps in the interval specified by aStartTime and aEndTime.boolean
hasTombstones(java.lang.String configInstanceId)
Checks whether there are tombstone records for a configInstance with the specified ID.boolean
hasTombstones(java.lang.String configInstanceId, java.lang.String alName)
Checks whether there are tombstone records for an AssemblyLine with the specified name.int
keepMostRecentALTombstones(java.lang.String aAssemblyLineName, java.lang.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(java.lang.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 java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Method Detail
-
getTombstone
public Tombstone getTombstone(java.lang.String aGUID) throws DIException, java.rmi.RemoteException
Returns a single tombstone object uniquely identified by the specified GUID.- Specified by:
getTombstone
in interfaceTombstoneManager
- Parameters:
aGUID
- Tombstone GUID.- Returns:
- the Tombstone object.
- Throws:
DIException
- if an error occurs while getting the Tombstone object.java.rmi.RemoteException
- if a communication-related exception occurs.
-
getAssemblyLineTombstones
public Tombstone[] getAssemblyLineTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID) throws DIException, java.rmi.RemoteException
Returns all available tombstones for the specified AssemblyLine.- Specified by:
getAssemblyLineTombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
getAssemblyLineTombstones
public Tombstone[] getAssemblyLineTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, int aRecentNumberOfTombstones) throws DIException, java.rmi.RemoteException
Returns the recent n number of tombsones for a specified AssemblyLine.- Specified by:
getAssemblyLineTombstones
in interfaceTombstoneManager
- Parameters:
aAssemblyLineName
- The name of the AssemblyLine.aConfigID
- The name of the AssmeblyLine's configuration.aRecentNumberOfTombstones
- The recent n number of tombsones to be returned.- Returns:
- an array of Tombstone objects.
- Throws:
DIException
- if an error occurs while getting the Tombstone objects.java.rmi.RemoteException
- if a communication-related exception occurs.
-
getAssemblyLineTombstones
public Tombstone[] getAssemblyLineTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, java.util.Date aStartTime, java.util.Date aEndTime) throws DIException, java.rmi.RemoteException
Returns all available tombstones for the specified AssemblyLine with timestamps in the interval specified by aStartTime and aEndTime.- Specified by:
getAssemblyLineTombstones
in interfaceTombstoneManager
- Parameters:
aAssemblyLineName
- The name of the AssemblyLine.aConfigID
- The name of the AssmeblyLine's configuration.aStartTime
- peroid 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
getConfigInstanceTombstones
public Tombstone[] getConfigInstanceTombstones(java.lang.String aConfigID) throws DIException, java.rmi.RemoteException
Returns all available tombstones for the specified Config Instance.- Specified by:
getConfigInstanceTombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
getConfigInstanceTombstones
public Tombstone[] getConfigInstanceTombstones(java.lang.String aConfigID, java.util.Date aStartTime, java.util.Date aEndTime) throws DIException, java.rmi.RemoteException
Returns all available tombstones for the specified Config Instance with timestamps in the interval specified by aStartTime and aEndTime.- Specified by:
getConfigInstanceTombstones
in interfaceTombstoneManager
- Parameters:
aConfigID
- The configuration name.aStartTime
- peroid 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
getTombstones
public Tombstone[] getTombstones(java.util.Date aStartTime, java.util.Date aEndTime) throws DIException, java.rmi.RemoteException
Returns all available tombstones with timestamps in the interval specified by aStartTime and aEndTime.- Specified by:
getTombstones
in interfaceTombstoneManager
- Parameters:
aStartTime
- peroid 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteTombstones
public int deleteTombstones(int aDays) throws DIException, java.rmi.RemoteException
Deletes all tombstones that are older than the specified number of days.- Specified by:
deleteTombstones
in interfaceTombstoneManager
- Parameters:
aDays
- Number of days.- Returns:
- The number of deleted tombstone records.
- Throws:
DIException
- if an error occurs while deleting Tombstone records.java.rmi.RemoteException
- if a communication-related exception occurs.
-
keepMostRecentTombstones
public int keepMostRecentTombstones(int aMostResentToKeep) throws DIException, java.rmi.RemoteException
After this method is executed only the aMostRecentToKeep most recent tombstone records are kept and all other are deleted.- Specified by:
keepMostRecentTombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteALTombstones
public int deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID) throws DIException, java.rmi.RemoteException
Deletes all tombstones for specified AssemblyLine.- Specified by:
deleteALTombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteALTombstones
public int deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, int aDays) throws DIException, java.rmi.RemoteException
Deletes all tombstones for the specified AssemblyLine that are older than the specified number of days.- Specified by:
deleteALTombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteALTombstones
public int deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, java.util.Date olderThan) throws DIException, java.rmi.RemoteException
Deletes all tombstones for the specified AssemblyLine that are older than the specified number of days.- Specified by:
deleteALTombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteALTombstones
public int deleteALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, java.util.Date startDate, java.util.Date endDate) throws DIException, java.rmi.RemoteException
Deletes all tombstones for the specified AssemblyLine that are in the specifiedDate
range- Specified by:
deleteALTombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
keepMostRecentALTombstones
public int keepMostRecentALTombstones(java.lang.String aAssemblyLineName, java.lang.String aConfigID, int aMostResentToKeep) throws DIException, java.rmi.RemoteException
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 interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteCITombstones
public int deleteCITombstones(java.lang.String aConfigID) throws DIException, java.rmi.RemoteException
Deletes all tombstones for specified Config Instance.- Specified by:
deleteCITombstones
in interfaceTombstoneManager
- Parameters:
aConfigID
- Configuration name.- Returns:
- The number of deleted tombstone records.
- Throws:
DIException
- if an error occurs while deleting Tombstone records.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteCITombstones
public int deleteCITombstones(java.lang.String aConfigID, int aDays) throws DIException, java.rmi.RemoteException
Deletes all tombstones for the specified Config Instance that are older than the specified number of days.- Specified by:
deleteCITombstones
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
keepMostRecentCITombstones
public int keepMostRecentCITombstones(java.lang.String aConfigID, int aMostResentToKeep) throws DIException, java.rmi.RemoteException
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 interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
deleteTombstone
public boolean deleteTombstone(java.lang.String aGUID) throws DIException, java.rmi.RemoteException
Deletes the tombstone with the specified GUID.- Specified by:
deleteTombstone
in interfaceTombstoneManager
- 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.java.rmi.RemoteException
- if a communication-related exception occurs.
-
createInstance
public static TombstoneManagerImpl createInstance(TombstoneManager aLocalTombstoneManager, SessionImpl aSession) throws DIException, java.rmi.RemoteException
Creates TombstoneManagerImpl instance.- Parameters:
aLocalTombstoneManager
- the local TombstoneManageraSession
- the session object- Returns:
- TombstoneManagerImpl object
- Throws:
DIException
- if Runtime or Security exception occursjava.rmi.RemoteException
- if a communication-related exception occurs.
-
getConfigInstanceIDs
public java.util.List<java.lang.String> getConfigInstanceIDs() throws DIException, java.rmi.RemoteException
Description copied from interface:TombstoneManager
Obtains a list of IDs of configInstances for which a tombstone has been created.- Specified by:
getConfigInstanceIDs
in interfaceTombstoneManager
- Returns:
- the list of configInstance IDs.
- Throws:
DIException
- if error occurs while obtaining the Config IDsjava.rmi.RemoteException
- if a communication-related exception occurs.
-
getAssemblyLineNames
public java.util.List<java.lang.String> getAssemblyLineNames(java.lang.String configInstanceId) throws DIException, java.rmi.RemoteException
Description copied from interface:TombstoneManager
Obtains a list of AssemblyLine Names of the AssemblyLines for which a tombstone has been created.- Specified by:
getAssemblyLineNames
in interfaceTombstoneManager
- Returns:
- the list of configInstance IDs.
- Throws:
DIException
- if error occurs while obtaining the AL namesjava.rmi.RemoteException
- if a communication-related exception occurs.
-
hasTombstones
public boolean hasTombstones(java.lang.String configInstanceId) throws DIException
Description copied from interface:TombstoneManager
Checks whether there are tombstone records for a configInstance with the specified ID.- Specified by:
hasTombstones
in interfaceTombstoneManager
- Returns:
- true if the configInstance has tombstones, false otherwise
- Throws:
DIException
- if error occurs while obtaining the Config IDs
-
hasTombstones
public boolean hasTombstones(java.lang.String configInstanceId, java.lang.String alName) throws DIException
Description copied from interface:TombstoneManager
Checks whether there are tombstone records for an AssemblyLine with the specified name.- Specified by:
hasTombstones
in interfaceTombstoneManager
- Returns:
- true if the AssemblyLine has tombstones, false otherwise
- Throws:
DIException
- if error occurs while obtaining the Config IDs
-
-