org.neo4j.kernel.impl.transaction
Class XaDataSourceManager

java.lang.Object
  extended by org.neo4j.kernel.impl.transaction.XaDataSourceManager

public class XaDataSourceManager
extends Object

All datasources that have been defined in the XA data source configuration file or manually added will be created and registered here. A mapping between "name", "data source" and "branch id" is kept by this manager.

Use the getXaDataSource(java.lang.String) to obtain the instance of a datasource that has been defined in the XA data source configuration.

See Also:
XaDataSource

Method Summary
 Collection<XaDataSource> getAllRegisteredDataSources()
           
 Collection<XAResource> getAllRegisteredXAResources()
           
 XaDataSource getXaDataSource(String name)
          Returns the XaDataSource registered as name.
 boolean hasDataSource(String name)
          Convenience method since getXaDataSource(java.lang.String) returns null if name doesn't exist.
 void registerDataSource(String name, XaDataSource dataSource, byte[] branchId)
          Public for testing purpose.
 void unregisterDataSource(String name)
          Public for testing purpose.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasDataSource

public boolean hasDataSource(String name)
Convenience method since getXaDataSource(java.lang.String) returns null if name doesn't exist.

Returns:
True if name exists

getXaDataSource

public XaDataSource getXaDataSource(String name)
Returns the XaDataSource registered as name. If no data source is registered with that name null is returned.

Parameters:
name - the name of the data source

registerDataSource

public void registerDataSource(String name,
                               XaDataSource dataSource,
                               byte[] branchId)
Public for testing purpose. Do not use.


unregisterDataSource

public void unregisterDataSource(String name)
Public for testing purpose. Do not use.


getAllRegisteredXAResources

public Collection<XAResource> getAllRegisteredXAResources()

getAllRegisteredDataSources

public Collection<XaDataSource> getAllRegisteredDataSources()


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.