Interface SimpleStrategyMBean

  • All Known Implementing Classes:
    MirroringAssignmentStrategy, SimpleAssignmentStrategy

    public interface SimpleStrategyMBean
    Standard MBean interface that exposes management attributes and operations for a SimpleAssignmentStrategy used by a PartitionedService.

    Each PartitionedService registers a single instance of this MBean bound to a JMX name of the form: "Coherence:type=PartitionAssignment,service={ServiceName},responsibility=DistributionCoordinator"

    The MBean is attached to a single instance of PartitionAssignmentStrategy object, which exists on the member that is the distribution coordinator for the service. The associated MBean will not be explicitly unregistered, but its name will be rebound to a new MBean instance if and when a different service member becomes the distribution coordinator.

    Since:
    Coherence 12.1.2
    Author:
    op 2012.08.23
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  SimpleStrategyMBean.HAStatus
      HAStatus represents the possible values to represent the High Availability Status of the associated PartitionedService.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String NOTIFY_LOST
      Notification type for a "partitions are lost and needs to be recovered" event.
    • Field Detail

      • NOTIFY_LOST

        static final String NOTIFY_LOST
        Notification type for a "partitions are lost and needs to be recovered" event.
        See Also:
        Constant Field Values
    • Method Detail

      • getStrategyName

        String getStrategyName()
        Get name of the PartitionAssignmentStrategy in use.
        Returns:
        partitioning strategy name
      • getLastAnalysisTime

        Date getLastAnalysisTime()
        Get the last time a partition distribution analysis was performed.
        Returns:
        the time of the last analysis
      • getCoordinatorId

        int getCoordinatorId()
        Get the node id of the ownership distribution coordinator.
        Returns:
        current distribution coordinator node id
      • getPartitionCount

        int getPartitionCount()
        Get the configured number of partitions for the service.
        Returns:
        the partition count
      • getBackupCount

        int getBackupCount()
        Get the configured number of backups.
        Returns:
        the backup count
      • getServiceNodeCount

        int getServiceNodeCount()
        Get the number of storage-enabled nodes running this service.
        Returns:
        the number of storage-enabled nodes
      • getServiceMachineCount

        int getServiceMachineCount()
        Get the number of machines that host storage-enabled nodes running this service.
        Returns:
        the number of machines with storage-enabled nodes
      • getServiceRackCount

        int getServiceRackCount()
        Get the number of racks that host storage-enabled nodes running this service.
        Returns:
        the number of racks with storage-enabled nodes
      • getServiceSiteCount

        int getServiceSiteCount()
        Get the number of sites that host storage-enabled nodes running this service.
        Returns:
        the number of sites with storage-enabled nodes
      • getHAStatus

        String getHAStatus()
        The High Availability status for the service.
        Returns:
        one of the following values: ENDANGERED, NODE-SAFE, MACHINE-SAFE, RACK-SAFE, SITE-SAFE
      • getHAStatusCode

        int getHAStatusCode()
        The High Availability status for the service as an integer.

        Below is an example of how to map a HA Status integer to a string:

         HAStatus.values()[getHAStatusCode()].name()
         
        Returns:
        integer representation of SimpleStrategyMBean.HAStatus
        Since:
        12.2.1.4.0
      • getHATarget

        String getHATarget()
        The High Availability status that this strategy attempts to achieve. Values are the same as for HAStatus attribute.
        Returns:
        the target High Availability status
      • getFairShareBackup

        int getFairShareBackup()
        Get the number of backup partitions per storage-enabled service member that this strategy will currently attempt to maintain.
        Returns:
        the number of backup partitions per storage-enabled member
      • getFairSharePrimary

        int getFairSharePrimary()
        Get the number of primary partitions per storage-enabled service member that this strategy will currently attempt to maintain.
        Returns:
        the number of primary partitions per storage-enabled member
      • getRemainingDistributionCount

        int getRemainingDistributionCount()
        Get the number of distributions (partition transfers) that remain to be completed before the service achieves the goals set by this strategy.
        Returns:
        the number of remaining partition transfers
      • getAveragePartitionSizeKB

        long getAveragePartitionSizeKB()
        Get the average partition storage size.
        Returns:
        the average partition storage size in kilobytes
      • getMaxPartitionSizeKB

        long getMaxPartitionSizeKB()
        Get the maximum partition storage size.
        Returns:
        the maximum partition storage size in kilobytes
      • getAverageStorageSizeKB

        long getAverageStorageSizeKB()
        Get the average node storage size.
        Returns:
        the average node storage size in kilobytes
      • getMaxStorageSizeKB

        long getMaxStorageSizeKB()
        Get maximum node storage size.
        Returns:
        the maximum node storage size in kilobytes
      • getMaxLoadNodeId

        int getMaxLoadNodeId()
        Get the node id with the maximum storage size.
        Returns:
        the node id with the maximum storage size
      • reportScheduledDistributions

        String reportScheduledDistributions​(boolean fVerbose)
        Report partitions that storage-enabled members are waiting to receive or still need to send in order to achieve distribution goal set by the strategy.
        Parameters:
        fVerbose - if true, the report includes partition numbers for each scheduled transfer
        Returns:
        a description of scheduled distributions for the service