|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfabric.dissemination.pastry.Cache
public class Cache
The cache object used by the disseminator to store globs. Essentially a hashtable specialized for globs; it also fetches globs directly from stores when needed.
| Constructor Summary | |
|---|---|
Cache()
|
|
| Method Summary | |
|---|---|
Glob |
get(RemoteStore store,
long onum)
Retrieves a glob from the cache, without trying to fetch it from the store. |
Glob |
get(RemoteStore store,
long onum,
boolean fetch)
Retrieves a glob from the cache, or fetches it from the store. |
void |
put(RemoteStore store,
long onum,
Glob g)
Put given glob into the cache. |
java.util.List<Pair<Pair<Store,java.lang.Long>,java.lang.Long>> |
sortedTimestamps()
Returns a snapshot set of the timestamp for each OID currently in the cache. |
java.util.Set<Pair<Pair<Store,java.lang.Long>,java.lang.Long>> |
timestamps()
Returns a snapshot of the timestamp for each OID currently in the cache. |
boolean |
updateEntry(RemoteStore store,
long onum,
Glob g)
Updates a cache entry with the given glob. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Cache()
| Method Detail |
|---|
public Glob get(RemoteStore store,
long onum)
store - the store of the object to retrieve.onum - the onum of the object.
public Glob get(RemoteStore store,
long onum,
boolean fetch)
store - the store of the object to retrieve.onum - the onum of the object.fetch - true if we should fetch from store.
public void put(RemoteStore store,
long onum,
Glob g)
store - the store of the object.onum - the onum of the object.g - the glob.
public boolean updateEntry(RemoteStore store,
long onum,
Glob g)
public java.util.Set<Pair<Pair<Store,java.lang.Long>,java.lang.Long>> timestamps()
public java.util.List<Pair<Pair<Store,java.lang.Long>,java.lang.Long>> sortedTimestamps()
timestamps(), the returned set is not
backed by the underlying table.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||