ostore.cache
Class CachePinnedRequest

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

public class CachePinnedRequest
extends Object
implements QueueElementIF

Version:
$Id: CachePinnedRequest.java,v 1.11 2004/03/23 03:04:57 hweather Exp $ Similar to CacheBlockRequestMessage, but returns a pinned handle. Asks the cache to get a specific block in the cache and pin it If not in the cache, will look for it in secondary storage (disk or database)
Author:
Larry Tung

Nested Class Summary
static class CachePinnedRequest.Local
          A simple class to store CachePinnedRequest's to send to another local stage.
 
Field Summary
 int cacheType
           
 int requestId
           
 SinkIF sink
           
 Object userData
           
 
Constructor Summary
CachePinnedRequest()
          create an empty request message
CachePinnedRequest(CacheableIdentity id, boolean useNetwork, boolean useDisk, SecureHash aguid, int requestId)
          ask the cache for a handle to the block with id
CachePinnedRequest(CacheableIdentity id, boolean useNetwork, boolean useDisk, SecureHash aguid, Object userData, SinkIF sink)
          ask the cache for a handle to the block with id
CachePinnedRequest(CacheableIdentity id, boolean useNetwork, int requestId)
          ask the cache for a handle to the block with id
CachePinnedRequest(CacheableIdentity id, boolean useNetwork, SecureHash aguid, int requestId)
          ask the cache for a handle to the block with id
CachePinnedRequest(CacheableIdentity id, int requestId)
          ask the cache for a handle to the block with id
CachePinnedRequest(CacheMissException cme, boolean useNetwork, boolean useDisk, SecureHash aguid, int requestId)
          ask the cache for a handle to the block with id
 
Method Summary
 SecureHash getAguid()
          getAguid returns A-GUID of the object that the block belongs.
 CacheableIdentity getID()
           
 int getRequestId()
           
 boolean getUseDisk()
          getUseDisk returns true if cache should automatically go to disk.
 boolean getUseNetwork()
          getUseNetwork returns true if cache should automatically go to network.
 void setAguid(SecureHash aguid)
          setAguid sets A-GUID of the object that the block belongs.
 void setID(CacheableIdentity id)
          set the CacheableIdentity id
 void setUseDisk(boolean useDisk)
          setUseDisk returns true if cache should automatically go to disk.
 void setUseNetwork(boolean useNetwork)
          setUseNetwork returns true if cache should automatically go to network.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

requestId

public int requestId

cacheType

public int cacheType

userData

public Object userData

sink

public SinkIF sink
Constructor Detail

CachePinnedRequest

public CachePinnedRequest()
create an empty request message


CachePinnedRequest

public CachePinnedRequest(CacheableIdentity id,
                          int requestId)
ask the cache for a handle to the block with id

Parameters:
requestId - name of stage making the request

CachePinnedRequest

public CachePinnedRequest(CacheableIdentity id,
                          boolean useNetwork,
                          int requestId)
ask the cache for a handle to the block with id

Parameters:
requestId - name of stage making the request

CachePinnedRequest

public CachePinnedRequest(CacheableIdentity id,
                          boolean useNetwork,
                          SecureHash aguid,
                          int requestId)
ask the cache for a handle to the block with id

Parameters:
requestId - name of stage making the request

CachePinnedRequest

public CachePinnedRequest(CacheableIdentity id,
                          boolean useNetwork,
                          boolean useDisk,
                          SecureHash aguid,
                          int requestId)
ask the cache for a handle to the block with id

Parameters:
requestId - name of stage making the request

CachePinnedRequest

public CachePinnedRequest(CacheMissException cme,
                          boolean useNetwork,
                          boolean useDisk,
                          SecureHash aguid,
                          int requestId)
ask the cache for a handle to the block with id

Parameters:
requestId - name of stage making the request

CachePinnedRequest

public CachePinnedRequest(CacheableIdentity id,
                          boolean useNetwork,
                          boolean useDisk,
                          SecureHash aguid,
                          Object userData,
                          SinkIF sink)
ask the cache for a handle to the block with id

Method Detail

setID

public void setID(CacheableIdentity id)
set the CacheableIdentity id


getID

public CacheableIdentity getID()

getUseNetwork

public boolean getUseNetwork()
getUseNetwork returns true if cache should automatically go to network.

Returns:
true if cache should automatically go to network, false otherwise.

setUseNetwork

public void setUseNetwork(boolean useNetwork)
setUseNetwork returns true if cache should automatically go to network.

Parameters:
useNetwork - = true if cache should automatically go to network, false otherwise.

getUseDisk

public boolean getUseDisk()
getUseDisk returns true if cache should automatically go to disk.

Returns:
true if cache should automatically go to disk, false otherwise.

setUseDisk

public void setUseDisk(boolean useDisk)
setUseDisk returns true if cache should automatically go to disk.

Parameters:
useDisk - = true if cache should automatically go to disk, false otherwise.

getAguid

public SecureHash getAguid()
getAguid returns A-GUID of the object that the block belongs.

Returns:
A-GUID of the object that the block belongs.

setAguid

public void setAguid(SecureHash aguid)
setAguid sets A-GUID of the object that the block belongs.

Parameters:
aguid - = A-GUID of the object that the block belongs.

getRequestId

public int getRequestId()

toString

public String toString()
Overrides:
toString in class Object