Rio Project 4.2 API Documentation



org.rioproject.monitor
Class LeastActiveSelector

java.lang.Object
  extended by org.rioproject.monitor.ServiceResourceSelector
      extended by org.rioproject.monitor.LeastActiveSelector
All Implemented Interfaces:
LeaseListener

public class LeastActiveSelector
extends ServiceResourceSelector

LeastActiveSelector is used to select a target Cybernode for provisioning. The strategy used here is to sort the list of all available Cybernodes and use the one with the least number of active services.

Author:
Dennis Reedy

Field Summary
 
Fields inherited from class org.rioproject.monitor.ServiceResourceSelector
collection, collectionLock, landlord
 
Constructor Summary
LeastActiveSelector()
           
 
Method Summary
protected  void add(LeasedResource resource)
          If the Collection backed by the concrete class requires processing other then that defined by Collection.add override this method to provide the appropriate semantics
protected  void remove(LeasedResource resource)
          If the Collection backed by the concrete class requires processing other then that defined by Collection.remove override this method to provide the appropriate semantics
 void serviceResourceSelected(ServiceResource resource)
          Called when resource is selected.
 
Methods inherited from class org.rioproject.monitor.ServiceResourceSelector
expired, getServiceResource, getServiceResource, getServiceResources, register, removed, renewed, selectServiceResource, setLandlordLessor, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeastActiveSelector

public LeastActiveSelector()
Method Detail

serviceResourceSelected

public void serviceResourceSelected(ServiceResource resource)
Called when resource is selected.

Specified by:
serviceResourceSelected in class ServiceResourceSelector
Parameters:
resource - The selected ServiceResource

add

protected void add(LeasedResource resource)
Description copied from class: ServiceResourceSelector
If the Collection backed by the concrete class requires processing other then that defined by Collection.add override this method to provide the appropriate semantics

Overrides:
add in class ServiceResourceSelector
Parameters:
resource - The LeasedResource to add

remove

protected void remove(LeasedResource resource)
Description copied from class: ServiceResourceSelector
If the Collection backed by the concrete class requires processing other then that defined by Collection.remove override this method to provide the appropriate semantics

Overrides:
remove in class ServiceResourceSelector
Parameters:
resource - The LeasedResource to remove

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.