com.sun.sgs.impl.service.data
Class ReferenceTable

java.lang.Object
  extended by com.sun.sgs.impl.service.data.ReferenceTable

final class ReferenceTable
extends Object

Stores information about managed references within a particular transaction. This class is logically part of the ManagedReferenceImpl class.


Constructor Summary
ReferenceTable(boolean trackStaleObjects)
          Creates an instance of this class.
 
Method Summary
(package private)  void add(ManagedReferenceImpl<?> ref)
          Adds a new managed reference to this table.
(package private)  void checkAllState()
          Checks the consistency of this table, throwing an assertion error if a problem is found.
(package private)  ManagedReferenceImpl<?> find(long oid)
          Finds the managed reference associated with an object ID, returning null if no reference is found.
(package private)  ManagedReferenceImpl<?> find(ManagedObject object)
          Finds the managed reference associated with a managed object, returning null if no reference is found.
(package private)  FlushInfo flushModifiedObjects()
          Flushes all references.
(package private)  long nextNewObjectId(long oid)
          Returns the next object ID in the reference table of a newly created object, or -1 if none is found.
(package private)  void registerObject(ManagedReferenceImpl<?> ref)
          Updates this table for a reference that has been newly associated with an object.
(package private)  void remove(ManagedReferenceImpl<?> ref)
          Removes a managed reference from this table.
(package private)  void unregisterObject(ManagedObject object)
          Updates this table for a reference that is no longer associated with an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceTable

ReferenceTable(boolean trackStaleObjects)
Creates an instance of this class.

Parameters:
trackStaleObjects - whether to track stale objects
Method Detail

find

ManagedReferenceImpl<?> find(ManagedObject object)
Finds the managed reference associated with a managed object, returning null if no reference is found.


find

ManagedReferenceImpl<?> find(long oid)
Finds the managed reference associated with an object ID, returning null if no reference is found.


add

void add(ManagedReferenceImpl<?> ref)
Adds a new managed reference to this table.


registerObject

void registerObject(ManagedReferenceImpl<?> ref)
Updates this table for a reference that has been newly associated with an object.


unregisterObject

void unregisterObject(ManagedObject object)
Updates this table for a reference that is no longer associated with an object.


remove

void remove(ManagedReferenceImpl<?> ref)
Removes a managed reference from this table.


nextNewObjectId

long nextNewObjectId(long oid)
Returns the next object ID in the reference table of a newly created object, or -1 if none is found. Does not return IDs for removed objects. Specifying -1 requests the first ID.


flushModifiedObjects

FlushInfo flushModifiedObjects()
Flushes all references. Returns information about any objects found to be modified, or null if none were modified.


checkAllState

void checkAllState()
Checks the consistency of this table, throwing an assertion error if a problem is found.


RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved