space.nucleus
Class MetaEntry

java.lang.Object
  extended byspace.nucleus.MetaEntry

public class MetaEntry
extends java.lang.Object

Wraps entry objects with meta-information. Objects of this class are stored in tuple space and manage space ids.


Constructor Summary
MetaEntry(space.Entry entry, space.Transaction txn, long lease)
          Constructor.
 
Method Summary
 space.Entry getEntry()
          Gets the entry attribute.
 long getExpiration()
          Get the estimated time when the lease expires.
 long getId()
          Gets the space id of this entry.
 boolean isevictable(long now)
          Determines if a meta-entry can be evicted.
 boolean isupdated()
          Determines if a meta-entry can be evicted.
 void updateOccured()
          Get the estimated time when the lease expires.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaEntry

public MetaEntry(space.Entry entry,
                 space.Transaction txn,
                 long lease)
Constructor.

Parameters:
entry - Entry to wrap.
txn - Transaction governing this entry.
lease - Maximum lifetime in space.
Method Detail

getEntry

public space.Entry getEntry()
Gets the entry attribute.

Returns:
An entry.

isevictable

public boolean isevictable(long now)
Determines if a meta-entry can be evicted.

Parameters:
now - Time in millisecs.
Returns:
True if object's lease is up. Does not, however, remove entry from space.

isupdated

public boolean isupdated()
Determines if a meta-entry can be evicted.

Returns:
True if object's lease is up. Does not, however, remove entry from space.

updateOccured

public void updateOccured()
Get the estimated time when the lease expires.

Returns:
The estimated expiration time.

getId

public long getId()
Gets the space id of this entry.

Returns:
Space id of this entry.

getExpiration

public long getExpiration()
Get the estimated time when the lease expires.

Returns:
The estimated expiration time.