ostore.cache
Class CacheAssignRequest

java.lang.Object
  |
  +--ostore.cache.CacheAssignRequest
All Implemented Interfaces:
QueueElementIF

public class CacheAssignRequest
extends Object
implements QueueElementIF

A request to the cache to assign an identity and/or cacheable to some pins.

Version:
$Id: CacheAssignRequest.java,v 1.2 2004/03/23 03:04:57 hweather Exp $
Author:
Hakim Weatherspoon

Field Summary
 int cacheType
          The type of cache.
 int requestId
          The requesting stage, a constant from StageId.
 
Constructor Summary
CacheAssignRequest(CacheablePinned[] handles, CacheableIdentity[] identifiers, Cacheable[] cacheables, SecureHash uniqueId, int requestId)
          Creates a request to unpin several handles.
CacheAssignRequest(CacheablePinned handle, CacheableIdentity identifier, Cacheable cacheable, SecureHash uniqueId, int requestId)
          Creates a request to assign a single handle.
 
Method Summary
 Cacheable[] getCacheables()
          Returns the array of cacheables to assign.
 CacheablePinned[] getHandles()
          Returns the array of handles to be assigned.
 CacheableIdentity[] getIdentifiers()
          Returns the array of identifiers to assign.
 SecureHash getUniqueId()
          Returns the unique identifier for the CacheAssignRequest
 String toString()
          Returns a human-readable representation of this CacheAssignRequest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

requestId

public int requestId
The requesting stage, a constant from StageId.


cacheType

public int cacheType
The type of cache. (e.g. BlockBufferCache, DisseminatableCache, etc).

Constructor Detail

CacheAssignRequest

public CacheAssignRequest(CacheablePinned handle,
                          CacheableIdentity identifier,
                          Cacheable cacheable,
                          SecureHash uniqueId,
                          int requestId)
Creates a request to assign a single handle.


CacheAssignRequest

public CacheAssignRequest(CacheablePinned[] handles,
                          CacheableIdentity[] identifiers,
                          Cacheable[] cacheables,
                          SecureHash uniqueId,
                          int requestId)
Creates a request to unpin several handles.

Method Detail

getHandles

public CacheablePinned[] getHandles()
Returns the array of handles to be assigned.


getIdentifiers

public CacheableIdentity[] getIdentifiers()
Returns the array of identifiers to assign.


getCacheables

public Cacheable[] getCacheables()
Returns the array of cacheables to assign.


getUniqueId

public SecureHash getUniqueId()
Returns the unique identifier for the CacheAssignRequest

Returns:
unique identifier.

toString

public String toString()
Returns a human-readable representation of this CacheAssignRequest.

Overrides:
toString in class Object