org.neo4j.kernel.impl.transaction.xaframework
Class TransactionInterceptorProvider
java.lang.Object
org.neo4j.helpers.Service
org.neo4j.kernel.impl.transaction.xaframework.TransactionInterceptorProvider
- Direct Known Subclasses:
- InconsistencyLoggingTransactionInterceptorProvider, VerifyingTransactionInterceptorProvider
public abstract class TransactionInterceptorProvider
- extends Service
The basic service implementation for TransactionInterceptorProviders.
Offers two ways to instantiate a TransactionInterceptor - one is
standalone, the other is with an existing one as the next in the chain
of responsibility.
TransactionInterceptorProvider
public TransactionInterceptorProvider(String name)
name
public abstract String name()
- Returns the name of this provider
- Returns:
- The name of this provider
create
public abstract TransactionInterceptor create(XaDataSource ds,
Object options)
- Creates a TransactionInterceptor with the given datasource and options.
It is possible for this method to return null, signifying that the
options passed did not allow for instantiation.
- Parameters:
ds - The datasource the TransactionInterceptor will communicate withoptions - An object that can be the options to instantiate the
interceptor with - e.g "false" to prevent instantiation
- Returns:
- An implementation of TransactionInterceptor or null if the
options say so.
create
public abstract TransactionInterceptor create(TransactionInterceptor next,
XaDataSource ds,
Object options)
- Creates a TransactionInterceptor with the given datasource and options
and the given TransactionInterceptor as the next in the chain.
It is possible for this method to return null, signifying that the
options passed did not allow for instantiation.
- Parameters:
ds - The datasource the TransactionInterceptor will communicate withoptions - An object that can be the options to instantiate the
interceptor with - e.g "false" to prevent instantiationnext - The next interceptor in the chain - can be null
- Returns:
- An implementation of TransactionInterceptor or null if the
options say so.
resolveChain
public static TransactionInterceptor resolveChain(List<Pair<TransactionInterceptorProvider,Object>> providers,
XaDataSource ds)
- A utility method that given some TransactionInterceptorProviders and
their configuration objects returns a fully resolved chain of
TransactionInterceptors - the return object is the first interceptor
in the chain.
- Parameters:
providers - A list of Pair of
TransactionInterceptorProviders with
the detected config objectsds - The datasource to instantiate the TransactionInterceptors with
- Returns:
- The fist interceptor in the chain, possibly null
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.