ostore.cache
Class CacheNotify

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

public class CacheNotify
extends Object
implements QueueElementIF

CacheNofity is sent by the cache to indicate the current state of a cache line. e.g. cache line has been INSERT, REMOVE, etc. into/from the cache.

USAGE

The recipient of the CacheNotify can use the notification to dispatch a publish, unpublish, etc.

Version:
$Id: CacheNotify.java,v 1.3 2004/05/13 20:13:30 hweather Exp $
Author:
Hakim Weatherspoon
See Also:
BufferCache, CacheManager

Field Summary
static int DISK_ONLY
           
static int FLUSHING_TO_DISK
           
static int INSERT
           
static int LOADING_FROM_DISK
           
static int MEM_AND_DISK
           
static int MEM_ONLY
           
static int REMOVE
           
 int state
          State of object in the cache.
static String[] STATE_STR
           
 
Method Summary
 CacheableIdentity getId()
          getId returns the id stored in the CacheNotify.
 int getState()
          getState returns the state of object in the cache.
 String toString()
          Specified by java.lang.Object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSERT

public static final int INSERT
See Also:
Constant Field Values

REMOVE

public static final int REMOVE
See Also:
Constant Field Values

MEM_ONLY

public static final int MEM_ONLY
See Also:
Constant Field Values

MEM_AND_DISK

public static final int MEM_AND_DISK
See Also:
Constant Field Values

FLUSHING_TO_DISK

public static final int FLUSHING_TO_DISK
See Also:
Constant Field Values

DISK_ONLY

public static final int DISK_ONLY
See Also:
Constant Field Values

LOADING_FROM_DISK

public static final int LOADING_FROM_DISK
See Also:
Constant Field Values

STATE_STR

public static final String[] STATE_STR

state

public int state
State of object in the cache. Either INSERT or REMOVE.

Method Detail

getId

public CacheableIdentity getId()
getId returns the id stored in the CacheNotify.

Returns:
the id of the object.

getState

public int getState()
getState returns the state of object in the cache. Either INSERT or REMOVE.

Returns:
State of object in the cache.

toString

public String toString()
Specified by java.lang.Object

Overrides:
toString in class Object