nyla.solutions.global.patterns.loadbalancer.LoadBalanceRegistry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nyla.solutions.global Show documentation
Show all versions of nyla.solutions.global Show documentation
Nyla Solutions Global Java API provides support for basic application
utilities (application configuration, data encryption, debugger and text
processing).
The newest version!
package nyla.solutions.global.patterns.loadbalancer;
import java.util.Collection;
/**
* Implement round robin/other balancing for call distributions and routing.
*
* Used by the COMMAS Partition data service implementation
* @author Gregory Green
*
* @param
* @param
*/
public interface LoadBalanceRegistry
{
/**
* Lookup item registered with key or return new register previously registered based on balancing
* @param key
* @return
*/
V lookup(K key);
void register(K key, V associated );
void register(V associated );
/**
*
* @return all registered locations
*/
Collection listRegistered();
/**
* Remote all keys and registration for the association
* @param associated
*/
void unregister(V associated);
/**
*
* @return next available location
*/
V next();
}