public class ComposableTransactionWriter extends Object implements org.apache.geode.cache.TransactionWriter
TransactionWriter
interface that uses the Composite Software Design
Pattern to compose multiple TransactionWriter
objects into a single instance.TransactionWriter
Modifier and Type | Method and Description |
---|---|
void |
beforeCommit(org.apache.geode.cache.TransactionEvent event) |
void |
close() |
static org.apache.geode.cache.TransactionWriter |
compose(org.apache.geode.cache.TransactionWriter transactionWriterOne,
org.apache.geode.cache.TransactionWriter transactionWriterTwo)
Factory method used to construct and compose 2
TransactionWriter objects into a composite instance of
TransactionWriter functioning as a single instance. |
protected org.apache.geode.cache.TransactionWriter |
getTransactionWriterOne()
Returns a reference to the first
TransactionWriter in the composition. |
protected org.apache.geode.cache.TransactionWriter |
getTransactionWriterTwo()
Returns a reference to the second
TransactionWriter in the composition. |
void |
init(Properties properties) |
void |
initialize(org.apache.geode.cache.Cache cache,
Properties properties) |
@Nullable public static org.apache.geode.cache.TransactionWriter compose(@Nullable org.apache.geode.cache.TransactionWriter transactionWriterOne, @Nullable org.apache.geode.cache.TransactionWriter transactionWriterTwo)
TransactionWriter
objects into a composite instance of
TransactionWriter
functioning as a single instance.transactionWriterOne
- first TransactionWriter
in the composition.transactionWriterTwo
- second TransactionWriter
in the composition.TransactionWriter
if the second TransactionWriter
is null, or return
the second TransactionWriter
if the first TransactionWriter
is null, or return
the composition of both TransactionWriter
one and TransactionWriter
two.TransactionWriter
protected org.apache.geode.cache.TransactionWriter getTransactionWriterOne()
TransactionWriter
in the composition.TransactionWriter
in the composition.TransactionWriter
protected org.apache.geode.cache.TransactionWriter getTransactionWriterTwo()
TransactionWriter
in the composition.TransactionWriter
in the composition.TransactionWriter
public void beforeCommit(org.apache.geode.cache.TransactionEvent event) throws org.apache.geode.cache.TransactionWriterException
beforeCommit
in interface org.apache.geode.cache.TransactionWriter
org.apache.geode.cache.TransactionWriterException
public void close()
close
in interface org.apache.geode.cache.CacheCallback
public void init(Properties properties)
init
in interface org.apache.geode.cache.Declarable
public void initialize(org.apache.geode.cache.Cache cache, Properties properties)
initialize
in interface org.apache.geode.cache.Declarable
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.