ostore.update
Class VersionHandleCache

java.lang.Object
  |
  +--ostore.update.VersionHandleCache

public class VersionHandleCache
extends Object

The VersionHandleCache is a temporary store of pinned cache handles to data objects that have been modified by an update. When a single update accesses a data object more than once (because more than one action modifies the object or an action is interrupted and restarted), the update must be able to retrieve the handle to the modified object. An object modified by a partially completed update does not, however, have a permanent name for insertion into the cache. The version_cache stores handles to the modified data objects that can not yet be inserted in the cache so that they can be retrieved on restart.

Version:
$Id: VersionHandleCache.java,v 1.4 2001/10/18 00:20:03 eaton Exp $
Author:
Patrick R. Eaton

Constructor Summary
VersionHandleCache()
          Construct a VersionHandleCache.
 
Method Summary
 void cacheVersionHandle(SecureHash aguid, CacheablePinned handle)
          Stores a pinned cache handle for a partially modified data object.
 Enumeration getModifiedDataObjects()
          Returns an enumeration of all data objects for which this object stores a pinned cache handle.
 CacheablePinned getVersionHandle(SecureHash aguid)
          Returns a pinned cache handle to the modified version of the data object identified by an Aguid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionHandleCache

public VersionHandleCache()
Construct a VersionHandleCache.

Method Detail

getVersionHandle

public CacheablePinned getVersionHandle(SecureHash aguid)
Returns a pinned cache handle to the modified version of the data object identified by an Aguid.

Parameters:
aguid - the Aguid of the data object
Returns:
a pinned cache handle to the modified version of the data object, or null if the data object has not yet been modified

cacheVersionHandle

public void cacheVersionHandle(SecureHash aguid,
                               CacheablePinned handle)
Stores a pinned cache handle for a partially modified data object.

Parameters:
aguid - the aguid of the data object
handle - the pinned cache handle that refers to the partially modified version of the data object

getModifiedDataObjects

public Enumeration getModifiedDataObjects()
Returns an enumeration of all data objects for which this object stores a pinned cache handle. Upon completion of an update, this will return all data objects that were modified and need to be committed and disseminated.

Returns:
an enumeration of all data objects for which this cache stores a handle to a modified version