public class LogStore extends FileSystemStore
| Modifier and Type | Field and Description |
|---|---|
static long |
LOG_SIZE |
doSync, scanZeroLengthFiles, syncWrites_objectStoreRoot, shareStatus| Constructor and Description |
|---|
LogStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allLogUids(String tName,
InputObjectState state,
int match) |
boolean |
allObjUids(String tName,
InputObjectState state,
int match)
This is a recovery-only method and should not be called during normal
execution.
|
boolean |
commit_state(Uid objUid,
String tName)
Commit a previous write_state operation which was made with the SHADOW
StateType argument.
|
int |
currentState(Uid objUid,
String tName)
Normally returns the current state of the log entry.
|
protected String |
genPathName(Uid objUid,
String tName,
int ft) |
boolean |
hide_state(Uid u,
String tn)
Hide the object's state in the object store.
|
protected boolean |
lock(File fd,
int lmode,
boolean create)
Lock the file in the object store.
|
protected InputObjectState |
read_state(Uid u,
String tn,
int s)
Shouldn't be called during normal execution only during recovery.
|
InputObjectState |
read_uncommitted(Uid u,
String tn)
Read the object's shadowed state.
|
protected boolean |
remove_state(Uid u,
String tn,
int s)
Does nothing except indicate that this thread is finished with the log on
behalf of this transaction.
|
boolean |
remove_uncommitted(Uid u,
String tn)
Remove the object's uncommitted state.
|
boolean |
reveal_state(Uid u,
String tn)
Reveal a hidden object's state.
|
protected boolean |
unlock(File fd)
Unlock the file in the object store.
|
protected boolean |
unlockAndClose(File fd,
RandomAccessFile rf)
Unlock and close the file.
|
boolean |
write_committed(Uid storeUid,
String tName,
OutputObjectState state)
Write a new copy of the object's committed state.
|
protected boolean |
write_state(Uid objUid,
String tName,
OutputObjectState state,
int ft)
write_state saves the ObjectState in a file named by the type and Uid of
the ObjectState.
|
boolean |
write_uncommitted(Uid u,
String tn,
OutputObjectState s)
Write a copy of the object's uncommitted state.
|
addToCache, allTypes, allTypes, closeAndUnlock, createHierarchy, exists, getStoreName, openAndLock, read_committed, remove_committed, removeFromCache, removeFromCache, renameFromTo, supressEntry, synchronousWrites, truncateallObjUids, fullCommitNeeded, initialise, isType, locateStore, revealedId, shareState, start, stop, storeDir, storeRoot, syncpublic static final long LOG_SIZE
public LogStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException
ObjectStoreExceptionpublic int currentState(Uid objUid, String tName) throws ObjectStoreException
objUid - The object to query.tName - The type of the object to query.ObjectStoreExceptionpublic boolean commit_state(Uid objUid, String tName) throws ObjectStoreException
objUid - The object to work on.tName - The type of the object to work on.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic boolean hide_state(Uid u, String tn) throws ObjectStoreException
RecoveryStoreu - The object to work on.tn - The type of the object to work on.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic boolean reveal_state(Uid u, String tn) throws ObjectStoreException
RecoveryStoreu - The object to work on.tn - The type of the object to work on.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic InputObjectState read_uncommitted(Uid u, String tn) throws ObjectStoreException
ParticipantStoreread_uncommitted in interface ParticipantStoreread_uncommitted in class FileSystemStoreu - The object to work on.tn - The type of the object to work on.ObjectStoreExceptionpublic boolean remove_uncommitted(Uid u, String tn) throws ObjectStoreException
ParticipantStoreremove_uncommitted in interface ParticipantStoreremove_uncommitted in class FileSystemStoreu - The object to work on.tn - The type of the object to work on.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic boolean write_committed(Uid storeUid, String tName, OutputObjectState state) throws ObjectStoreException
TxLogwrite_committed in interface TxLogwrite_committed in class FileSystemStorestoreUid - The object to work on.tName - The type of the object to work on.state - The state to write.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic boolean write_uncommitted(Uid u, String tn, OutputObjectState s) throws ObjectStoreException
ParticipantStorewrite_uncommitted in interface ParticipantStorewrite_uncommitted in class FileSystemStoreu - The object to work on.tn - The type of the object to work on.s - The state to write.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic boolean allLogUids(String tName, InputObjectState state, int match) throws ObjectStoreException
ObjectStoreExceptionpublic boolean allObjUids(String tName, InputObjectState state, int match) throws ObjectStoreException
allObjUids in interface RecoveryStoreallObjUids in class FileSystemStoretName - The type to scan for.state - The object state in which to store the Uidsmatch - The file type to look for (e.g., committed, shadowed). [StateStatus]true if no errors occurred, false
otherwise.ObjectStoreExceptionprotected boolean unlockAndClose(File fd, RandomAccessFile rf)
protected boolean write_state(Uid objUid, String tName, OutputObjectState state, int ft) throws ObjectStoreException
write_state in class FileSystemStoreObjectStoreExceptionprotected InputObjectState read_state(Uid u, String tn, int s) throws ObjectStoreException
read_state in class FileSystemStoreObjectStoreExceptionprotected boolean remove_state(Uid u, String tn, int s) throws ObjectStoreException
remove_state in class FileSystemStoreObjectStoreExceptionprotected boolean lock(File fd, int lmode, boolean create)
FileSystemStorelock in class FileSystemStoreprotected boolean unlock(File fd)
FileSystemStoreunlock in class FileSystemStoreprotected String genPathName(Uid objUid, String tName, int ft) throws ObjectStoreException
genPathName in class FileSystemStoreObjectStoreExceptionCopyright © 2013. All rights reserved.