Rio Project 4.2 API Documentation
org.rioproject.monitor
Class RoundRobinSelector
java.lang.Object
org.rioproject.monitor.ServiceResourceSelector
org.rioproject.monitor.RoundRobinSelector
- All Implemented Interfaces:
- LeaseListener
public class RoundRobinSelector
- extends ServiceResourceSelector
This class provides an implementation of a
ServiceResourceSelector which manages a
LinkedList of ServiceResource objects which
reflect the resources being leased. This class organizes list items in a
round robin fashion, putting a used elements last in the list one they are
selected. This class must be registered with the LandlordLessor,
and will be notified as resources are lease, updated or removed
- Author:
- Dennis Reedy
- See Also:
LandlordLessor,
ResourceLessor
|
Method Summary |
void |
serviceResourceSelected(ServiceResource svcResource)
This method allows concrete implementations of this class to order the
Collection of ServiceResource instances based on a ServiceResource being
selected |
protected void |
update(LeasedResource resource)
Override parent's update method to provide proper LinkedList behavior |
| Methods inherited from class org.rioproject.monitor.ServiceResourceSelector |
add, expired, getServiceResource, getServiceResource, getServiceResources, register, remove, removed, renewed, selectServiceResource, setLandlordLessor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoundRobinSelector
public RoundRobinSelector()
- Construct a RoundRobinSelector
serviceResourceSelected
public void serviceResourceSelected(ServiceResource svcResource)
- Description copied from class:
ServiceResourceSelector
- This method allows concrete implementations of this class to order the
Collection of ServiceResource instances based on a ServiceResource being
selected
- Specified by:
serviceResourceSelected in class ServiceResourceSelector
- Parameters:
svcResource - A ServiceResource instance selected for provisioning a
ServiceBean- See Also:
ServiceResourceSelector.serviceResourceSelected(org.rioproject.resources.servicecore.ServiceResource)
update
protected void update(LeasedResource resource)
- Override parent's update method to provide proper LinkedList behavior
- Overrides:
update in class ServiceResourceSelector
- Parameters:
resource - The LeasedResource
Copyright © 2006-2011 Rio Project. All Rights Reserved.