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, renameFromToInternal, supressEntry, synchronousWrites, truncate
allObjUids, fullCommitNeeded, initialise, isType, locateStore, revealedId, shareState, start, stop, storeDir, storeRoot, sync
public static final long LOG_SIZE
public LogStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException
ObjectStoreException
public int currentState(Uid objUid, String tName) throws ObjectStoreException
objUid
- The object to query.tName
- The type of the object to query.ObjectStoreException
public 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.ObjectStoreException
public boolean hide_state(Uid u, String tn) throws ObjectStoreException
RecoveryStore
u
- The object to work on.tn
- The type of the object to work on.true
if no errors occurred, false
otherwise.ObjectStoreException
public boolean reveal_state(Uid u, String tn) throws ObjectStoreException
RecoveryStore
u
- The object to work on.tn
- The type of the object to work on.true
if no errors occurred, false
otherwise.ObjectStoreException
public InputObjectState read_uncommitted(Uid u, String tn) throws ObjectStoreException
ParticipantStore
read_uncommitted
in interface ParticipantStore
read_uncommitted
in class FileSystemStore
u
- The object to work on.tn
- The type of the object to work on.ObjectStoreException
public boolean remove_uncommitted(Uid u, String tn) throws ObjectStoreException
ParticipantStore
remove_uncommitted
in interface ParticipantStore
remove_uncommitted
in class FileSystemStore
u
- The object to work on.tn
- The type of the object to work on.true
if no errors occurred, false
otherwise.ObjectStoreException
public boolean write_committed(Uid storeUid, String tName, OutputObjectState state) throws ObjectStoreException
TxLog
write_committed
in interface TxLog
write_committed
in class FileSystemStore
storeUid
- 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.ObjectStoreException
public boolean write_uncommitted(Uid u, String tn, OutputObjectState s) throws ObjectStoreException
ParticipantStore
write_uncommitted
in interface ParticipantStore
write_uncommitted
in class FileSystemStore
u
- 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.ObjectStoreException
public boolean allLogUids(String tName, InputObjectState state, int match) throws ObjectStoreException
ObjectStoreException
public boolean allObjUids(String tName, InputObjectState state, int match) throws ObjectStoreException
allObjUids
in interface RecoveryStore
allObjUids
in class FileSystemStore
tName
- 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.ObjectStoreException
protected boolean unlockAndClose(File fd, RandomAccessFile rf)
protected boolean write_state(Uid objUid, String tName, OutputObjectState state, int ft) throws ObjectStoreException
write_state
in class FileSystemStore
ObjectStoreException
protected InputObjectState read_state(Uid u, String tn, int s) throws ObjectStoreException
read_state
in class FileSystemStore
ObjectStoreException
protected boolean remove_state(Uid u, String tn, int s) throws ObjectStoreException
remove_state
in class FileSystemStore
ObjectStoreException
protected boolean lock(File fd, int lmode, boolean create)
FileSystemStore
lock
in class FileSystemStore
protected boolean unlock(File fd)
FileSystemStore
unlock
in class FileSystemStore
protected String genPathName(Uid objUid, String tName, int ft) throws ObjectStoreException
genPathName
in class FileSystemStore
ObjectStoreException
Copyright © 2021 JBoss by Red Hat. All rights reserved.