|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.esw.collection.AggregateTransactionManager
Aggregates a Transaction across multiple IMetaCollection
instances.
Allows multiple get
or put
method invocations
to be combined into one aggregate transaction. After adding one or more
IMetaCollection
instances that contain an instance of an
ITransactionalTransducter
to this
AggregateTransactionManager
, calling execute
on
this AggregateTransactionManager
instance will invoke those
methods on the contained IMetaCollection
instances. Once
all of the get
or put
method invocations complete,
the commit method will be called on those
ITransactionalTransducer
instances. If any
TransducerExceptions
are thrown, then this
AggregateTransactionManager
will rollback all of its previous
get
or put
method invocations.
Field Summary | |
protected boolean |
bStrict
States whether this AggregateTransactionManager should enforce
that all IMetaCollection instances added to manager must
contain an ITransactionalTransducer instance as its
ITransducer . |
protected java.util.List |
collections
The List of IMetaCollection instances. |
protected java.util.List |
operations
The operation to perform against the List of IMetaCollection
instances. |
Constructor Summary | |
AggregateTransactionManager()
Creates a new AggregateTransactionManager . |
|
AggregateTransactionManager(boolean aStrict)
Creates a new AggregateTransactionManager which allows
enforcement of all IMetaCollection instances to contain an
ITransactionalTransducer as their ITransducer
instance. |
Method Summary | |
void |
addMetaCollection(IMetaCollection aMetaCollection,
boolean aGet)
Adds the specified IMetaCollection instance to this
AggregateTransactionManager instance. |
void |
execute()
Begins the execution against this AggregateTransactionManager
instances' collection of IMetaCollection instances. |
boolean |
getEnforceTransactional()
Returns whether this AggregateTransactionManager should
enforce that all IMetaCollection instances added to manager
must contain an ITransactionalTransducer instance as its
ITransducer . |
void |
removeMetaCollection(IMetaCollection aMetaCollection)
Removes the specified IMetaCollection instance from this
AggregateTransactionManager instance. |
void |
setEnforceTransactional(boolean aStrict)
Sets whether this AggregateTransactionManager should enforce
that all IMetaCollection instances added to this manager must
contain an ITransactionalTransducer instance as its
ITransducer . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List collections
IMetaCollection
instances.protected java.util.List operations
IMetaCollection
instances.protected boolean bStrict
AggregateTransactionManager
should enforce
that all IMetaCollection
instances added to manager must
contain an ITransactionalTransducer
instance as its
ITransducer
. The default is false
.Constructor Detail |
public AggregateTransactionManager()
AggregateTransactionManager
.public AggregateTransactionManager(boolean aStrict)
AggregateTransactionManager
which allows
enforcement of all IMetaCollection
instances to contain an
ITransactionalTransducer
as their ITransducer
instance.aStrict
- if true
, this
AggregateTransactionManager
will enforce
Transactional Transducers against added
IMetaCollection
instances.Method Detail |
public boolean getEnforceTransactional()
AggregateTransactionManager
should
enforce that all IMetaCollection
instances added to manager
must contain an ITransactionalTransducer
instance as its
ITransducer
.true
if enforcing Transaction Transducers,
false
otherwise.public void setEnforceTransactional(boolean aStrict)
AggregateTransactionManager
should enforce
that all IMetaCollection
instances added to this manager must
contain an ITransactionalTransducer
instance as its
ITransducer
. If changing to enforce Transactional Transducer,
this method will also check to see if the IMetaCollection
instances contained within this AggregateTransactionManager
contain ITransactionalTransducer
instances and will throw an
IllegalArguementException
if so.aStrict
- if true, this AggregateTransactionManager
will
enforce Transactional Transducers against added
IMetaCollection
instances.java.lang.IllegalArgumentException
- if any contained
IMetaCollection
instances
contain ITransactionTransducer
instances.public void addMetaCollection(IMetaCollection aMetaCollection, boolean aGet)
IMetaCollection
instance to this
AggregateTransactionManager
instance. The
IMetaCollection
must contain an instance of an
ITransactionalTransducer
or an
IllegalArguementException
will be thrown.aMetaCollection
- the IMetaCollection
instance being
added.aGet
- states whether the transaction to preform is a
get
or a put
against
the specified IMetaCollection
instance.java.lang.IllegalArgumentException
- if the IMetaCollection
instance does not contain an
ITransactionalTranducer
.public void removeMetaCollection(IMetaCollection aMetaCollection)
IMetaCollection
instance from this
AggregateTransactionManager
instance.aMetaCollection
- the IMetaCollection
instance being
removed.public void execute() throws TransducerException
AggregateTransactionManager
instances' collection of IMetaCollection
instances.
If all the transducer invocations are successful, then the
IMetaCollection
instances containing
ITransactionalTransducer
instances' commit will
be invoked. However, if any TransducerExceptions
are thrown,
then rollback
will be called on those same
ITransactionalTransducer
instances.
TransducerException
- if the execution fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |