Class ReplicationPartitioningPolicy

    • Field Detail

      • connectionPools

        protected List<String> connectionPools
    • Constructor Detail

      • ReplicationPartitioningPolicy

        public ReplicationPartitioningPolicy()
      • ReplicationPartitioningPolicy

        public ReplicationPartitioningPolicy​(String... pools)
      • ReplicationPartitioningPolicy

        public ReplicationPartitioningPolicy​(List<String> pools)
    • Method Detail

      • initialize

        public void initialize​(org.eclipse.persistence.internal.sessions.AbstractSession session)
        INTERNAL: Default the connection pools to all pools if unset.
        initialize in class PartitioningPolicy
      • getConnectionPools

        public List<String> getConnectionPools()
        PUBLIC: Return the list of connection pool names to replicate queries to.
      • setConnectionPools

        public void setConnectionPools​(List<String> connectionPools)
        PUBLIC: Set the list of connection pool names to replicate queries to. A connection pool with the same name must be defined on the ServerSession.
      • addConnectionPool

        public void addConnectionPool​(String connectionPool)
        PUBLIC: Add the connection pool name to the list of pools to rotate queries through.
      • getConnectionsForQuery

        public List<org.eclipse.persistence.internal.databaseaccess.Accessor> getConnectionsForQuery​(org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                                                                     DatabaseQuery query,
                                                                                                     org.eclipse.persistence.internal.sessions.AbstractRecord arguments)
        INTERNAL: Get a connection from each pool.
        Specified by:
        getConnectionsForQuery in class PartitioningPolicy