public TransactionEventsSyncHook( NodeManager nodeManager, Collection<TransactionEventHandler<?>> transactionEventHandlers, TransactionManager tm ) { this.nodeManager = nodeManager; this.handlers = transactionEventHandlers; this.tm = tm; }
public <T> TransactionEventHandler<T> registerTransactionEventHandler( TransactionEventHandler<T> handler ) { throw new UnsupportedOperationException(); }
public <T> TransactionEventHandler<T> unregisterTransactionEventHandler( TransactionEventHandler<T> handler ) { throw new UnsupportedOperationException(); }
public HandlerAndState( TransactionEventHandler<?> handler, Object state ) { this.handler = handler; this.state = state; }
public <T> TransactionEventHandler<T> registerTransactionEventHandler( TransactionEventHandler<T> handler ) { return this.graphDbImpl.registerTransactionEventHandler( handler ); }
public <T> TransactionEventHandler<T> unregisterTransactionEventHandler( TransactionEventHandler<T> handler ) { return this.graphDbImpl.unregisterTransactionEventHandler( handler ); }
<T> TransactionEventHandler<T> registerTransactionEventHandler( TransactionEventHandler<T> handler ) { this.transactionEventHandlers.add( handler ); return handler; }
<T> TransactionEventHandler<T> unregisterTransactionEventHandler( TransactionEventHandler<T> handler ) { return unregisterHandler( this.transactionEventHandlers, handler ); }
/** * Registers {@code handler} as a handler for transaction events which * are generated from different places in the lifecycle of each * transaction. To guarantee that the handler gets all events properly * it shouldn't be registered when the application is running (i.e. in the * middle of one or more transactions). If the specified handler instance * has already been registered this method will do nothing. * * @param <T> the type of state object used in the handler, see more * documentation about it at {@link TransactionEventHandler}. * @param handler the handler to receive events about different states * in transaction lifecycles. * @return the handler passed in as the argument. */ public <T> TransactionEventHandler<T> registerTransactionEventHandler( TransactionEventHandler<T> handler );
/** * Unregisters {@code handler} from the list of transaction event handlers. * If {@code handler} hasn't been registered with * {@link #registerTransactionEventHandler(TransactionEventHandler)} prior * to calling this method an {@link IllegalStateException} will be thrown. * After a successful call to this method the {@code handler} will no * longer receive any transaction events. * * @param <T> the type of state object used in the handler, see more * documentation about it at {@link TransactionEventHandler}. * @param handler the handler to receive events about different states * in transaction lifecycles. * @return the handler passed in as the argument. * @throws IllegalStateException if {@code handler} wasn't registered prior * to calling this method. */ public <T> TransactionEventHandler<T> unregisterTransactionEventHandler( TransactionEventHandler<T> handler );