public class Cache
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Cache.Entry |
Constructor and Description |
---|
Cache() |
Modifier and Type | Method and Description |
---|---|
Cache.Entry |
get(RemoteStore store,
long onum)
Retrieves a glob from the cache, without trying to fetch it from the store.
|
Cache.Entry |
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,
ObjectGlob g)
Put given glob into the cache.
|
java.util.List<Pair<Pair<RemoteStore,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<RemoteStore,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,
ObjectGlob g)
Updates the dissemination and worker cache with the given object glob.
|
public Cache.Entry get(RemoteStore store, long onum)
store
- the store of the object to retrieve.onum
- the onum of the object.public Cache.Entry get(RemoteStore store, long onum, boolean fetch)
store
- the store of the object to retrieve.onum
- the onum of the object.fetch
- whether the glob should be should fetched from store in the event
of a cache miss.public void put(RemoteStore store, long onum, ObjectGlob g)
store
- the store of the object.onum
- the onum of the object.g
- the glob.public boolean updateEntry(RemoteStore store, long onum, ObjectGlob g)
public java.util.Set<Pair<Pair<RemoteStore,java.lang.Long>,java.lang.Long>> timestamps()
public java.util.List<Pair<Pair<RemoteStore,java.lang.Long>,java.lang.Long>> sortedTimestamps()
timestamps()
, the returned set is not
backed by the underlying table.