Interface RhinoHousekeepingMBean


  • public interface RhinoHousekeepingMBean

    Administration MBean for operator driven Rhino housekeeping.

    • Method Detail

      • getNodeID

        int getNodeID()

        Get the node ID of this node. This method may be used by a management client to determine which Rhino node it is communicating with.

      • getEventRouterNodes

        int[] getEventRouterNodes()

        Get the node IDs of all event processing nodes in the cluster.

        Returns:
        an array of the node IDs of all event processing nodes in the cluster.
      • getQuorumNodes

        int[] getQuorumNodes()

        Get the node IDs of all quorum nodes in the cluster.

        Returns:
        an array of thee node IDs of all quorum nodes in the cluster.
      • getAllClusterNodes

        int[] getAllClusterNodes()

        Get the node IDs of all cluster members, including quorum nodes.

        Returns:
        an array of the node IDs of all nodes in the cluster.
      • getClusterHousekeeping

        ObjectName getClusterHousekeeping()
                                   throws ManagementException

        Get a NodeHousekeepingMBean for the cluster.

        This method returns a special instance of NodeHousekeepingMBean that operates on the entire cluster rather than a single node.

        Returns:
        the JMX ObjectName of a NodeHousekeepingMBean.
        Throws:
        ManagementException - if an internal error occurs.
      • getNodeHousekeeping

        ObjectName getNodeHousekeeping​(int nodeID)
                                throws InvalidArgumentException,
                                       ManagementException

        Get a NodeHousekeepingMBean for a single cluster node.

        This method returns the Object Name of a NodeHousekeepingMBean that operates on a single node. The specified node does not have to be a current member of the cluster, it may represent a failed or yet to join node. Invocations made against the returned MBean will fail however if the specified node is not a member of the cluster when the invocation occurs.

        Parameters:
        nodeID - node ID of the node.
        Returns:
        the JMX ObjectName of a NodeHousekeepingMBean.
        Throws:
        InvalidArgumentException - if nodeID is invalid.
        ManagementException - if an internal error occurs.
      • markAllActivitiesForRemoval

        void markAllActivitiesForRemoval​(String entityName,
                                         int[] nodeIDs)
                                  throws NullPointerException,
                                         UnrecognizedResourceAdaptorEntityException,
                                         InvalidStateException,
                                         ManagementException

        Mark all activities belonging to a resource adaptor entity on the specified nodes for removal.

        Caution: This method irrevocably removes application state.

        Used for force-ending activities from a deactivating resource adaptor.

        All activities belonging to the specified resource adaptor entity on the specified nodes will be marked as requiring removal and then ended during the next iteration of Rhino’s periodic query-liveness scan.

        The resource adaptor entity must be in the deactivating state on the given nodes.

        Parameters:
        entityName - Resource Adaptor entity name of the RA entity
        nodeIDs - the node IDs of the nodes to remove activities from. May be zero-length, in which case all current event-router cluster nodes are targeted.
        Throws:
        NullPointerException - if either argument is null.
        UnrecognizedResourceAdaptorEntityException - if the resource adaptor entity is unknown.
        InvalidStateException - if the resource adaptor entity is not in the Stopping or Inactive state, or the SLEE is not in the Stopping or Stopped state, on the specified nodes.
        ManagementException - if an internal error occurs.
      • removeAllSbbs

        void removeAllSbbs​(ServiceID serviceID,
                           int[] nodeIDs)
                    throws NullPointerException,
                           UnrecognizedServiceException,
                           InvalidStateException,
                           ManagementException

        Remove all SBB entities from a service on the specified nodes.

        Caution: This method irrevocably removes application state.

        Used for forcibly removing remaining SBBs from a deactivating service.

        Parameters:
        serviceID - component ID of the service from which all SBBs should be removed.
        nodeIDs - the node IDs of the nodes to remove SBB entities from. May be zero-length, in which case all current event-router cluster nodes are targeted.
        Throws:
        NullPointerException - if either argument is null.
        UnrecognizedServiceException - if the service is unknown.
        InvalidStateException - if the service is not in the Stopping or Inactive state, or the SLEE is not in the Stopping or Stopped state, on the specified nodes.
        ManagementException - if an internal error occurs.
      • isReady

        boolean isReady​(int nodeID)
                 throws ManagementException

        Test whether a node is ready to receive management commands.

        Parameters:
        nodeID - node ID of the node.
        Throws:
        ManagementException - if an internal error occurs.
      • getPersistenceResources

        String[] getPersistenceResources()
                                  throws ManagementException

        Get the names of the persistence resources that have been defined for the node.

        Returns:
        the persistence resource names.
        Throws:
        ManagementException - if an internal error occurs.
        Since:
        Rhino 2.6.1
      • getClusterState

        TabularData getClusterState()
                             throws ManagementException

        Queries current cluster state returning a summary of the state of each cluster member.

        The cluster state is returned in TabularData format - one row is returned per cluster member. Each row contains the following information:

        Field Open Type Description

        node-id

        Integer

        Rhino cluster node id

        host

        String

        Name of the host on which the node is running

        node-type

        String

        Type of node, either "event-router" or "quorum"

        start-time

        Date

        Start time of the cluster node

        up-time

        Long

        Time the cluster node has been running in milliseconds

        slee-state

        String

        SLEE state

        active-alarms

        Integer

        Number of active alarms on the cluster node

        Returns:
        TabularData containing node status information.
        Throws:
        ManagementException - if an internal error occurs.
      • getDomainConfig

        TabularData getDomainConfig()
                             throws ManagementException

        Returns the current domain configuration.

        The domain config is returned in TabularData format - one row is returned per domain. Each row contains the following information:

        Field Open Type Description

        domain

        String

        Domain name

        memdb-resources

        String[]

        Array of memdb resource names

        ah-resources

        String[]

        Array of AH resource names

        nodes

        Integer[]

        Nodes associated with this domain

        Returns:
        TabularData containing node status information.
        Throws:
        ManagementException - if an internal error occurs.
      • getReplicatedMemDBStripingConfig

        TabularData getReplicatedMemDBStripingConfig()
                                              throws ManagementException

        Returns the current MemDB striping configuration for replicated MemDB instances.

        The striping config is returned in TabularData format - one row is returned per replicated MemDB instance. Each row contains the following information:

        Field Open Type Description

        memdb-resource

        String

        Memdb resource name

        stripe-count

        Integer

        The stripe count

        stripe-offset

        Integer

        The stripe offset

        Returns:
        TabularData containing node striping configuration information.
        Throws:
        ManagementException - if an internal error occurs.
      • flushKeyValueStores

        void flushKeyValueStores()
                          throws ManagementException

        Request that all application state waiting for persistence in all key/value stores in all event router nodes in the cluster be persisted to the backing database as soon as possible.

        Any unwritten application state buffered in the key/value stores at the time this operation is invoked will be flushed. Any further application state committed after the flush operation is initiated will be persisted at some future time in accordance with normal key/value store behaviour.

        This method blocks until the flush operation has completed.

        Throws:
        ManagementException - if an internal error occurs.
      • flushKeyValueStores

        void flushKeyValueStores​(int[] nodeIDs)
                          throws NullPointerException,
                                 InvalidArgumentException,
                                 ManagementException

        Request that all application state waiting for persistence in all key/value stores in the specified event router nodes be persisted to the backing database as soon as possible.

        Any unwritten application state buffered in the key/value stores at the time this operation is invoked will be flushed. Any further application state committed after the flush operation is initiated will be persisted at some future time in accordance with normal key/value store behaviour.

        This method blocks until the flush operation has completed.

        Parameters:
        nodeIDs - the node IDs of the nodes to flush. These must be event router nodes.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if any of the node IDs are invalid or not currently live event router nodes.
        ManagementException - if an internal error occurs.
      • flushConfiguration

        void flushConfiguration()
                         throws ManagementException

        Request that all configuration state waiting for persistence be persisted to the management database as soon as possible.

        This method is unnecessary during normal operation as configuration changes are usually persisted to the database within seconds (assuming availability). This method is primarily intended for automated systems which require certainty that configuration changes have been persisted.

        This method blocks until the flush operation has completed.

        Throws:
        ManagementException - if an internal error occurs.
      • getKeyValueStoreStatus

        TabularData getKeyValueStoreStatus​(int[] nodeIDs)
                                    throws NullPointerException,
                                           InvalidArgumentException,
                                           ManagementException

        Get the current operational status of the key/value stores on the specified nodes.

        The status is returned in TabularData format - one row is returned per (node, name) tuple. Each row contains the following information:

        Field Open Type Description

        node

        integer

        Node ID

        name

        String

        Name of the key/value store

        status

        String

        Operational status

        The following status values are universally defined:

        • booting - denotes that the indicated node is still booting up and initialising. For nodes in this state, the name column has a null value.

        • n/a - denotes that the indicated node has no namespace using a key/value store or the node is a quorum node. For nodes in this state, the name column has a null value.

        The Cassandra Key/Value Store also defines the follow status values:

        • connection failure - if a database connection for any Rhino persistence instance used by the key/value store cannot be established.

        • rebuilding tables - if all required database connections are up but some connections still require database keyspaces and/or tables to be set up.

        • in sync - if all database connections are up and all database keyspaces and tables have been set up.

        Parameters:
        nodeIDs - the node IDs of the nodes to get status information for.
        Returns:
        TabularData containing key/value store status information.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if any of the node IDs are invalid or not current cluster members.
        ManagementException - if an internal error occurs.
        Since:
        Rhino 3.0.0
      • getSessionOwnershipStoreStatus

        TabularData getSessionOwnershipStoreStatus​(int[] nodeIDs)
                                            throws NullPointerException,
                                                   InvalidArgumentException,
                                                   ManagementException

        Get the current operational status of the session ownership store on the specified nodes.

        The status is returned in TabularData format - one row is returned per node ID. Each row contains the following information:

        Field Open Type Description

        node

        integer

        Node ID

        status

        String

        Operational status

        The following status values are universally defined:

        • booting - denotes that the indicated node is still booting up and initialising.

        • n/a - denotes that the indicated node has no session ownership store configured or is a quorum node.

        The Cassandra Session Ownership Store also defines the follow status values:

        • connection failure - if a database connection for any Rhino persistence instance used by the session ownership store cannot be established.

        • rebuilding tables - if all required database connections are up but some connections still require database keyspaces and/or tables to be set up.

        • in sync - if all database connections are up and all database keyspaces and tables have been set up.

        Parameters:
        nodeIDs - the node IDs of the nodes to get status information for.
        Returns:
        TabularData containing session ownership store status information.
        Throws:
        NullPointerException - if nodeIDs is null.
        InvalidArgumentException - if any of the node IDs are invalid or not current cluster members.
        ManagementException - if an internal error occurs.
        Since:
        Rhino 3.0.0