public interface

HelixConnection

org.apache.helix.HelixConnection
Known Indirect Subclasses

Class Overview

Helix connection (aka helix manager)

Summary

Public Methods
abstract void addConfigChangeListener(HelixRole role, ScopedConfigChangeListener listener, ClusterId clusterId, HelixConfigScope.ConfigScopeProperty scope)
add config change listener for a scope
abstract void addConnectionStateListener(HelixConnectionStateListener listener)
add connection state listener
abstract void addControllerListener(HelixRole role, ControllerChangeListener listener, ClusterId clusterId)
add controller listener
abstract void addControllerMessageListener(HelixRole role, MessageListener listener, ClusterId clusterId)
add controller message listener
abstract void addCurrentStateChangeListener(HelixRole role, CurrentStateChangeListener listener, ClusterId clusterId, ParticipantId participantId, SessionId sessionId)
add current state change listener
abstract void addExternalViewChangeListener(HelixRole role, ExternalViewChangeListener listener, ClusterId clusterId)
add external view change listener
abstract void addIdealStateChangeListener(HelixRole role, IdealStateChangeListener listener, ClusterId clusterId)
add ideal state change listener
abstract void addInstanceConfigChangeListener(HelixRole role, InstanceConfigChangeListener listener, ClusterId clusterId)
add instance config change listener
abstract void addLiveInstanceChangeListener(HelixRole role, LiveInstanceChangeListener listener, ClusterId clusterId)
add live-instance listener using this connection
abstract void addMessageListener(HelixRole role, MessageListener listener, ClusterId clusterId, ParticipantId participantId)
add message listener
abstract void connect()
start connection
abstract ClusterAccessor createClusterAccessor(ClusterId clusterId)
create a cluster-accessor
abstract HelixAdmin createClusterManagementTool()
Provides admin interface to setup and modify cluster
abstract HelixController createController(ClusterId clusterId, ControllerId controllerId)
create a helix-controller
abstract HelixDataAccessor createDataAccessor(ClusterId clusterId)
create a data-accessor
abstract ClusterMessagingService createMessagingService(HelixRole role)
create messaging service using this connection
abstract HelixMultiClusterController createMultiClusterController(ClusterId clusterId, ControllerId controllerId)
create a multi-cluster controller
abstract HelixParticipant createParticipant(ClusterId clusterId, ParticipantId participantId)
create a helix-participant
abstract HelixPropertyStore<ZNRecord> createPropertyStore(ClusterId clusterId)
create a default property-store for a cluster
abstract void disconnect()
close connection
abstract ConfigAccessor getConfigAccessor()
get config accessor
abstract HelixManagerProperties getHelixProperties()
get helix properties
abstract String getHelixVersion()
get helix version
abstract SessionId getSessionId()
get session id
abstract int getSessionTimeout()
get session timeout
abstract boolean isConnected()
test if connection is started
abstract void removeConnectionStateListener(HelixConnectionStateListener listener)
remove connection state listener
abstract boolean removeListener(HelixRole role, Object listener, PropertyKey key)
remove a listener

Public Methods

public abstract void addConfigChangeListener (HelixRole role, ScopedConfigChangeListener listener, ClusterId clusterId, HelixConfigScope.ConfigScopeProperty scope)

add config change listener for a scope

public abstract void addConnectionStateListener (HelixConnectionStateListener listener)

add connection state listener

public abstract void addControllerListener (HelixRole role, ControllerChangeListener listener, ClusterId clusterId)

add controller listener

public abstract void addControllerMessageListener (HelixRole role, MessageListener listener, ClusterId clusterId)

add controller message listener

public abstract void addCurrentStateChangeListener (HelixRole role, CurrentStateChangeListener listener, ClusterId clusterId, ParticipantId participantId, SessionId sessionId)

add current state change listener

public abstract void addExternalViewChangeListener (HelixRole role, ExternalViewChangeListener listener, ClusterId clusterId)

add external view change listener

public abstract void addIdealStateChangeListener (HelixRole role, IdealStateChangeListener listener, ClusterId clusterId)

add ideal state change listener

public abstract void addInstanceConfigChangeListener (HelixRole role, InstanceConfigChangeListener listener, ClusterId clusterId)

add instance config change listener

public abstract void addLiveInstanceChangeListener (HelixRole role, LiveInstanceChangeListener listener, ClusterId clusterId)

add live-instance listener using this connection

public abstract void addMessageListener (HelixRole role, MessageListener listener, ClusterId clusterId, ParticipantId participantId)

add message listener

public abstract void connect ()

start connection

public abstract ClusterAccessor createClusterAccessor (ClusterId clusterId)

create a cluster-accessor

Returns
  • cluster-accessor

public abstract HelixAdmin createClusterManagementTool ()

Provides admin interface to setup and modify cluster

Returns
  • instantiated HelixAdmin

public abstract HelixController createController (ClusterId clusterId, ControllerId controllerId)

create a helix-controller

Returns
  • helix-controller

public abstract HelixDataAccessor createDataAccessor (ClusterId clusterId)

create a data-accessor

Returns
  • data-accessor

public abstract ClusterMessagingService createMessagingService (HelixRole role)

create messaging service using this connection

Returns
  • messaging-service

public abstract HelixMultiClusterController createMultiClusterController (ClusterId clusterId, ControllerId controllerId)

create a multi-cluster controller

public abstract HelixParticipant createParticipant (ClusterId clusterId, ParticipantId participantId)

create a helix-participant

Returns
  • helix-participant

public abstract HelixPropertyStore<ZNRecord> createPropertyStore (ClusterId clusterId)

create a default property-store for a cluster

Returns
  • property-store

public abstract void disconnect ()

close connection

public abstract ConfigAccessor getConfigAccessor ()

get config accessor

Returns
  • config accessor

public abstract HelixManagerProperties getHelixProperties ()

get helix properties

Returns
  • helix-properties

public abstract String getHelixVersion ()

get helix version

Returns
  • helix version

public abstract SessionId getSessionId ()

get session id

Returns
  • session id of current connection

public abstract int getSessionTimeout ()

get session timeout

Returns
  • session timeout in millisecond

public abstract boolean isConnected ()

test if connection is started

Returns
  • true if connection is started, false otherwise

public abstract void removeConnectionStateListener (HelixConnectionStateListener listener)

remove connection state listener

public abstract boolean removeListener (HelixRole role, Object listener, PropertyKey key)

remove a listener