public class JDBCStore extends Object implements ObjectStoreAPI
| Modifier and Type | Field and Description |
|---|---|
protected JDBCImple_driver |
_theImple |
protected ObjectStoreEnvironmentBean |
jdbcStoreEnvironmentBean |
protected String |
tableName |
| Constructor and Description |
|---|
JDBCStore(ObjectStoreEnvironmentBean jdbcStoreEnvironmentBean)
Create a new JDBCStore
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allObjUids(String s,
InputObjectState buff) |
boolean |
allObjUids(String tName,
InputObjectState state,
int match)
Obtain all of the Uids for a specified type.
|
boolean |
allTypes(InputObjectState foundTypes)
Obtain all types of objects stored in the object store.
|
boolean |
commit_state(Uid objUid,
String tName)
Commit the object's state in the object store.
|
int |
currentState(Uid objUid,
String tName) |
boolean |
fullCommitNeeded()
Does this store need to do the full write_uncommitted/commit protocol?
|
protected String |
getDefaultTableName() |
String |
getStoreName() |
boolean |
hide_state(Uid objUid,
String tName)
Hide the object's state in the object store.
|
boolean |
isType(Uid u,
String tn,
int st)
Is the current state of the object the same as that provided as the last
parameter?
|
void |
packInto(OutputBuffer buff) |
InputObjectState |
read_committed(Uid storeUid,
String tName)
Read the object's committed state.
|
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.
|
boolean |
remove_uncommitted(Uid storeUid,
String tName)
Remove the object's uncommitted state.
|
boolean |
reveal_state(Uid objUid,
String tName)
Reveal a hidden object's state.
|
void |
start() |
void |
stop() |
void |
sync()
Some object store implementations may be running with automatic sync
disabled.
|
void |
unpackFrom(InputBuffer buff) |
boolean |
write_committed(Uid storeUid,
String tName,
OutputObjectState state)
Write a new copy of the object's committed state.
|
boolean |
write_uncommitted(Uid storeUid,
String tName,
OutputObjectState state)
Write a copy of the object's uncommitted state.
|
protected JDBCImple_driver _theImple
protected String tableName
protected final ObjectStoreEnvironmentBean jdbcStoreEnvironmentBean
public JDBCStore(ObjectStoreEnvironmentBean jdbcStoreEnvironmentBean) throws ObjectStoreException
jdbcStoreEnvironmentBean - The environment bean containing the configurationObjectStoreException - In case the store environment bean was not correctly configured{@link - FatalError} In case the configured store cannot be connected topublic boolean fullCommitNeeded()
fullCommitNeeded in interface ParticipantStoretrue if full commit is needed, false
otherwise.public void sync()
throws SyncFailedException,
ObjectStoreException
sync in interface TxLogSyncFailedExceptionObjectStoreExceptionpublic boolean isType(Uid u, String tn, int st) throws ObjectStoreException
isType in interface RecoveryStoreu - The object to work on.tn - The type of the object.st - The expected type of the object.true if the current state is as expected,
false otherwise.ObjectStoreExceptionpublic String getStoreName()
getStoreName in interface BaseStorepublic boolean allObjUids(String s, InputObjectState buff) throws ObjectStoreException
allObjUids in interface RecoveryStoreObjectStoreExceptionpublic boolean commit_state(Uid objUid, String tName) throws ObjectStoreException
ParticipantStorecommit_state in interface ParticipantStoreobjUid - 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 objUid, String tName) throws ObjectStoreException
RecoveryStorehide_state in interface RecoveryStoreobjUid - The object to work on.tName - The type of the object to work on.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic boolean reveal_state(Uid objUid, String tName) throws ObjectStoreException
RecoveryStorereveal_state in interface RecoveryStoreobjUid - The object to work on.tName - The type of the object to work on.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic int currentState(Uid objUid, String tName) throws ObjectStoreException
currentState in interface RecoveryStoreobjUid - The object to query.tName - The type of the object to query.ObjectStoreExceptionpublic InputObjectState read_committed(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStoreread_committed in interface ParticipantStoreread_committed in interface RecoveryStorestoreUid - The object to work on.tName - The type of the object to work on.ObjectStoreExceptionpublic InputObjectState read_uncommitted(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStoreread_uncommitted in interface 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
TxLogremove_committed in interface 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
ParticipantStoreremove_uncommitted in interface 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
TxLogwrite_committed in interface 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
ParticipantStorewrite_uncommitted in interface 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
RecoveryStoreallObjUids in interface RecoveryStoretName - 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
RecoveryStoreallTypes in interface RecoveryStorefoundTypes - The state in which to store the types.true if no errors occurred, false
otherwise.ObjectStoreExceptionpublic void packInto(OutputBuffer buff) throws IOException
IOExceptionpublic void unpackFrom(InputBuffer buff) throws IOException
IOExceptionprotected String getDefaultTableName()
Copyright © 2014 JBoss by Red Hat. All rights reserved.