anon.infoservice
Class AbstractIDEntry

java.lang.Object
  extended by anon.infoservice.AbstractDatabaseEntry
      extended by anon.infoservice.AbstractIDEntry
Direct Known Subclasses:
InfoServiceIDEntry

public abstract class AbstractIDEntry
extends AbstractDatabaseEntry

This is used to store the IDs of recently added database entries, so that they are not added several times after they have expired.

Author:
Rolf Wendolsky

Field Summary
private  java.lang.String m_id
           
private  long m_lastUpdate
           
private  long m_versionNumber
           
 
Fields inherited from class anon.infoservice.AbstractDatabaseEntry
XML_ATTR_LAST_UPDATE, XML_LAST_UPDATE
 
Constructor Summary
AbstractIDEntry(AbstractDatabaseEntry a_entry, long a_expireTime)
           
 
Method Summary
 java.lang.String getId()
          Returns a unique ID for a database entry.
 long getLastUpdate()
          Returns the time in milliseconds when this db entry was created from the origin instance.
 long getVersionNumber()
          Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry).
 
Methods inherited from class anon.infoservice.AbstractDatabaseEntry
deletePersistence, getCreationTime, getExpireTime, isNewerThan, isPersistanceDeletionAllowed, isUserDefined, resetCreationTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_lastUpdate

private long m_lastUpdate

m_versionNumber

private long m_versionNumber

m_id

private java.lang.String m_id
Constructor Detail

AbstractIDEntry

public AbstractIDEntry(AbstractDatabaseEntry a_entry,
                       long a_expireTime)
Method Detail

getLastUpdate

public long getLastUpdate()
Description copied from class: AbstractDatabaseEntry
Returns the time in milliseconds when this db entry was created from the origin instance. Never (!) insert the local creation time here, as this will DoS the InfoServices in an endless loop.

Specified by:
getLastUpdate in class AbstractDatabaseEntry
Returns:
the time in milliseconds when this db entry was created from the origin instance

getVersionNumber

public long getVersionNumber()
Description copied from class: AbstractDatabaseEntry
Returns version number which is used to determine the more recent infoservice entry, if two entries are compared (higher version number -> more recent entry). Never (!) insert the local creation time here, as this will DoS the InfoServices in an endless loop.

Specified by:
getVersionNumber in class AbstractDatabaseEntry
Returns:
The version number for this entry.

getId

public java.lang.String getId()
Description copied from class: AbstractDatabaseEntry
Returns a unique ID for a database entry.

Specified by:
getId in class AbstractDatabaseEntry
Returns:
The ID of this database entry.