com.bigdata.jini.start
Enum ServiceConfigurationZNodeEnum

java.lang.Object
  extended by java.lang.Enum<ServiceConfigurationZNodeEnum>
      extended by com.bigdata.jini.start.ServiceConfigurationZNodeEnum
All Implemented Interfaces:
Serializable, Comparable<ServiceConfigurationZNodeEnum>

public enum ServiceConfigurationZNodeEnum
extends Enum<ServiceConfigurationZNodeEnum>

Type-safe enum classifying the different kinds of znodes for a ServiceConfiguration.

Version:
$Id$
Author:
Bryan Thompson

Enum Constant Summary
LogicalService
          A logicalService.
MasterElection
          A container whose children are the physical services competing to become the master for a logical service.
MasterElectionLock
          An ephemeral znode representing one of the physical services competing to become the master for a logical service.
PhysicalService
          An ephemeral znode representing physical service instance.
PhysicalServicesContainer
          A container whose children are ephemeral znodes representing physical service instances.
ServiceConfiguration
          A ServiceConfiguration znode.
 
Method Summary
static ServiceConfigurationZNodeEnum getType(String serviceConfigZPath, String zpath)
          Given the zpath of a ServiceConfiguration znode and another zpath, return the type of that other zpath.
static ServiceConfigurationZNodeEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ServiceConfigurationZNodeEnum[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ServiceConfiguration

public static final ServiceConfigurationZNodeEnum ServiceConfiguration
A ServiceConfiguration znode.


LogicalService

public static final ServiceConfigurationZNodeEnum LogicalService
A logicalService.


PhysicalServicesContainer

public static final ServiceConfigurationZNodeEnum PhysicalServicesContainer
A container whose children are ephemeral znodes representing physical service instances.


MasterElection

public static final ServiceConfigurationZNodeEnum MasterElection
A container whose children are the physical services competing to become the master for a logical service.


MasterElectionLock

public static final ServiceConfigurationZNodeEnum MasterElectionLock
An ephemeral znode representing one of the physical services competing to become the master for a logical service.


PhysicalService

public static final ServiceConfigurationZNodeEnum PhysicalService
An ephemeral znode representing physical service instance.

Method Detail

values

public static ServiceConfigurationZNodeEnum[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ServiceConfigurationZNodeEnum c : ServiceConfigurationZNodeEnum.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ServiceConfigurationZNodeEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getType

public static ServiceConfigurationZNodeEnum getType(String serviceConfigZPath,
                                                    String zpath)
Given the zpath of a ServiceConfiguration znode and another zpath, return the type of that other zpath.

Parameters:
serviceConfigZPath - The zpath of the ServiceConfiguration znode.
zpath - The other zpath.
Returns:
The type of the other znode.
Throws:
RuntimeException - if the other zpath can not be classified.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.