org.I0Itec.zkclient.IZkConnection Java Examples

The following examples show how to use org.I0Itec.zkclient.IZkConnection. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ZkClient.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
public ZkClient(IZkConnection connection) {
    this(connection, Integer.MAX_VALUE);
}
 
Example #2
Source File: ZkClient.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
public ZkClient(IZkConnection connection, int connectionTimeout) {
    this(connection, connectionTimeout, new SerializableSerializer());
}
 
Example #3
Source File: ZkClient.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
public ZkClient(IZkConnection zkConnection, int connectionTimeout, ZkSerializer zkSerializer) {
    this(zkConnection, connectionTimeout, zkSerializer, -1, null);
}
 
Example #4
Source File: ZkClientx.java    From canal-1.1.3 with Apache License 2.0 4 votes vote down vote up
private ZkClientx(IZkConnection connection, int connectionTimeout){
    this(connection, connectionTimeout, new ByteSerializer());
}
 
Example #5
Source File: ZkClientx.java    From canal-1.1.3 with Apache License 2.0 4 votes vote down vote up
private ZkClientx(IZkConnection zkConnection, int connectionTimeout, ZkSerializer zkSerializer){
    super(zkConnection, connectionTimeout, zkSerializer);
}
 
Example #6
Source File: ZkClientX.java    From DataLink with Apache License 2.0 4 votes vote down vote up
public IZkConnection getConnection() {
    return _connection;
}
 
Example #7
Source File: ZkClient.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
public ZkClient(IZkConnection connection) {
    this(connection, Integer.MAX_VALUE);
}
 
Example #8
Source File: ZkClient.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
public ZkClient(IZkConnection connection, int connectionTimeout) {
    this(connection, connectionTimeout, new SerializableSerializer());
}
 
Example #9
Source File: ZkClient.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
public ZkClient(IZkConnection zkConnection, int connectionTimeout, ZkSerializer zkSerializer) {
    this(zkConnection, connectionTimeout, zkSerializer, -1, null);
}
 
Example #10
Source File: ZkClientx.java    From feeyo-redisproxy with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private ZkClientx(IZkConnection connection, int connectionTimeout){
    this(connection, connectionTimeout, new ByteSerializer());
}
 
Example #11
Source File: ZkClientx.java    From feeyo-redisproxy with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private ZkClientx(IZkConnection zkConnection, int connectionTimeout, ZkSerializer zkSerializer){
    super(zkConnection, connectionTimeout, zkSerializer);
}
 
Example #12
Source File: ZkClientx.java    From canal with Apache License 2.0 4 votes vote down vote up
private ZkClientx(IZkConnection connection, int connectionTimeout){
    this(connection, connectionTimeout, new ByteSerializer());
}
 
Example #13
Source File: ZkClientx.java    From canal with Apache License 2.0 4 votes vote down vote up
private ZkClientx(IZkConnection zkConnection, int connectionTimeout, ZkSerializer zkSerializer){
    super(zkConnection, connectionTimeout, zkSerializer);
}
 
Example #14
Source File: ZkClient.java    From DDMQ with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param zkConnection
 *            The Zookeeper servers
 * @param connectionTimeout
 *            The connection timeout in milli seconds
 * @param zkSerializer
 *            The Zookeeper data serializer
 * @param operationRetryTimeout
 *            Most operations done through this {@link org.I0Itec.zkclient.ZkClient} are retried in cases like
 *            connection loss with the Zookeeper servers. During such failures, this
 *            <code>operationRetryTimeout</code> decides the maximum amount of time, in milli seconds, each
 *            operation is retried. A value lesser than 0 is considered as
 *            "retry forever until a connection has been reestablished".
 */
public ZkClient(final IZkConnection zkConnection, final int connectionTimeout, final ZkSerializer zkSerializer, final long operationRetryTimeout, final IZkStateListener zkStateListener) {
    if (zkConnection == null) {
        throw new NullPointerException("Zookeeper connection is null!");
    }
    _connection = zkConnection;
    _zkSerializer = zkSerializer;
    _operationRetryTimeoutInMillis = operationRetryTimeout;
    _isZkSaslEnabled = isZkSaslEnabled();
    if(zkStateListener != null) {
        subscribeStateChanges(zkStateListener);
    }

    connect(connectionTimeout, this);
}
 
Example #15
Source File: ZkClient.java    From DDMQ with Apache License 2.0 3 votes vote down vote up
/**
 *
 * @param zkConnection
 *            The Zookeeper servers
 * @param connectionTimeout
 *            The connection timeout in milli seconds
 * @param zkSerializer
 *            The Zookeeper data serializer
 * @param operationRetryTimeout
 *            Most operations done through this {@link org.I0Itec.zkclient.ZkClient} are retried in cases like
 *            connection loss with the Zookeeper servers. During such failures, this
 *            <code>operationRetryTimeout</code> decides the maximum amount of time, in milli seconds, each
 *            operation is retried. A value lesser than 0 is considered as
 *            "retry forever until a connection has been reestablished".
 */
public ZkClient(final IZkConnection zkConnection, final int connectionTimeout, final ZkSerializer zkSerializer, final long operationRetryTimeout, final IZkStateListener zkStateListener) {
    if (zkConnection == null) {
        throw new NullPointerException("Zookeeper connection is null!");
    }
    _connection = zkConnection;
    _zkSerializer = zkSerializer;
    _operationRetryTimeoutInMillis = operationRetryTimeout;
    _isZkSaslEnabled = isZkSaslEnabled();
    if(zkStateListener != null) {
        subscribeStateChanges(zkStateListener);
    }

    connect(connectionTimeout, this);
}