Class HashedStore
java.lang.Object
com.arjuna.ats.arjuna.objectstore.ObjectStore
com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore
com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore
com.arjuna.ats.internal.arjuna.objectstore.ShadowNoFileLockStore
com.arjuna.ats.internal.arjuna.objectstore.HashedStore
- All Implemented Interfaces:
BaseStore
,ObjectStoreAPI
,ParticipantStore
,RecoveryStore
,TxLog
- Direct Known Subclasses:
CacheStore
,HashedActionStore
The basic shadowing store implementations store the object states in
a separate file within the same directory in the object store, determined
by the object's type. However, as the number of file entries within the
directory increases, so does the search time for finding a specific file.
The HashStore implementation hashes object states over many different
sub-directories to attempt to keep the number of files in a given
directory low, thus improving performance as the number of object states
grows.
- Since:
- JTS 2.0.
- Version:
- $Id: HashedStore.java 2342 2006-03-30 13:06:17Z $
- Author:
- Mark Little (mark@arjuna.com)
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final char
Fields inherited from class com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore
HIDDINGCHAR
Fields inherited from class com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore
doSync, scanZeroLengthFiles, syncWrites
Fields inherited from class com.arjuna.ats.arjuna.objectstore.ObjectStore
_objectStoreRoot, shareStatus
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allObjUids
(String tName, InputObjectState state, int match) Given a type name initialisestate
to contains all of the Uids of objects of that typeprotected String
genPathName
(Uid objUid, String tName, int otype) protected String
Methods inherited from class com.arjuna.ats.internal.arjuna.objectstore.ShadowNoFileLockStore
lock, unlock
Methods inherited from class com.arjuna.ats.internal.arjuna.objectstore.ShadowingStore
commit_state, currentState, hide_state, read_state, remove_state, reveal_state, revealedId, write_state
Methods inherited from class com.arjuna.ats.internal.arjuna.objectstore.FileSystemStore
addToCache, allTypes, allTypes, closeAndUnlock, createHierarchy, exists, getStoreName, openAndLock, read_committed, read_uncommitted, remove_committed, remove_uncommitted, removeFromCache, removeFromCache, renameFromTo, renameFromToInternal, supressEntry, synchronousWrites, write_committed, write_uncommitted
Methods inherited from class com.arjuna.ats.arjuna.objectstore.ObjectStore
allObjUids, fullCommitNeeded, initialise, isType, locateStore, shareState, start, stop, storeDir, storeRoot, sync
-
Field Details
-
SHADOWCHAR
public static final char SHADOWCHAR- See Also:
-
DEFAULT_NUMBER_DIRECTORIES
public static final int DEFAULT_NUMBER_DIRECTORIES- See Also:
-
-
Constructor Details
-
HashedStore
public HashedStore(ObjectStoreEnvironmentBean objectStoreEnvironmentBean) throws ObjectStoreException - Throws:
ObjectStoreException
-
-
Method Details
-
allObjUids
public boolean allObjUids(String tName, InputObjectState state, int match) throws ObjectStoreException Given a type name initialisestate
to contains all of the Uids of objects of that type- Specified by:
allObjUids
in interfaceRecoveryStore
- Overrides:
allObjUids
in classFileSystemStore
- Parameters:
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] Note: m=OS_UNKNOWN matches any state.- Returns:
true
if no errors occurred,false
otherwise.- Throws:
ObjectStoreException
-
truncate
- Overrides:
truncate
in classFileSystemStore
-
genPathName
- Overrides:
genPathName
in classShadowingStore
- Returns:
- the file name for the state of the object identified by the Uid and TypeName.
- Throws:
ObjectStoreException
-