com.ibm.di.api.remote.impl
Class TombstoneManagerImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by com.ibm.di.api.remote.impl.APIRemoteObject
                  extended by com.ibm.di.api.remote.impl.TombstoneManagerImpl
All Implemented Interfaces:
TombstoneManager, Serializable, 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

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Method Summary
static TombstoneManagerImpl createInstance(TombstoneManager aLocalTombstoneManager, SessionImpl aSession)
          Creates TombstoneManagerImpl instance.
 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 number of days.
 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 tombsones 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.
 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.
 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 java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getTombstone

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

Specified by:
getTombstone in interface TombstoneManager
Parameters:
aGUID - Tombstone GUID.
Returns:
the Tombstone object.
Throws:
DIException - if an error occurs while getting the Tombstone object.
RemoteException - if a communication-related exception occurs.

getAssemblyLineTombstones

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

Specified by:
getAssemblyLineTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

getAssemblyLineTombstones

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

Specified by:
getAssemblyLineTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

getAssemblyLineTombstones

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

Specified by:
getAssemblyLineTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

getConfigInstanceTombstones

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

Specified by:
getConfigInstanceTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

getConfigInstanceTombstones

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

Specified by:
getConfigInstanceTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

getTombstones

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

Specified by:
getTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

deleteTombstones

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

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

keepMostRecentTombstones

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

Specified by:
keepMostRecentTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

deleteALTombstones

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

Specified by:
deleteALTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

deleteALTombstones

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

Specified by:
deleteALTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

deleteALTombstones

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

Specified by:
deleteALTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

deleteALTombstones

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

Specified by:
deleteALTombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

keepMostRecentALTombstones

public int keepMostRecentALTombstones(String aAssemblyLineName,
                                      String aConfigID,
                                      int aMostResentToKeep)
                               throws DIException,
                                      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 interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

deleteCITombstones

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

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

deleteCITombstones

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

Specified by:
deleteCITombstones in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

keepMostRecentCITombstones

public int keepMostRecentCITombstones(String aConfigID,
                                      int aMostResentToKeep)
                               throws DIException,
                                      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 interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

deleteTombstone

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

Specified by:
deleteTombstone in interface TombstoneManager
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.
RemoteException - if a communication-related exception occurs.

createInstance

public static TombstoneManagerImpl createInstance(TombstoneManager aLocalTombstoneManager,
                                                  SessionImpl aSession)
                                           throws DIException,
                                                  RemoteException
Creates TombstoneManagerImpl instance.

Parameters:
aLocalTombstoneManager - the local TombstoneManager
aSession - the session object
Returns:
TombstoneManagerImpl object
Throws:
DIException - if Runtime or Security exception occurs
RemoteException - if a communication-related exception occurs.