Interface InstanceMetadataContext

All Known Implementing Classes:
SimpleInstanceMetadataContext

public interface InstanceMetadataContext
Provides data for an Instance, which is representative of the physical machine running one or more nodes. Each Node will have a special NodeId that allows the remote services to access the information about the underlying instance.
  • Method Details

    • start

      default void start()
    • stop

      default void stop()
    • getNodeIds

      Set<NodeId> getNodeIds()
      Gets all NodeIds housed within the instance.
      Returns:
      the Set<NodeId> of all running and active nodes on the instance
    • getInstanceQuality

      double getInstanceQuality()
      Represents the instance's current load factor. This returns a double in the range of [0, 1], with the higher number representing a greater load. Load represents a single average measurement of how loaded the system is and this number may not necessary equate to CPU load.
      Returns:
      the instance's load
    • getInstanceMetadataAsync

      AsyncOperation getInstanceMetadataAsync(Consumer<InstanceMetadata> success, Consumer<Throwable> failure)
      Asynchronous method to fetch the
      Parameters:
      success -
      failure -
      Returns: