|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAepEnvironmentProvider
Represents an environment data provider
Nested Class Summary | |
---|---|
static interface |
IAepEnvironmentProvider.BufferManager
Represents an interface to a environment provider's buffer manager The AEP engine manages the buffers to which the environment providers record information to be replicated. |
static class |
IAepEnvironmentProvider.TransactionAction
Used to specify what action a provider should take during a transaction |
Method Summary | |
---|---|
void |
close()
Invoked to close an environment provider. |
void |
onTransactionEnd()
Invoked on the end of a transaction. |
void |
onTransactionStart(ByteBuffer buffer,
IAepEnvironmentProvider.TransactionAction action)
Invoked at the start of a transaction. |
void |
setBufferManager(IAepEnvironmentProvider.BufferManager bufferManager)
Supplies the environment provider with a buffer manager. |
Method Detail |
---|
void setBufferManager(IAepEnvironmentProvider.BufferManager bufferManager)
bufferManager
- The buffer manager.
An AEP engine invokes this method on registration of the environment provider to supply the provider with a buffer manager for use by the provider to allocate buffers to store the environment change log.
void onTransactionStart(ByteBuffer buffer, IAepEnvironmentProvider.TransactionAction action)
buffer
- The environment buffer. The provider should use this
buffer to record information to be replicated or replay replicated
as dictated by the action parameter. The buffer markers will
already be prepared by the engine prior to invoking this method. The
provider should begin recording at the position marker and increment
the position marker to always point to the end of the recorded data.
After returning from the onTransactionEnd()
at the end of the
recording, the engine computes the length of the recorded data using
the difference between the position marker as set at the end of the
transaction with what is what at the beginning.action
- Indicates whether the provider should use the buffer
to record or play back replicated information.
An AEP engine invokes this method at the start of a transaction. The provider should use the supplied buffer during the course of the transaction. The action parameter specifies whether the provider should record or playback to/from the buffer. If asked to record, then the provider should record data to be replicated in the buffer starting at the buffer position marker and incrementing the position marker to always point to the end of the recorded data. The provider should use the buffer manager to resize the buffer in the event of an overflow. If requested to playback (i.e. on the backup), the provider should play back the data in the buffer to reconstitute primary state on the backup.
void onTransactionEnd()
An AEP engine invokes this method at the end of a transaction to notify the provider of the completion of a transaction. The method is invoked purely for notification purposes e.g. for a provider on a backup to validate that all the recorded information was indeed played back (for, if not, it indicates a serious error)
void close()
An AEP engine invokes this method when it is stopped to enable the environment provider to perform any cleanup.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |