com.tivoli.twg.mscs
Class MSCSManagedObject

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGObject
      extended bycom.tivoli.twg.engine.TWGPersistentObject
          extended bycom.tivoli.twg.engine.TWGManagedObject
              extended bycom.tivoli.twg.engine.cluster.TWGClusterManagedObject
                  extended bycom.tivoli.twg.mscs.MSCSManagedObject
All Implemented Interfaces:
TWGBaseShadowedObject, TWGGetSetDescInterface, TWGGetSetInterface, TWGPersistentObjectSubclassRestorable, TWGShadowedObject

public class MSCSManagedObject
extends TWGClusterManagedObject

Microsoft Cluster Services cluster managed object.


Field Summary
static int BLK_CLUSTERNAMEOFF_OFF
           
static int BLK_CLUSTERRESIDOFF_OFF
           
static int BLK_CLUSTERVERSIONOFF_OFF
           
static int BLK_HDRLEN
           
static int BLK_HDRLEN_000
           
static int BLK_HDRLEN_001
           
static int BLK_HDRLEN_OFF
          Persistent record format ULONG hdrlen ULONG off_clustername ULONG off_clusversion ULONG off_clusterresid
static java.lang.String CLASSNAME
           
 
Fields inherited from class com.tivoli.twg.engine.TWGManagedObject
CLIENT_SERVICE_NOT_SUPPORTED, CLIENT_SERVICE_START_FAILED, CLIENT_SERVICE_START_SUCCEEDED, CLIENT_SERVICE_STOP_FAILED, CLIENT_SERVICE_STOP_SUCCEEDED, MO_SHADOW_ATTRIB_FLAGS_OFF, MO_SHADOW_CNTTASK_OFF, MO_SHADOW_HDRLEN, MO_SHADOW_HDRLEN_001, MO_SHADOW_HDRLEN_OFF, MO_SHADOW_IMGSET_OFF, MO_SHADOW_OFFNAME_OFF, MO_SHADOW_OFFTASK_OFF, MO_SHADOW_PINGINT_OFF, MO_SHADOW_STATE_OFF, MOSTATE_ERROR_OFFLINE, MOSTATE_ERROR_ONLINE, MOSTATE_INDETERMINATE, MOSTATE_INVALID_OBJECT, MOSTATE_NORMAL_OFFLINE, MOSTATE_NORMAL_ONLINE, MOSTATE_UNKNOWN, MOSTATE_UNLICENSED, SHADOWCLASSNAME
 
Fields inherited from class com.tivoli.twg.engine.TWGPersistentObject
CLASS_NAME, SIZEOF_BYTE, SIZEOF_CHAR, SIZEOF_DOUBLE, SIZEOF_FLOAT, SIZEOF_INT, SIZEOF_LONG, SIZEOF_SHORT
 
Constructor Summary
MSCSManagedObject()
          Default constructor for cluster managed object
MSCSManagedObject(java.lang.String name, java.lang.String resid, IntValueSet init_moids)
          Constructor for creating new cluster
 
Method Summary
protected  void copyTo(TWGManagedObject managedObject)
          Copy instance data to another managed object.
 void Delete()
          Destructor for MSCSManagedObject: remove object from lists
 void Destroy()
          Destroy for MSCSManagedObject
static MSCSManagedObject findClusterByObject(TWGManagedObject obj)
          Find cluster containing given object
static MSCSManagedObject findMSCSObjectByName(java.lang.String cluster_name)
          Find MSCS cluster instance by name
static MSCSManagedObject findMSCSObjectByNameResID(java.lang.String cluster_resid)
          Find MSCS cluster instance by resource ID
 java.lang.String getAttributeDescription(java.lang.String id, java.util.Locale loc)
          Get description string for given attribute in given locale
 java.lang.String[] getAttributeIDList()
          Attribute ID enumeration : this method is expected to return a List of strings containing the String names of the attributes supported for a given object.
 int getAttributeType(java.lang.String id)
          Get type of attribute value for given attribute
 DataValue getAttributeValue(java.lang.String id, java.util.Locale loc)
          Get value of attribute with given ID
 java.lang.String getAttributeValueString(java.lang.String id, java.util.Locale loc)
          Get descriptive value string for given attribute in given locale
 java.lang.String[] GetAvailablePaths()
          Return all available IPC paths
 java.lang.String getClusterName()
          Get name of cluster
 java.lang.String getClusterNodeName(int id)
          Get computer name of cluster node
 java.lang.String getClusterResourceID()
          Get cluster resource ID
 java.lang.String getClusterServicesVersion()
          Get version of cluster services : format is "major.minor.build"
 TWGNativeManagedObject getPreferredNode()
          Get current preferred node to access cluster thorough
 java.lang.String getPreferredPath()
          Get current preferred IPC path from server to client
 boolean removeMember(int rem_moid)
          Remove member managed object from cluster :
protected  void restoreData(TWGPersistentObjectDictionary dictionary, boolean resolveObjectReferences)
          Restore support for persistant object.
protected  void saveData(TWGPersistentObjectDictionary dictionary)
          Save support for persistant object.
 boolean setAttributeValue(java.lang.String id, DataValue val)
          Set value of attribute with given ID
 void setNodeBad(int id)
          Mark given node as bad (don't use for agent communications)
 void setNodeBad(TWGManagedObject node)
          Mark given node as bad (don't use for agent communications)
 void setNodeGood(TWGManagedObject node)
          Mark given node as good (use for agent communications)
 void SetObjectID(long oid)
          Set object ID.
 boolean startPing()
          Start a ping on this cluster.
 
Methods inherited from class com.tivoli.twg.engine.cluster.TWGClusterManagedObject
addNewMember, getMemberIDs, isMember, isMember, removeMember
 
Methods inherited from class com.tivoli.twg.engine.TWGManagedObject
AddClientService, addDatabaseRecord, addTask, addTask, categorizedManagedObjectIDs, clearPingInterval, ClientServiceStart, ClientServiceStart, ClientServiceStop, ClientServiceStop, containsTask, containsTask, deregisterNewOSListener, FindByAttributeValue, FindByAttributeValue, getAddressEntryRecord, getAddressEntryShadowClass, getAgentPingInterval, getAgentTimezoneOffset, getAllManagedObjectIDs, getAllManagedObjects, GetClientServices, GetConShadowClass, getDatabaseList, getEventCorrelator, getFingerprint, getImageSet, getLicenseVersionRequired, getManagedObjectByID, getManagedObjectsSupportingClientService, getMof, getName, getOEMID, getPinger, getPingInterval, getPingInterval, getPingType, GetShadowRecord, GetShadowVersion, getState, getTaskListAsIds, getTaskListSize, initializeRestoredLicenses, initializeRestoredStatusGroups, ipAddressChangeNotify, isAccessDenied, isAccessRequestSupported, isAttribFlagSet, isClientSecureSupported, IsClientServiceSupported, isClientUnsecure, isConsoleDeletable, isConsoleRenamable, isEncryptionEnabled, isPowerdownSupported, isRestartSupported, isServerMO, isShutdownSupported, isTMADetectable, isTMADetected, isWakeOnLANSupported, licenseGranted, licenseRequired, ObjectAddressEntryChangeNotify, ObjectChangedNotify, ObjectCreateNotify, ObjectDestroyNotify, ObjectStateChangeNotify, processGrantRevokeLicense, registerClientServiceSubscriber, registerIPAddressChangeListener, RegisterLifeCycleListener, registerNewOSListener, RegisterStateListener, reissueLicenses, removeAllTaskAssociations, removeAllTaskAssociations, RemoveClientService, removeTask, removeTask, ReplaceClientServiceList, reportOSTypeAndVersion, requestAccess, requestClientSecure, requestPowerdown, requestRestart, requestShutdown, requestWakeOnLAN, saveAndUpdateIfNeeded, setAccessDenied, setAccessRequestSupported, setAgentPingInterval, setAgentTimezoneOffset, setAsServerMO, setClientSec ureSupported, setClientUnsecureFlag, setConsoleDeletable, setConsoleRenamable, setEncryptionEnabled, setEventCorrelator, setImageSet, setName, setOEMID, setPinger, setPingInterval, setPowerdownSupported, setRestartSupported, setShutdownSupported, setState, setTMADetectable, setTMADetected, setWakeOnLANSupported, startPing, startPing, startPingWithReauthenticate, synchronizedObjectWithDatabase, toString, unregisterClientServiceSubscriber, unregisterIPAddressChangeListener, UnregisterLifeCycleListener, UnregisterStateListener, updateNameInDatabaseRecord, UpdateShadowVersion, updateStateInDatabaseRecord
 
Methods inherited from class com.tivoli.twg.engine.TWGPersistentObject
enableAsyncWrites, fromPersistID, initialize, isNewPersistentStore, isSaveRequired, PersistID, restore, restoreAll, save, save, setSaveRequired, terminate, toPersistID
 
Methods inherited from class com.tivoli.twg.engine.TWGObject
AllObjects, AllObjects, DumpTWGObjects, FindObject, isDeleted, isNewObject, isPersistent, isPersistent, isValid, isValid, ObjectID, setDistinctObjectID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

BLK_HDRLEN_OFF

public static final int BLK_HDRLEN_OFF
Persistent record format ULONG hdrlen ULONG off_clustername ULONG off_clusversion ULONG off_clusterresid

See Also:
Constant Field Values

BLK_CLUSTERNAMEOFF_OFF

public static final int BLK_CLUSTERNAMEOFF_OFF
See Also:
Constant Field Values

BLK_CLUSTERVERSIONOFF_OFF

public static final int BLK_CLUSTERVERSIONOFF_OFF
See Also:
Constant Field Values

BLK_CLUSTERRESIDOFF_OFF

public static final int BLK_CLUSTERRESIDOFF_OFF
See Also:
Constant Field Values

BLK_HDRLEN

public static final int BLK_HDRLEN
See Also:
Constant Field Values

BLK_HDRLEN_000

public static final int BLK_HDRLEN_000
See Also:
Constant Field Values

BLK_HDRLEN_001

public static final int BLK_HDRLEN_001
See Also:
Constant Field Values
Constructor Detail

MSCSManagedObject

public MSCSManagedObject()
Default constructor for cluster managed object


MSCSManagedObject

public MSCSManagedObject(java.lang.String name,
                         java.lang.String resid,
                         IntValueSet init_moids)
                  throws TWGPersistentObjectSaveException
Constructor for creating new cluster

Parameters:
name - - name of cluster
resid - - resource ID of cluster
init_moids - - initial MOIDs which are member of cluster
Throws:
TWGPersistentObjectSaveException - if error creating object
Method Detail

copyTo

protected void copyTo(TWGManagedObject managedObject)
Copy instance data to another managed object.

Overrides:
copyTo in class TWGClusterManagedObject
Parameters:
managedObject - target managed object.

Delete

public void Delete()
Destructor for MSCSManagedObject: remove object from lists

Overrides:
Delete in class TWGClusterManagedObject

Destroy

public void Destroy()
             throws TWGObjectDestroyException
Destroy for MSCSManagedObject

Overrides:
Destroy in class TWGClusterManagedObject
Throws:
TWGObjectDestroyException - if error during destroy

saveData

protected void saveData(TWGPersistentObjectDictionary dictionary)
                 throws TWGPersistentObjectSaveException
Save support for persistant object. This method saves all managed object fields that are persistant in nature.

Overrides:
saveData in class TWGClusterManagedObject
Throws:
TWGPersistentObjectSaveException - if error on save

restoreData

protected void restoreData(TWGPersistentObjectDictionary dictionary,
                           boolean resolveObjectReferences)
                    throws TWGPersistentObjectRestoreException
Restore support for persistant object. This method restores managed object fields that are persistant in nature.

Overrides:
restoreData in class TWGClusterManagedObject
Throws:
TWGPersistentObjectRestoreException - if restore error

SetObjectID

public void SetObjectID(long oid)
                 throws DuplicateObjectIDException
Set object ID. This method subclasses the TWGObject class's SetObjectID. This call is needed so that Managed object class instances can be registered with the appropriate TreeNode instances within the ManagedObjectFactory.

Overrides:
SetObjectID in class TWGClusterManagedObject
Parameters:
oid - - new object ID, or INVALID_OBJECT_ID if none
Throws:
DuplicateObjectIDException - if ID is duplicate

findMSCSObjectByName

public static MSCSManagedObject findMSCSObjectByName(java.lang.String cluster_name)
Find MSCS cluster instance by name

Parameters:
cluster_name - - Cluster Name

findMSCSObjectByNameResID

public static MSCSManagedObject findMSCSObjectByNameResID(java.lang.String cluster_resid)
Find MSCS cluster instance by resource ID

Parameters:
cluster_resid - - Cluster resource ID

getPreferredPath

public java.lang.String getPreferredPath()
Get current preferred IPC path from server to client

Returns:
Preferred IPC path

getPreferredNode

public TWGNativeManagedObject getPreferredNode()
Get current preferred node to access cluster thorough


GetAvailablePaths

public java.lang.String[] GetAvailablePaths()
Return all available IPC paths

Returns:
list of IPC paths

getAttributeIDList

public java.lang.String[] getAttributeIDList()
Description copied from class: TWGManagedObject
Attribute ID enumeration : this method is expected to return a List of strings containing the String names of the attributes supported for a given object. Subclasses of base classes implementing the interface should report additional attributes by adding them to the list returned by the base class.

Specified by:
getAttributeIDList in interface TWGGetSetInterface
Overrides:
getAttributeIDList in class TWGClusterManagedObject

getAttributeValue

public DataValue getAttributeValue(java.lang.String id,
                                   java.util.Locale loc)
Get value of attribute with given ID

Specified by:
getAttributeValue in interface TWGGetSetInterface
Overrides:
getAttributeValue in class TWGClusterManagedObject
Parameters:
id - - attribute ID requested
loc - - locale to use for value, if applicable
Returns:
value object, or null if no value

setAttributeValue

public boolean setAttributeValue(java.lang.String id,
                                 DataValue val)
Set value of attribute with given ID

Specified by:
setAttributeValue in interface TWGGetSetInterface
Overrides:
setAttributeValue in class TWGClusterManagedObject
Parameters:
id - - attribute ID to be set
val - - attribute value to be set
Returns:
true if set successful, false if not successful

getAttributeType

public int getAttributeType(java.lang.String id)
Get type of attribute value for given attribute

Specified by:
getAttributeType in interface TWGGetSetInterface
Overrides:
getAttributeType in class TWGClusterManagedObject
Parameters:
id - - attribute ID
Returns:
DataValue type of attribute, or DataValue.NONE_TYPE if undefined

getAttributeDescription

public java.lang.String getAttributeDescription(java.lang.String id,
                                                java.util.Locale loc)
Get description string for given attribute in given locale

Specified by:
getAttributeDescription in interface TWGGetSetDescInterface
Overrides:
getAttributeDescription in class TWGClusterManagedObject
Parameters:
id - - attribute ID
loc - - locale to use for description
Returns:
description string, or null if not available

getAttributeValueString

public java.lang.String getAttributeValueString(java.lang.String id,
                                                java.util.Locale loc)
Get descriptive value string for given attribute in given locale

Specified by:
getAttributeValueString in interface TWGGetSetDescInterface
Overrides:
getAttributeValueString in class TWGClusterManagedObject
Parameters:
id - - attribute ID
loc - - locale to use for description
Returns:
descriptive string for attribute value, or null if not available

startPing

public boolean startPing()
Start a ping on this cluster. This refreshes the cluster's configuration and state.

Overrides:
startPing in class TWGManagedObject
Returns:
TRUE: Ping function supported. FALSE: Function not supported for this instance.

getClusterName

public java.lang.String getClusterName()
Get name of cluster


getClusterResourceID

public java.lang.String getClusterResourceID()
Get cluster resource ID


getClusterServicesVersion

public java.lang.String getClusterServicesVersion()
Get version of cluster services : format is "major.minor.build"


findClusterByObject

public static MSCSManagedObject findClusterByObject(TWGManagedObject obj)
Find cluster containing given object

Parameters:
obj - - object contained in MSCS cluster
Returns:
cluster found, or null if not found

setNodeBad

public void setNodeBad(TWGManagedObject node)
Mark given node as bad (don't use for agent communications)

Parameters:
node - - managed object of node

setNodeBad

public void setNodeBad(int id)
Mark given node as bad (don't use for agent communications)

Parameters:
id - - persistent ID of node

setNodeGood

public void setNodeGood(TWGManagedObject node)
Mark given node as good (use for agent communications)

Parameters:
node - - managed object of node

removeMember

public boolean removeMember(int rem_moid)
                     throws InvalidObjectIDException
Remove member managed object from cluster :

Overrides:
removeMember in class TWGClusterManagedObject
Parameters:
rem_moid - - Persistent ID of managed object to be removed
Returns:
true if was member, false if was not
Throws:
InvalidObjectIDException

getClusterNodeName

public java.lang.String getClusterNodeName(int id)
Get computer name of cluster node

Parameters:
id - - persistent ID of node
Returns:
computer name, or "" if not found/available