Class JESpace.GCRef

java.lang.Object
org.jpos.space.JESpace.GCRef
Enclosing class:
JESpace<K,V>

@Entity public static class JESpace.GCRef extends Object
Persistent entity used by the garbage collector to track expiring Ref entries.
Since:
1.6.5
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor required by BerkeleyDB JE.
    GCRef(long id, long expires)
    Constructs a GCRef for the given Ref id and expiration time.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the expiration timestamp in epoch milliseconds.
    long
    Returns the id of the corresponding Ref entry.
    boolean
    Returns true if the expiration time has passed.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GCRef

      public GCRef()
      Default constructor required by BerkeleyDB JE.
    • GCRef

      public GCRef(long id, long expires)
      Constructs a GCRef for the given Ref id and expiration time.
      Parameters:
      id - the id of the Ref to be collected
      expires - the expiration timestamp in epoch milliseconds
  • Method Details

    • getId

      public long getId()
      Returns the id of the corresponding Ref entry.
      Returns:
      the Ref primary key
    • isExpired

      public boolean isExpired()
      Returns true if the expiration time has passed.
      Returns:
      true if this GCRef is expired
    • getExpiration

      public long getExpiration()
      Returns the expiration timestamp in epoch milliseconds.
      Returns:
      expiration time