Class HAStoreBase

    • Field Detail

      • _debug

        protected int _debug
        Controls the verbosity of the web container subsystem's debug messages. This value is non-zero only when the level is one of FINE, FINER or FINEST.
      • _logLevel

        protected Level _logLevel
        The current level of logging verbosity for this object.
      • applicationId

        protected String applicationId
        The application id
      • clusterId

        protected String clusterId
        The cluster id
    • Constructor Detail

      • HAStoreBase

        public HAStoreBase​(JavaEEIOUtils ioUtils)
        Creates a new instance of HAStoreBase
    • Method Detail

      • debug

        protected void debug​(String message)
      • setLogLevel

        protected void setLogLevel()
        Set _debug flag and _logLevel based on the log level.
      • getApplicationId

        public String getApplicationId()
      • getClusterIdFromConfig

        protected String getClusterIdFromConfig()
        Return the cluster id for this Store as defined in server.xml.
      • getClusterId

        protected String getClusterId()
        Return the cluster id for this Store
      • getByteArray

        public byte[] getByteArray​(Session session)
                            throws IOException
        Create serialized byte[] for obj.
        Parameters:
        session - - serialize obj
        Returns:
        byte[] containing serialized data stream for obj
        Throws:
        IOException
      • getByteArray

        protected byte[] getByteArray​(Session session,
                                      boolean compress)
                               throws IOException
        Create an byte[] for the session that we can then pass to the HA Store.
        Parameters:
        session - The session we are serializing
        Throws:
        IOException
      • remove

        public void remove​(String id)
                    throws IOException
        Remove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action.
        Parameters:
        id - Session identifier of the Session to be removed
        Throws:
        IOException - if an input/output error occurs
      • doRemove

        public void doRemove​(String id)
                      throws IOException
        Remove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action. (This is the non-synchronized version of remove called by a store element from the pool, not the singleton store which must use removeSynchronized
        Parameters:
        id - Session identifier of the Session to be removed
        Throws:
        IOException - if an input/output error occurs
      • removeSynchronized

        public void removeSynchronized​(String id)
                                throws IOException
        Remove the Session with the specified session identifier from this Store, if present. If no such Session is present, this method takes no action.
        Parameters:
        id - Session identifier of the Session to be removed
        Throws:
        IOException - if an input/output error occurs
      • getSize

        public int getSize()
                    throws IOException
        return the size of the store cache will be over-ridden in subclasses
        Throws:
        IOException - if an input/output error occurs