Interface LoadBalancerPersistenceManagement

All Known Subinterfaces:
LoadBalancerPersistenceManagerMBean
All Known Implementing Classes:
LoadBalancerPersistenceManager

public interface LoadBalancerPersistenceManagement
Management interface for the load-balancer perisstence store.

All algorithm names used as parameter in the methods of this interface are the readable clear-text algorithm names.

Author:
Laurent Cohen
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(String channelID, String algorithm)
    Delete the specified algorithm state from the specified channel.
    void
    Delete the specified algorithm state from all the channels that have it.
    void
    Delete all entries in the persistece store.
    void
    deleteChannel(String channelID)
    Delete all entries for the specified channel.
    int
    Get the number of persistence operations, including load, store, delete and list, that have started but not yet completed.
    boolean
    hasAlgorithm(String channelID, String algorithm)
    Determine whether the specified channel has an entry for the specified algorithm in the persistence store.
    boolean
     
    List all the algorithms for which the specified channel has an entry in the persistence store.
    List all the channels that have an entry in the persistence store.
    List all the channels that have an entry in the persistence store for the specified algorithm.
  • Method Details

    • isPersistenceEnabled

      boolean isPersistenceEnabled()
      Returns:
      true if load-balancer persistence is enabled, false otherwise.
    • listAllChannels

      List<String> listAllChannels() throws LoadBalancerPersistenceException
      List all the channels that have an entry in the persistence store.
      Returns:
      a list of channel identifiers, possibly empty, but never null.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • listAlgorithms

      List<String> listAlgorithms(String channelID) throws LoadBalancerPersistenceException
      List all the algorithms for which the specified channel has an entry in the persistence store.
      Parameters:
      channelID - the identifier of the channel for which to list the algorithms.
      Returns:
      a list of algorithm names, possibly empty, but never null.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • listAllChannelsWithAlgorithm

      List<String> listAllChannelsWithAlgorithm(String algorithm) throws LoadBalancerPersistenceException
      List all the channels that have an entry in the persistence store for the specified algorithm.
      Parameters:
      algorithm - the name of the algorithm to lookup.
      Returns:
      a list of node identifiers, possibly empty, but never null.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • hasAlgorithm

      boolean hasAlgorithm(String channelID, String algorithm) throws LoadBalancerPersistenceException
      Determine whether the specified channel has an entry for the specified algorithm in the persistence store.
      Parameters:
      channelID - the identifier of the channel to check.
      algorithm - the name of the algorithm to lookup.
      Returns:
      true if the node has an entry for the algorithm, false otherwise.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • deleteAll

      void deleteAll() throws LoadBalancerPersistenceException
      Delete all entries in the persistece store.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • deleteChannel

      void deleteChannel(String channelID) throws LoadBalancerPersistenceException
      Delete all entries for the specified channel.
      Parameters:
      channelID - identifier of the channel to delete.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • deleteAlgorithm

      void deleteAlgorithm(String algorithm) throws LoadBalancerPersistenceException
      Delete the specified algorithm state from all the channels that have it.
      Parameters:
      algorithm - the name of the algorithm to delete.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • delete

      void delete(String channelID, String algorithm) throws LoadBalancerPersistenceException
      Delete the specified algorithm state from the specified channel.
      Parameters:
      channelID - identifier of the channel from which to delete the algorithm state.
      algorithm - the name of the algorithm to delete.
      Throws:
      LoadBalancerPersistenceException - if any error occurs.
    • getUncompletedOperations

      int getUncompletedOperations()
      Get the number of persistence operations, including load, store, delete and list, that have started but not yet completed.
      Returns:
      the number of uncompleted operations.