public abstract class FileSystemStore extends ObjectStore
Modifier and Type | Field and Description |
---|---|
protected boolean |
doSync |
protected boolean |
scanZeroLengthFiles |
protected boolean |
syncWrites |
_objectStoreRoot, shareStatus
Constructor and Description |
---|
FileSystemStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToCache(String fname) |
boolean |
allObjUids(String tName,
InputObjectState state,
int match)
Given a type name initialise the
state to contains all of
the Uids of objects of that type |
boolean |
allTypes(InputObjectState foundTypes)
Obtain all types of objects stored in the object store.
|
protected boolean |
allTypes(OutputObjectState foundTypes,
String root) |
protected boolean |
closeAndUnlock(File fd,
FileInputStream ifile,
FileOutputStream ofile)
Unlock and close the file.
|
protected boolean |
createHierarchy(String path)
Attempt to build up the object store in the file system dynamically.
|
protected boolean |
exists(String path)
If this object store implementation is exclusively working on a set of
object states, then this method will check a file cache first.
|
protected String |
genPathName(Uid objUid,
String tName,
int ostype) |
String |
getStoreName() |
protected boolean |
lock(File fd,
int lmode,
boolean create)
Lock the file in the object store.
|
protected File |
openAndLock(String fname,
int lmode,
boolean create) |
InputObjectState |
read_committed(Uid storeUid,
String tName)
Read the object's committed state.
|
protected abstract InputObjectState |
read_state(Uid u,
String tn,
int s) |
InputObjectState |
read_uncommitted(Uid storeUid,
String tName)
Read the object's shadowed state.
|
boolean |
remove_committed(Uid storeUid,
String tName)
Remove the object's committed state.
|
protected abstract boolean |
remove_state(Uid u,
String tn,
int s) |
boolean |
remove_uncommitted(Uid storeUid,
String tName)
Remove the object's uncommitted state.
|
protected void |
removeFromCache(String fname) |
protected void |
removeFromCache(String fname,
boolean warn)
Print a warning if the file to be removed is not in the cache.
|
protected boolean |
renameFromTo(File from,
File to) |
protected boolean |
renameFromToInternal(File from,
File to) |
protected boolean |
supressEntry(String name)
Suppress directories of the specified type from
allTypes etc?
|
protected boolean |
synchronousWrites()
Are synchronous write enabled?
|
protected String |
truncate(String value) |
protected boolean |
unlock(File fd)
Unlock the file in the object store.
|
boolean |
write_committed(Uid storeUid,
String tName,
OutputObjectState state)
Write a new copy of the object's committed state.
|
protected abstract boolean |
write_state(Uid u,
String tn,
OutputObjectState buff,
int s) |
boolean |
write_uncommitted(Uid storeUid,
String tName,
OutputObjectState state)
Write a copy of the object's uncommitted state.
|
allObjUids, fullCommitNeeded, initialise, isType, locateStore, revealedId, shareState, start, stop, storeDir, storeRoot, sync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commit_state
currentState, hide_state, reveal_state
protected boolean syncWrites
protected volatile boolean doSync
protected boolean scanZeroLengthFiles
public FileSystemStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException
ObjectStoreException
public String getStoreName()
public InputObjectState read_committed(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStore
storeUid
- The object to work on.tName
- The type of the object to work on.ObjectStoreException
public InputObjectState read_uncommitted(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStore
storeUid
- The object to work on.tName
- The type of the object to work on.ObjectStoreException
public boolean remove_committed(Uid storeUid, String tName) throws ObjectStoreException
TxLog
storeUid
- The object to work on.tName
- The type of the object to work on.true
if no errors occurred, false
otherwise.ObjectStoreException
public boolean remove_uncommitted(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStore
storeUid
- The object to work on.tName
- 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
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 storeUid, String tName, OutputObjectState state) throws ObjectStoreException
ParticipantStore
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 allObjUids(String tName, InputObjectState state, int match) throws ObjectStoreException
state
to contains all of
the Uids of objects of that typetName
- 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
public boolean allTypes(InputObjectState foundTypes) throws ObjectStoreException
RecoveryStore
foundTypes
- The state in which to store the types.true
if no errors occurred, false
otherwise.ObjectStoreException
protected abstract InputObjectState read_state(Uid u, String tn, int s) throws ObjectStoreException
ObjectStoreException
protected abstract boolean remove_state(Uid u, String tn, int s) throws ObjectStoreException
ObjectStoreException
protected abstract boolean write_state(Uid u, String tn, OutputObjectState buff, int s) throws ObjectStoreException
ObjectStoreException
protected final boolean synchronousWrites()
protected boolean lock(File fd, int lmode, boolean create)
protected boolean unlock(File fd)
protected boolean closeAndUnlock(File fd, FileInputStream ifile, FileOutputStream ofile)
protected File openAndLock(String fname, int lmode, boolean create) throws ObjectStoreException
ObjectStoreException
protected boolean allTypes(OutputObjectState foundTypes, String root) throws ObjectStoreException
ObjectStoreException
protected String genPathName(Uid objUid, String tName, int ostype) throws ObjectStoreException
ObjectStoreException
protected boolean supressEntry(String name)
ObjectStore
supressEntry
in class ObjectStore
protected final boolean createHierarchy(String path) throws ObjectStoreException
ObjectStoreException
protected final boolean exists(String path)
protected final void addToCache(String fname)
protected final void removeFromCache(String fname)
protected final void removeFromCache(String fname, boolean warn)
Copyright © 2021 JBoss by Red Hat. All rights reserved.