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?
|
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
configuredpublic boolean fullCommitNeeded()
fullCommitNeeded
in interface ParticipantStore
true
if full commit is needed, false
otherwise.public void sync() throws SyncFailedException, ObjectStoreException
sync
in interface TxLog
SyncFailedException
ObjectStoreException
public boolean isType(Uid u, String tn, int st) throws ObjectStoreException
isType
in interface RecoveryStore
u
- 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.ObjectStoreException
public String getStoreName()
getStoreName
in interface BaseStore
public boolean allObjUids(String s, InputObjectState buff) throws ObjectStoreException
allObjUids
in interface RecoveryStore
ObjectStoreException
public boolean commit_state(Uid objUid, String tName) throws ObjectStoreException
ParticipantStore
commit_state
in interface ParticipantStore
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 objUid, String tName) throws ObjectStoreException
RecoveryStore
hide_state
in interface RecoveryStore
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 reveal_state(Uid objUid, String tName) throws ObjectStoreException
RecoveryStore
reveal_state
in interface RecoveryStore
objUid
- The object to work on.tName
- The type of the object to work on.true
if no errors occurred, false
otherwise.ObjectStoreException
public int currentState(Uid objUid, String tName) throws ObjectStoreException
currentState
in interface RecoveryStore
objUid
- The object to query.tName
- The type of the object to query.ObjectStoreException
public InputObjectState read_committed(Uid storeUid, String tName) throws ObjectStoreException
ParticipantStore
read_committed
in interface ParticipantStore
read_committed
in interface RecoveryStore
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
read_uncommitted
in interface 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
remove_committed
in interface 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
remove_uncommitted
in interface 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
write_committed
in interface 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
write_uncommitted
in interface 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
RecoveryStore
allObjUids
in interface RecoveryStore
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
public boolean allTypes(InputObjectState foundTypes) throws ObjectStoreException
RecoveryStore
allTypes
in interface RecoveryStore
foundTypes
- The state in which to store the types.true
if no errors occurred, false
otherwise.ObjectStoreException
public void packInto(OutputBuffer buff) throws IOException
IOException
public void unpackFrom(InputBuffer buff) throws IOException
IOException
Copyright © 2021 JBoss by Red Hat. All rights reserved.