ostore.cache
Class CacheBlockRequestMessage

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

public class CacheBlockRequestMessage
extends Object
implements QueueElementIF

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

Field Summary
 int cacheType
           
 int requestId
           
 
Constructor Summary
CacheBlockRequestMessage(CacheableIdentity id, boolean useNetwork, boolean useDisk, SecureHash aguid, int request_id)
           
CacheBlockRequestMessage(CacheableIdentity id, boolean useNetwork, int requestId)
          ask the cache for a handle to the block with id
CacheBlockRequestMessage(CacheableIdentity id, boolean useNetwork, SecureHash aguid, int request_id)
           
CacheBlockRequestMessage(CacheableIdentity id, int requestId)
          ask the cache for a handle to the block with id
CacheBlockRequestMessage(CacheMissException cme, boolean useNetwork, boolean useDisk, SecureHash aguid, int request_id)
           
CacheBlockRequestMessage(CacheMissException cme, boolean useNetwork, int requestId)
           
CacheBlockRequestMessage(CacheMissException cme, boolean useNetwork, SecureHash aguid, int request_id)
           
CacheBlockRequestMessage(CacheMissException cme, int requestId)
           
 
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
Constructor Detail

CacheBlockRequestMessage

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

Parameters:
requestId - name of stage making the request

CacheBlockRequestMessage

public CacheBlockRequestMessage(CacheMissException cme,
                                int requestId)

CacheBlockRequestMessage

public CacheBlockRequestMessage(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

CacheBlockRequestMessage

public CacheBlockRequestMessage(CacheMissException cme,
                                boolean useNetwork,
                                int requestId)

CacheBlockRequestMessage

public CacheBlockRequestMessage(CacheableIdentity id,
                                boolean useNetwork,
                                SecureHash aguid,
                                int request_id)

CacheBlockRequestMessage

public CacheBlockRequestMessage(CacheMissException cme,
                                boolean useNetwork,
                                SecureHash aguid,
                                int request_id)

CacheBlockRequestMessage

public CacheBlockRequestMessage(CacheableIdentity id,
                                boolean useNetwork,
                                boolean useDisk,
                                SecureHash aguid,
                                int request_id)

CacheBlockRequestMessage

public CacheBlockRequestMessage(CacheMissException cme,
                                boolean useNetwork,
                                boolean useDisk,
                                SecureHash aguid,
                                int request_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