com.continuent.tungsten.common.cluster.resource
Class Resource
java.lang.Object
com.continuent.tungsten.common.cluster.resource.Resource
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- Cluster, ClusterManager, DataServer, DataSource, DataSource, Folder, Monitor, Operation, Process, Queue, RemoteDataService, Replicator, ResourceConfiguration, ResourceManager, ResourceTree, RootResource, SQLRouter
public class Resource
- extends java.lang.Object
- implements java.io.Serializable
- Author:
- edward
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
type
protected ResourceType type
description
protected java.lang.String description
isContainer
protected boolean isContainer
isExecutable
protected boolean isExecutable
compositeMember
protected java.lang.Boolean compositeMember
childType
protected ResourceType childType
Resource
public Resource()
Resource
public Resource(ResourceType type,
java.lang.String name)
toProperties
public TungstenProperties toProperties()
describe
public java.lang.String describe(boolean detailed)
- Describe this instance, in detail if necessary.
- Parameters:
detailed -
- Returns:
- string description of this resource
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
getKey
public java.lang.String getKey()
getName
public java.lang.String getName()
- Returns:
- the name
setName
public void setName(java.lang.String name)
- Parameters:
name - the name to set
getType
public ResourceType getType()
- Returns:
- the type
setType
public void setType(ResourceType type)
- Parameters:
type - the type to set
isContainer
public boolean isContainer()
- Returns:
- the isContainerResource
setContainer
public void setContainer(boolean isContainer)
- Parameters:
isContainer - the isContainer to set
isExecutable
public boolean isExecutable()
- Returns:
- the isExecutable
setExecutable
public void setExecutable(boolean isExecutable)
- Parameters:
isExecutable - the isExecutable to set
getChildType
public ResourceType getChildType()
- Returns:
- the childType
setChildType
public void setChildType(ResourceType childType)
- Parameters:
childType - the childType to set
getCompositeMember
public java.lang.Boolean getCompositeMember()
- Returns the compositeMember value.
- Returns:
- Returns the compositeMember. True if the resource is part of a higher level Composite DataService
setCompositeMember
public void setCompositeMember(java.lang.Boolean compositeMember)
- Sets the compositeMember value.
- Parameters:
compositeMember - The compositeMember to set.
copyTo
public Resource copyTo(Resource destination)
- Copies values from fields of this instance to another instance
- Parameters:
destination -
- Returns:
- the copied resource
toJSON
public java.lang.String toJSON()
throws ResourceException
- Throws:
ResourceException