public class VirtualNode extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
VirtualNode.NoGHNFoundException
NoGHNFoundException exception
|
| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.common.core.utils.logging.GCUBELog |
logger
Object logger
|
| Modifier and Type | Method and Description |
|---|---|
void |
deploy()
Sends a request to the physical node to deploy the active list of packages to add
|
boolean |
equals(Object obj) |
protected static VirtualNode |
fromID(String ID,
org.gcube.common.core.scope.GCUBEScope scope) |
protected static VirtualNode |
fromName(String name,
org.gcube.common.core.scope.GCUBEScope scope) |
String |
getID()
Gets the node ghnID
|
String |
getName() |
protected Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> |
getPackages()
Gets the packagesToAdd available on this node
|
Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> |
getScheduledPackages()
Gets the packages scheduled for the next deployment on this node
|
org.gcube.common.core.scope.GCUBEScope |
getWorkingScope()
Gets the current scope used on this node
|
int |
hashCode() |
protected boolean |
hasPackages(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
Checks if a list of packagesToAdd is already on this node
|
void |
isNotWorking()
Marks the node as not working node
(usually called when a closed
DeployerReport is received from the node) |
void |
setCallbackID(String id) |
void |
setPackagesToAdd(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
Sets the packages to remove in the next
deploy() invocation |
void |
setPackagesToRemove(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
Sets the packages to remove in the next
undeploy() invocation |
void |
setPackagesToUpgrade(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
Sets the packages to upgrade in the next
upgrade() invocation |
void |
setWorkingScope(org.gcube.common.core.scope.GCUBEScope scope)
Assigns a working scope to the node
|
String |
toString() |
void |
undeploy()
Undeploys the packages from the node
|
void |
upgrade()
Upgrades packages on the node
|
protected final org.gcube.common.core.utils.logging.GCUBELog logger
protected static VirtualNode fromID(String ID, org.gcube.common.core.scope.GCUBEScope scope) throws VirtualNode.NoGHNFoundException
VirtualNode.NoGHNFoundExceptionprotected static VirtualNode fromName(String name, org.gcube.common.core.scope.GCUBEScope scope) throws VirtualNode.NoGHNFoundException
VirtualNode.NoGHNFoundExceptionpublic void setCallbackID(String id)
public void setPackagesToAdd(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
deploy() invocationpackages - the list of packagesT to addprotected Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> getPackages()
protected boolean hasPackages(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
packagesToAdd - the list of packagesToAdd to checkpublic String getID()
public void deploy()
throws Exception
Exception - if the deployment failspublic void undeploy()
throws Exception
Exception - if the operation failspublic void isNotWorking()
DeployerReport is received from the node)public void setPackagesToRemove(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
undeploy() invocationpackages - the packages to remove from the nodepublic void setPackagesToUpgrade(Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> packages)
upgrade() invocationpackages - the packages to remove from the nodepublic void setWorkingScope(org.gcube.common.core.scope.GCUBEScope scope)
scope - the scope to setpublic Set<org.gcube.common.vremanagement.deployer.stubs.common.PackageInfo> getScheduledPackages()
public org.gcube.common.core.scope.GCUBEScope getWorkingScope()
public String getName()
Copyright © 2014. All Rights Reserved.