Class ConnectionFactoryImpl

  • All Implemented Interfaces:
    org.datanucleus.store.connection.ConnectionFactory

    public class ConnectionFactoryImpl
    extends org.datanucleus.store.connection.AbstractConnectionFactory
    Connection factory for Cassandra datastores. Accepts a URL of the form
     cassandra:[host1:port[,host2[,host3]]]
     
    Defaults to a server of "127.0.0.1" if no host/port specified. Defaults to a single Session per PMF/EMF, but can be overridden using "datanucleus.cassandra.sessionPerManager".
    • Constructor Detail

      • ConnectionFactoryImpl

        public ConnectionFactoryImpl​(org.datanucleus.store.StoreManager storeMgr,
                                     String resourceType)
        Constructor for a factory.
        Parameters:
        storeMgr - StoreManager
        resourceType - Resource type (not of relevance since we use a single factory)
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface org.datanucleus.store.connection.ConnectionFactory
        Overrides:
        close in class org.datanucleus.store.connection.AbstractConnectionFactory
      • createManagedConnection

        public org.datanucleus.store.connection.ManagedConnection createManagedConnection​(org.datanucleus.ExecutionContext ec,
                                                                                          Map options)
        Obtain a connection from the Factory. The connection will be enlisted within the transaction associated to the ExecutionContext
        Parameters:
        ec - the pool that is bound the connection during its lifecycle (or null)
        options - Any options for then creating the connection (currently ignored)
        Returns:
        the ManagedConnection