com.netflix.curator.ensemble.fixed
Class FixedEnsembleProvider

java.lang.Object
  extended by com.netflix.curator.ensemble.fixed.FixedEnsembleProvider
All Implemented Interfaces:
EnsembleProvider, java.io.Closeable

public class FixedEnsembleProvider
extends java.lang.Object
implements EnsembleProvider

Standard ensemble provider that wraps a fixed connection string


Constructor Summary
FixedEnsembleProvider(java.lang.String connectionString)
          The connection string to use
 
Method Summary
 void close()
          Curator will call this method when CuratorZookeeperClient.close() is called
 java.lang.String getConnectionString()
          Return the current connection string to use.
 void start()
          Curator will call this method when CuratorZookeeperClient.start() is called
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedEnsembleProvider

public FixedEnsembleProvider(java.lang.String connectionString)
The connection string to use

Parameters:
connectionString - connection string
Method Detail

start

public void start()
           throws java.lang.Exception
Description copied from interface: EnsembleProvider
Curator will call this method when CuratorZookeeperClient.start() is called

Specified by:
start in interface EnsembleProvider
Throws:
java.lang.Exception - errors

close

public void close()
           throws java.io.IOException
Description copied from interface: EnsembleProvider
Curator will call this method when CuratorZookeeperClient.close() is called

Specified by:
close in interface EnsembleProvider
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException - errors

getConnectionString

public java.lang.String getConnectionString()
Description copied from interface: EnsembleProvider
Return the current connection string to use. Curator will call this each time it needs to create a ZooKeeper instance

Specified by:
getConnectionString in interface EnsembleProvider
Returns:
connection string (per ZooKeeper.ZooKeeper(String, int, Watcher) etc.)