Skip to content

Commit

Permalink
additional minor (formatting) changes
Browse files Browse the repository at this point in the history
refactor trx event listeners #3222
  • Loading branch information
metas-ts committed Dec 18, 2017
1 parent ca4791c commit 8f6b727
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Expand Up @@ -723,7 +723,8 @@ public static final RecordsToResetOnTrxCommitCollector getCreate(final ITrx trx)
final RecordsToResetOnTrxCommitCollector collector = new RecordsToResetOnTrxCommitCollector();

// Listens {@link ITrx}'s after-commit and fires enqueued cache invalidation requests
trx.getTrxListenerManager().newEventListener().timing(TrxEventTiming.AFTER_COMMIT)
trx.getTrxListenerManager()
.newEventListener().timing(TrxEventTiming.AFTER_COMMIT)
.handlingMethod(innerTrx -> {

final RecordsToResetOnTrxCommitCollector innerCollector = innerTrx.getProperty(TRX_PROPERTY);
Expand Down
Expand Up @@ -91,7 +91,8 @@ public void afterTrxProcessed(

final ITrxManager trxManager = Services.get(ITrxManager.class);
final ITrxListenerManager trxListenerManager = trxManager.getTrxListenerManager(ITrx.TRXNAME_ThreadInherited);
trxListenerManager.newEventListener().timing(TrxEventTiming.AFTER_COMMIT)
trxListenerManager
.newEventListener().timing(TrxEventTiming.AFTER_COMMIT)
.handlingMethod(innerTrx -> {

// do a brand new transaction in which we execute our things,
Expand Down
Expand Up @@ -64,7 +64,8 @@ private static final StorageSegmentChangedExecutor getCreate(final ITrx trx)

// register our listener: we will actually fire the storage segment changed when the transaction is commited
// Listens the {@link ITrx} and on commit actually fires the segment changed event
trx.getTrxListenerManager().newEventListener().timing(TrxEventTiming.AFTER_COMMIT)
trx.getTrxListenerManager()
.newEventListener().timing(TrxEventTiming.AFTER_COMMIT)
.handlingMethod(innerTrx -> {
final StorageSegmentChangedExecutor innerCollector = trx.getProperty(TRX_PROPERTYNAME);
if (innerCollector == null || innerCollector.isEmpty())
Expand Down

0 comments on commit 8f6b727

Please sign in to comment.