|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.compatibility.base.dataprovider.exporter.ReplicateHandler.RequestDispenser
protected static class ReplicateHandler.RequestDispenser
Dispense the RequestCollections for accessing the dataprovider according to the current transaction behavior.
The ReplicateHandler must feed the callbacks startObject(), endObject(), startTopLevelObject(), endTopLevelObject(). The RequestDispenser needs this information to be able to follow the currrent state of work.
A toplevel object is an object specified in the startPath list.
| Constructor Summary | |
|---|---|
ReplicateHandler.RequestDispenser(ServiceHeader header,
Dataprovider_1_0 provider)
Prepare the RequestDispenser. |
|
| Method Summary | |
|---|---|
void |
abandonTraversal()
Rollback the current transaction. |
void |
endObject(boolean isToplevelObject)
An object has been treated, based in the transaction setting a new transaction is ended. |
void |
endTraversal()
End the transaction if transactional behaviour is set accordingly. |
RequestCollection |
getRequestCollection()
Get a RequestCollection. |
RequestCollection |
getTimedRequestCollection(String validFrom,
String validTo)
Get a RequestCollection which has requestedAt date set which is between validFrom and validTo. |
short |
getTransactionBehavior()
Get the currently active transaction behavior. |
boolean |
hasOpenTransaction()
Returns true if currently a transaction is open. |
void |
setTransactionBehavior(short transactionBehavior)
Set the TransactionBehavior. |
void |
startObject(boolean isToplevelObject)
An object starts, based on the transaction setting a new transaction is started. |
void |
startTraversal()
Start the transaction if transactional behaviour is set accordingly. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReplicateHandler.RequestDispenser(ServiceHeader header,
Dataprovider_1_0 provider)
provider - the dataprovider to work with| Method Detail |
|---|
public void setTransactionBehavior(short transactionBehavior)
If the transaction behavior is set during a running transaction, it the new behavior only gets assigned after the current transaction has been ended. Note: changing the transaction behavior when the current behavior is ONE_TRANSACTION is useless.
transactionBehavior - public short getTransactionBehavior()
If a new behavior has already been set, this can not be detected.
public RequestCollection getRequestCollection()
throws ServiceException
This is the central part of the RequestDispenser as the RequestCollection's transaction is started (must be!) and will be commited according to the setting of transaction behavior.
ServiceException
public RequestCollection getTimedRequestCollection(String validFrom,
String validTo)
throws ServiceException
This request collection is intended for reading access, thus it is not related to any transaction treatment.
validFrom - validTo -
ServiceExceptionpublic boolean hasOpenTransaction()
public void startTraversal()
throws ServiceException
ServiceException
public void endTraversal()
throws ServiceException
ServiceException
public void abandonTraversal()
throws ServiceException
ServiceException
public void startObject(boolean isToplevelObject)
throws ServiceException
ServiceException
public void endObject(boolean isToplevelObject)
throws ServiceException
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||