org.fusesource.fabric.zookeeper.spring
Class ZKServerFactoryBean
java.lang.Object
org.fusesource.fabric.zookeeper.spring.ZKServerFactoryBean
- All Implemented Interfaces:
- org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.apache.zookeeper.server.ZooKeeperServer>, org.springframework.beans.factory.InitializingBean
public class ZKServerFactoryBean
- extends java.lang.Object
- implements org.springframework.beans.factory.FactoryBean<org.apache.zookeeper.server.ZooKeeperServer>, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
A simple ZK server for testing ZK related code in unit tests
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tickTime
protected int tickTime
ZKServerFactoryBean
public ZKServerFactoryBean()
getObject
public org.apache.zookeeper.server.ZooKeeperServer getObject()
throws java.lang.Exception
- Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<org.apache.zookeeper.server.ZooKeeperServer>
- Throws:
java.lang.Exception
getObjectType
public java.lang.Class<org.apache.zookeeper.server.ZooKeeperServer> getObjectType()
- Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<org.apache.zookeeper.server.ZooKeeperServer>
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<org.apache.zookeeper.server.ZooKeeperServer>
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
destroy
public void destroy()
throws java.lang.Exception
- Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
- Throws:
java.lang.Exception
shutdown
protected void shutdown()
getZooKeeperServer
public org.apache.zookeeper.server.ZooKeeperServer getZooKeeperServer()
getConnectionFactory
public org.apache.zookeeper.server.NIOServerCnxnFactory getConnectionFactory()
getDataLogDir
public java.io.File getDataLogDir()
getDataDir
public java.io.File getDataDir()
getTickTime
public int getTickTime()
getMinSessionTimeout
public int getMinSessionTimeout()
getMaxSessionTimeout
public int getMaxSessionTimeout()
getClientPortAddress
public java.net.InetSocketAddress getClientPortAddress()
getMaxClientConnections
public int getMaxClientConnections()
setClientPortAddress
public void setClientPortAddress(java.net.InetSocketAddress clientPortAddress)
setConnectionFactory
public void setConnectionFactory(org.apache.zookeeper.server.NIOServerCnxnFactory connectionFactory)
setDataDir
public void setDataDir(java.io.File dataDir)
setDataLogDir
public void setDataLogDir(java.io.File dataLogDir)
setMaxClientConnections
public void setMaxClientConnections(int maxClientConnections)
setMaxSessionTimeout
public void setMaxSessionTimeout(int maxSessionTimeout)
setMinSessionTimeout
public void setMinSessionTimeout(int minSessionTimeout)
setTickTime
public void setTickTime(int tickTime)
setZooKeeperServer
public void setZooKeeperServer(org.apache.zookeeper.server.ZooKeeperServer zooKeeperServer)
isPurge
public boolean isPurge()
setPurge
public void setPurge(boolean purge)
getZKOutputDir
protected java.io.File getZKOutputDir()
Copyright © 2012 FuseSource. All Rights Reserved.