com.bigdata.jini.start.config
Class ZookeeperServerEntry

java.lang.Object
  extended by com.bigdata.jini.start.config.ZookeeperServerEntry

public class ZookeeperServerEntry
extends Object

A description of a zookeeper server entry as found in a configuration file.

Version:
$Id$
Author:
Bryan Thompson

Field Summary
protected static boolean DEBUG
           
 String hostname
          The hostname for the server instance.
 int id
          The zookeeper service instance number (the value written in its myid file).
protected static boolean INFO
           
 int leaderPort
          The second port (used for leader elections).
protected static org.apache.log4j.Logger log
           
 int peerPort
          The first port (used for peer communications).
 
Constructor Summary
ZookeeperServerEntry(int id, String val)
          Parses the value associated with a server entry.
 
Method Summary
 String getValue()
          Return a representation of the property value that would be used for this server.
 boolean isLocalHost()
          Return true if this is server entry for the local host.
 String toString()
          Returns a representation of the server property as name=value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

INFO

protected static final boolean INFO

DEBUG

protected static final boolean DEBUG

id

public final int id
The zookeeper service instance number (the value written in its myid file).


hostname

public final String hostname
The hostname for the server instance.


peerPort

public final int peerPort
The first port (used for peer communications).


leaderPort

public final int leaderPort
The second port (used for leader elections).

Constructor Detail

ZookeeperServerEntry

public ZookeeperServerEntry(int id,
                            String val)
Parses the value associated with a server entry.

Parameters:
id - The zookeeper service instance number.
val - The value as found in a zookeeper configuration file.
Method Detail

getValue

public String getValue()
Return a representation of the property value that would be used for this server.


toString

public String toString()
Returns a representation of the server property as name=value.

Overrides:
toString in class Object

isLocalHost

public boolean isLocalHost()
                    throws SocketException,
                           UnknownHostException
Return true if this is server entry for the local host.

Throws:
SocketException
UnknownHostException


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