Package com.sun.solaris.service.pools
Class Pool
- java.lang.Object
-
- com.sun.solaris.service.pools.Element
-
- com.sun.solaris.service.pools.Pool
-
- All Implemented Interfaces:
Property
,PropertyWalk
public class Pool extends Element
ThePool
class represents a Resource Pool.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
associate(Resource res)
Associate this pool with the supplied resource.void
dissociate(Resource res)
Dissociate this pool from the supplied resource.boolean
equals(java.lang.Object o)
Indicates whether some other Pool is "equal to this one.protected long
getElem()
Return the pointer to this pool as an element.java.lang.String
getInformation(int deep)
Returns a descriptive string which describes the pool.java.util.List
getResources(java.util.List values)
Get a list of resources which match the supplied selection criteria in values.int
hashCode()
Returns a hash code value for the object.java.lang.String
toString()
Returns a string representation of this pool.-
Methods inherited from class com.sun.solaris.service.pools.Element
getBoolProperty, getDoubleProperty, getLongProperty, getProperty, getStringProperty, putProperty, rmProperty, walk, walkProperties
-
-
-
-
Method Detail
-
associate
public void associate(Resource res) throws PoolsException
Associate this pool with the supplied resource.- Parameters:
res
- A resource in the same configuration as this pool.- Throws:
PoolsException
- If there is an error whilst associating the resource with the pool.
-
dissociate
public void dissociate(Resource res) throws PoolsException
Dissociate this pool from the supplied resource.- Parameters:
res
- A resource in the same configuration as this pool.- Throws:
PoolsException
- If there is an error whilst dissociating the resource from the pool.
-
getResources
public java.util.List getResources(java.util.List values) throws PoolsException
Get a list of resources which match the supplied selection criteria in values. Only resources which are associated with this pool are searched.- Parameters:
values
- A list of values to be used to qualify the search.- Returns:
- a list of resources which match the supplied criteria
- Throws:
PoolsException
- If there is an error executing the query.
-
getInformation
public java.lang.String getInformation(int deep) throws PoolsException
Returns a descriptive string which describes the pool.- Specified by:
getInformation
in classElement
- Parameters:
deep
- Whether the information should contain information about all contained elements.- Returns:
- a descriptive string which describes the pool.
- Throws:
PoolsException
- If the pool cannot be located.
-
toString
public java.lang.String toString()
Returns a string representation of this pool.
-
equals
public boolean equals(java.lang.Object o)
Indicates whether some other Pool is "equal to this one.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- the reference object with which to compare.- Returns:
true
if this object is the same as the o argument;false
otherwise.- See Also:
hashCode()
-
hashCode
public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided byjava.util.Hashtable
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code value for this object.
- See Also:
equals(java.lang.Object)
,Hashtable
-
getElem
protected long getElem() throws PoolsException
Return the pointer to this pool as an element.- Specified by:
getElem
in classElement
- Returns:
- The pointer to the native pool which this object wraps.
- Throws:
PoolsException
- If there is an error converting the native pool pointer to a native elem pointer.
-
-