|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.fostore.FOStoreConnector
FOStoreConnector represents a connection to the FOStoreDatabase.
Field Summary | |
private boolean |
busy
True if flush is in progress. |
(package private) FOStoreClientConnection |
connection
Connection for interacting with store. |
(package private) static org.apache.commons.logging.Log |
logger
Logger |
private Message |
message
Message in which this Connector buffers requests for the store. |
private static I18NHelper |
msg
I18N support. |
private boolean |
okToReleaseConnection
True if we can release this connection after flushing. |
private FOStorePMF |
pmf
Datasource to which this Connector writes its Message. |
private boolean |
rollbackOnly
|
Constructor Summary | |
(package private) |
FOStoreConnector(FOStorePMF pmf)
|
Method Summary | |
private void |
assertNotBusy(java.lang.String methodName)
|
private void |
assertNotRollbackOnly()
|
void |
beforeCompletion()
Informs the Connector that the transaction has reached it's beforeCompletion phase. |
void |
begin(boolean optimistic)
Informs the Connector that a transaction is beginning. |
void |
commit()
Add a CommitRequest to the connector's message, and send it to the store. |
void |
flush()
Get a connection, process the message by using that connection to interact with the database, read back the reply, release the connection. |
(package private) Message |
getMessage()
Provides the Message which this this connector uses to send data to the store. |
boolean |
getRollbackOnly()
Indicates whether or not the connector can do operations other than rollback. |
void |
rollback()
If rollbackOnly is set, then the store has already done a rollback, so we don't do one now (but neither do we throw an exception, as do other methds). |
void |
setRollbackOnly()
Requests that the Connector put itself in a state such that the only allowable operations is Connector.getRollbackOnly() . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private boolean rollbackOnly
Connector.setRollbackOnly()
private static final I18NHelper msg
static final org.apache.commons.logging.Log logger
private final Message message
private final FOStorePMF pmf
FOStoreClientConnection connection
private boolean okToReleaseConnection
private boolean busy
Constructor Detail |
FOStoreConnector(FOStorePMF pmf)
Method Detail |
public void begin(boolean optimistic)
Connector
begin
in interface Connector
optimistic
- If true, then an optimistic transaction is
beginning.Connector.begin(boolean)
public void beforeCompletion()
Connector
beforeCompletion
in interface Connector
Connector.beforeCompletion()
public void flush()
flush
in interface Connector
Connector.flush()
public void commit()
commit
in interface Connector
Connector.commit()
public void rollback()
rollback
in interface Connector
Connector.rollback()
,
ReplyHandler.processReplies(java.io.DataInput, org.apache.jdo.impl.fostore.Message)
public void setRollbackOnly()
Connector
Connector.getRollbackOnly()
. Once set, attempts to
do any other operations will result in a JDODataStoreException.
setRollbackOnly
in interface Connector
Connector.setRollbackOnly()
public boolean getRollbackOnly()
Connector
getRollbackOnly
in interface Connector
false
if the connector can do operations other than
rollback.Connector.getRollbackOnly()
Message getMessage()
private void assertNotRollbackOnly()
private void assertNotBusy(java.lang.String methodName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |