Class ReplicationManagerBase<T extends org.glassfish.ha.store.api.Storeable>

    • Field Detail

      • backingStore

        protected org.glassfish.ha.store.api.BackingStore<String,​T extends org.glassfish.ha.store.api.Storeable> backingStore
      • _logger

        protected Logger _logger
      • relaxCacheVersionSemantics

        protected boolean relaxCacheVersionSemantics
      • disableJreplica

        protected boolean disableJreplica
    • Constructor Detail

      • ReplicationManagerBase

        public ReplicationManagerBase()
    • Method Detail

      • getBackingStore

        public org.glassfish.ha.store.api.BackingStore<String,​T> getBackingStore()
      • createBackingStore

        public abstract void createBackingStore​(String persistenceType,
                                                String storeName,
                                                Class<T> metadataClass,
                                                Map<String,​Object> vendorMap)
      • createNewSession

        public Session createNewSession()
      • createEmptySession

        public Session createEmptySession()
        Description copied from class: ManagerBase
        Get a session from the recycled ones or create a new empty one. The PersistentManager manager does not need to create session data because it reads it from the Store.
        Specified by:
        createEmptySession in interface Manager
        Overrides:
        createEmptySession in class ManagerBase
      • setSessionFactory

        public void setSessionFactory​(SessionFactory sessionFactory)
      • setBackingStore

        public void setBackingStore​(org.glassfish.ha.store.api.BackingStore<String,​T> backingStore)
      • doRemove

        public void doRemove​(String id)
      • findSession

        public Session findSession​(String id,
                                   String version)
                            throws IOException
        Description copied from class: ManagerBase
        Finds and returns the session with the given id that also satisfies the given version requirement. This overloaded version of findSession() will be invoked only if isSessionVersioningSupported() returns true. By default, this method delegates to the version of findSession() that does not take any session version number.
        Specified by:
        findSession in interface Manager
        Overrides:
        findSession in class ManagerBase
        Parameters:
        id - The session id to match
        version - The session version requirement to satisfy
        Returns:
        The session that matches the given id and also satisfies the given version requirement, or null if no such session could be found by this session manager
        Throws:
        IOException - if an IO error occurred
      • isRelaxCacheVersionSemantics

        public boolean isRelaxCacheVersionSemantics()
        should relax cache version semantics be applied
      • setRelaxCacheVersionSemantics

        public void setRelaxCacheVersionSemantics​(boolean value)
        set the relaxCacheVersionSemantics
        Parameters:
        value -
      • removeSessionFromManagerCache

        public void removeSessionFromManagerCache​(Session session)
      • setDisableJreplica

        public void setDisableJreplica​(boolean disableJreplica)
      • isDisableJreplica

        public boolean isDisableJreplica()
      • doValveSave

        public abstract void doValveSave​(Session session)
      • getReplicaFromPredictor

        public abstract String getReplicaFromPredictor​(String sessionId,
                                                       String oldJreplicaValue)