public final class LocalStore extends java.lang.Object implements Store, java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
LocalStore()
The singleton LocalStore object is managed by the Worker class.
|
Modifier and Type | Method and Description |
---|---|
void |
abortTransaction(TransactionID tid)
Notifies the store that the transaction is being Aborted.
|
void |
addLocalDelegation(Principal p,
Principal q) |
void |
cache(Object._Impl impl)
Adds the given object to the cache.
|
ObjectCache.Entry |
cache(SerializedObject obj)
Adds the given object to the cache.
|
boolean |
checkForStaleObjects(LongKeyMap<java.lang.Integer> reads)
Determines whether the given set of objects are stale.
|
void |
commitTransaction(long transactionID)
Notifies the Store that the transaction should be committed.
|
long |
createOnum()
Obtains a new, unused object number from the Store.
|
void |
evict(long onum)
Evicts the object with the given onum from cache.
|
ConfPolicy |
getBottomConfidPolicy() |
IntegPolicy |
getBottomIntegPolicy() |
Label |
getEmptyLabel() |
NodePrincipal |
getPrincipal()
Returns the NodePrincipal associated with this store.
|
Label |
getPublicReadonlyLabel() |
Map |
getRoot()
Returns the root map of the Store
|
ConfPolicy |
getTopConfidPolicy() |
IntegPolicy |
getTopIntegPolicy() |
Principal |
getTopPrincipal() |
int |
hashCode() |
void |
initialize() |
boolean |
isLocalStore()
Determines whether this is the local store.
|
boolean |
localDelegatesTo(Principal p,
Principal q) |
java.lang.String |
name()
Returns this store's host name.
|
void |
prepareTransaction(long tid,
boolean singleStore,
boolean readOnly,
java.util.Collection<Object._Impl> toCreate,
LongKeyMap<java.lang.Integer> reads,
java.util.Collection<Object._Impl> writes)
Notifies the store that the transaction is entering the Prepare phase.
|
ObjectCache.Entry |
readFromCache(long onum)
Returns the cache entry for the given onum.
|
ObjectCache.Entry |
readObject(long onum)
Returns the cache entry for the given onum.
|
ObjectCache.Entry |
readObjectNoDissem(long onum)
Returns the cache entry for the requested object.
|
void |
removeLocalDelegation(Principal p,
Principal q) |
java.lang.String |
toString() |
protected LocalStore()
fabric.worker.Worker.getLocalStore
public void prepareTransaction(long tid, boolean singleStore, boolean readOnly, java.util.Collection<Object._Impl> toCreate, LongKeyMap<java.lang.Integer> reads, java.util.Collection<Object._Impl> writes)
Store
prepareTransaction
in interface Store
public void abortTransaction(TransactionID tid)
Store
abortTransaction
in interface Store
tid
- the ID of the aborting transaction. This is assumed to specify a
top-level transaction.public void commitTransaction(long transactionID)
Store
commitTransaction
in interface Store
transactionID
- the ID of the transaction to commitpublic long createOnum()
Store
createOnum
in interface Store
public ObjectCache.Entry readObject(long onum)
Store
readObject
in interface Store
onum
- The identifier of the requested objectpublic ObjectCache.Entry readObjectNoDissem(long onum)
Store
readObjectNoDissem
in interface Store
onum
- The identifier of the requested objectpublic ObjectCache.Entry readFromCache(long onum)
Store
readFromCache
in interface Store
onum
- The identifier of the requested object.public boolean checkForStaleObjects(LongKeyMap<java.lang.Integer> reads)
Store
checkForStaleObjects
in interface Store
public java.lang.String toString()
toString
in class java.lang.Object
public Map getRoot()
Store
public Principal getTopPrincipal()
public ConfPolicy getTopConfidPolicy()
public ConfPolicy getBottomConfidPolicy()
public IntegPolicy getTopIntegPolicy()
public IntegPolicy getBottomIntegPolicy()
public Label getEmptyLabel()
public Label getPublicReadonlyLabel()
public java.lang.String name()
Store
public NodePrincipal getPrincipal()
Store
getPrincipal
in interface Store
public boolean isLocalStore()
Store
isLocalStore
in interface Store
public int hashCode()
hashCode
in class java.lang.Object
public void evict(long onum)
Store
public void cache(Object._Impl impl)
Store
public ObjectCache.Entry cache(SerializedObject obj)
Store
public void initialize()