Class NodeProviderInDb

    • Field Detail

      • uuid

        public final java.lang.String uuid
        UUID for this cluster node. Used to uniquely identify the session manager in this blitz instance. Most likely used in common with internal server components. Must specify a valid session id.
    • Constructor Detail

      • NodeProviderInDb

        public NodeProviderInDb​(java.lang.String uuid,
                                Executor executor)
    • Method Detail

      • getManagerIdByUuid

        public long getManagerIdByUuid​(java.lang.String managerUuid,
                                       ome.util.SqlAction sql)
        Description copied from interface: NodeProvider
        Retrieves a given manager node ID.
        Specified by:
        getManagerIdByUuid in interface NodeProvider
        Parameters:
        managerUuid - manager node UUID to retrieve
        sql - active SQL context which can be used to make queries
        Returns:
        See above.
      • getManagerList

        public java.util.Set<java.lang.String> getManagerList​(boolean onlyActive)
        Specified by:
        getManagerList in interface NodeProvider
      • closeSessionsForManager

        public int closeSessionsForManager​(java.lang.String managerUuid)
        Assumes that the given manager is no longer available and so will not attempt to call cache.removeSession() since that requires the session to be in memory. Instead directly modifies the database to set the session to closed.
        Specified by:
        closeSessionsForManager in interface NodeProvider
        Parameters:
        managerUuid - manager node UUID to close sessions for
        Returns:
        number of sessions affected by the closure
      • setManagerDown

        public void setManagerDown​(java.lang.String managerUuid)
        Description copied from interface: NodeProvider
        Sets a given manager node as down.
        Specified by:
        setManagerDown in interface NodeProvider
        Parameters:
        managerUuid - manager node UUID to set as down
      • addManager

        public ome.model.meta.Node addManager​(java.lang.String managerUuid,
                                              java.lang.String proxyString)
        Description copied from interface: NodeProvider
        Adds a manager node.
        Specified by:
        addManager in interface NodeProvider
        Parameters:
        managerUuid - manager node UUID to add
        proxyString - manager node proxy connection string
        Returns:
        populated node entity.
      • isReadOnly

        public boolean isReadOnly​(ReadOnlyStatus readOnly)
        Specified by:
        isReadOnly in interface ReadOnlyStatus.IsAware
        Parameters:
        readOnly - a read-only status, typically the current one
        Returns:
        if that status puts this class into read-only mode