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 |
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, syncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcommit_statecurrentState, hide_state, reveal_stateprotected boolean syncWrites
protected volatile boolean doSync
protected boolean scanZeroLengthFiles
public FileSystemStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException
ObjectStoreExceptionpublic String getStoreName()
public InputObjectState read_committed(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStorestoreUid - The object to work on.tName - The type of the object to work on.ObjectStoreExceptionpublic InputObjectState read_uncommitted(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStorestoreUid - The object to work on.tName - The type of the object to work on.ObjectStoreExceptionpublic boolean remove_committed(Uid storeUid, String tName) throws ObjectStoreException
TxLogstoreUid - The object to work on.tName - The type of the object to work on.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic boolean remove_uncommitted(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStorestoreUid - The object to work on.tName - 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
TxLogstoreUid - 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 storeUid, String tName, OutputObjectState state) throws ObjectStoreException
ParticipantStorestoreUid - 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 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.ObjectStoreExceptionpublic boolean allTypes(InputObjectState foundTypes) throws ObjectStoreException
RecoveryStorefoundTypes - The state in which to store the types.true if no errors occurred, false
otherwise.ObjectStoreExceptionprotected abstract InputObjectState read_state(Uid u, String tn, int s) throws ObjectStoreException
ObjectStoreExceptionprotected abstract boolean remove_state(Uid u, String tn, int s) throws ObjectStoreException
ObjectStoreExceptionprotected abstract boolean write_state(Uid u, String tn, OutputObjectState buff, int s) throws ObjectStoreException
ObjectStoreExceptionprotected 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
ObjectStoreExceptionprotected boolean allTypes(OutputObjectState foundTypes, String root) throws ObjectStoreException
ObjectStoreExceptionprotected String genPathName(Uid objUid, String tName, int ostype) throws ObjectStoreException
ObjectStoreExceptionprotected boolean supressEntry(String name)
ObjectStoresupressEntry in class ObjectStoreprotected final boolean createHierarchy(String path) throws ObjectStoreException
ObjectStoreExceptionprotected 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 © 2013. All rights reserved.