|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.resources.servicecore.LeasedListManager
public class LeasedListManager
This class provides an implementation of a LeaseListener which uses manages a
LinkedList of ServiceResource objects which reflect the
resources being leased. This class must be registered with the
LandlordLessor, and will be notified as resources are leased,
updated or removed
LandlordLessor,
ResourceLessor| Constructor Summary | |
|---|---|
LeasedListManager()
|
|
| Method Summary | |
|---|---|
void |
expired(LeasedResource resource)
Notifies the manager of a lease expiration |
ServiceResource |
getNext()
Returns the next ServiceResource in the list of
ServiceResource elements that have been leased. |
ServiceResource |
getPrevious()
Returns the previous ServiceResource in the list of
ServiceResource elements that have been leased. |
ServiceResource[] |
getServiceResources()
This method returns a snapshot of the ServiceResource objects in the LinkedList of resources |
void |
putLast(ServiceResource sr)
This method will move the ServiceResource from wherever it is in the list to the last element in the list |
void |
register(LeasedResource resource)
Notifies the manager of a new lease being created. |
void |
removed(LeasedResource resource)
Notifies the manager of a lease removal |
void |
removeResource(ServiceResource resource)
Removes a ServiceResource from the managed Collection of ServiceResource elements |
void |
renewed(LeasedResource resource)
Notifies the manager of a lease being renewed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LeasedListManager()
| Method Detail |
|---|
public ServiceResource[] getServiceResources()
public void removeResource(ServiceResource resource)
resource - The ServiceResource to removepublic void putLast(ServiceResource sr)
sr - The ServiceResource to move
public ServiceResource getNext()
throws NoSuchElementException
ServiceResource in the list of
ServiceResource elements that have been leased. The
behavior of this method is simply to remove the first element from the
LinkedList and append it to the end of the list.
Use of this method provides access to the list of
ServiceResource elements traversing in a forward
direction.
If there is only one element in the list, the that element will be
returned each time this method is called.
NoSuchElementException - if the iteration is empty
public ServiceResource getPrevious()
throws NoSuchElementException
ServiceResource in the list of
ServiceResource elements that have been leased. The
behavior of this method is simply to remove the last element from the
LinkedList and append it to the beginning of the list.
Use of this method provides access to the list of
ServiceResource elements traversing in a forward
direction.
If there is only one element in the list, the that element will be
returned each time this method is called.
NoSuchElementException - if the iteration is emptypublic void expired(LeasedResource resource)
expired in interface LeaseListenerresource - The resource associated with the expirationpublic void removed(LeasedResource resource)
removed in interface LeaseListenerresource - The resource associated with the removalpublic void register(LeasedResource resource)
register in interface LeaseListenerresource - The resource associated with the new Lease.public void renewed(LeasedResource resource)
renewed in interface LeaseListenerresource - The resource associated with the new Lease.
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||