|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.pc.upgrade.ResourceUpgradeDelegate
public class ResourceUpgradeDelegate
This is a helper class to InventoryManager that takes care of resource upgrade.
Note that this class is not thread-safe in any manner.
This class must not call (explicitly or implicitly anywhere in its outgoing call chain)
any other plugin container manager other than the InventoryManager. This is because
this delegate is called within the Inventory Manager's initialize method and hence
many other managers are not yet initialized themselves yet.
| Constructor Summary | |
|---|---|
ResourceUpgradeDelegate(InventoryManager inventoryManager)
|
|
| Method Summary | |
|---|---|
void |
disable()
Disables all future operations of the delegate. |
boolean |
enabled()
Is the delegate enabled? In another words has the resource upgrade phase finished in the IventoryManager#initialize()
method? |
boolean |
hasUpgradeFailed(org.rhq.core.domain.resource.Resource resource)
Tells whether given resource had a upgrade failure during the processAndQueue(ResourceContainer) invocation. |
boolean |
hasUpgradeFailedInChildren(org.rhq.core.domain.resource.Resource parentResource,
org.rhq.core.domain.resource.ResourceType childrenResourceType)
Tells whether at least one of the children with given resource type of the given parent resource had an upgrade failure during processAndQueue(ResourceContainer) invocation. |
boolean |
hasUpgradeMergeFailed()
|
boolean |
processAndQueue(ResourceContainer resourceContainer)
Asks the resource's discovery component to upgrade the resource. |
void |
sendRequests()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceUpgradeDelegate(InventoryManager inventoryManager)
| Method Detail |
|---|
public boolean enabled()
IventoryManager#initialize()
method?
public void disable()
public boolean processAndQueue(ResourceContainer resourceContainer)
throws PluginContainerException
If later on the upgrade fails to finish due to communication error with server or the server doesn't approve some upgrades for whatever reason, the resources will be restarted with the original data.
resourceContainer -
PluginContainerException - on errorpublic boolean hasUpgradeMergeFailed()
sendRequests() threw an exception, false otherwisepublic boolean hasUpgradeFailed(org.rhq.core.domain.resource.Resource resource)
processAndQueue(ResourceContainer) invocation.
resource - the resource to test
public boolean hasUpgradeFailedInChildren(org.rhq.core.domain.resource.Resource parentResource,
org.rhq.core.domain.resource.ResourceType childrenResourceType)
processAndQueue(ResourceContainer) invocation.
public void sendRequests()
throws Throwable
Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||