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 TypeMethodDescriptionvoidDelete the specified algorithm state from the specified channel.voiddeleteAlgorithm(String algorithm) Delete the specified algorithm state from all the channels that have it.voidDelete all entries in the persistece store.voiddeleteChannel(String channelID) Delete all entries for the specified channel.intGet the number of persistence operations, including load, store, delete and list, that have started but not yet completed.booleanhasAlgorithm(String channelID, String algorithm) Determine whether the specified channel has an entry for the specified algorithm in the persistence store.booleanlistAlgorithms(String channelID) 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.listAllChannelsWithAlgorithm(String algorithm) List all the channels that have an entry in the persistence store for the specified algorithm.
-
Method Details
-
isPersistenceEnabled
boolean isPersistenceEnabled()- Returns:
trueif load-balancer persistence is enabled,falseotherwise.
-
listAllChannels
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 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 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
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:
trueif the node has an entry for the algorithm,falseotherwise.- Throws:
LoadBalancerPersistenceException- if any error occurs.
-
deleteAll
Delete all entries in the persistece store.- Throws:
LoadBalancerPersistenceException- if any error occurs.
-
deleteChannel
Delete all entries for the specified channel.- Parameters:
channelID- identifier of the channel to delete.- Throws:
LoadBalancerPersistenceException- if any error occurs.
-
deleteAlgorithm
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
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.
-