Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api.cluster
Interface ClusterService

    public interface ClusterService

A interface which represent a cluster service. It provides active members info and load balancer etc.

Since:
  5.0

Method Summary
`Member` | `getAdminMember()` Returns the admin member of the cluster.
`Member[]` | `getAllMembers()` Returns remote members.
`java.lang.String` | `getClusterName()` Returns the cluster name.
`LoadBalancer` | `getDefaultLoadBalancer()` Gets the default load balancer.
`Member` | `getLocalMember()` Returns the local member.
`Member` | `getMember()` Selects a member by a load balancer.
`boolean` | `isAdminServerCrashed()` Judge that if admin server is really crashed.
`boolean` | `isTaskQueueFull(int priority)` return whether cluster server task queue is full.
`void` | `registerLocalMember()` register local member in cluster's member table.
`void` | `removeLocalMember()` remove local member from cluster's member table.
`void` | `setDefaultLoadBalancer(LoadBalancer lb)` Sets default load balancer.

Method Detail

### getClusterName

    java.lang.String getClusterName()

  Returns the cluster name.

  Returns:
    the cluster name.
  Since:

### getAllMembers

    Member[] getAllMembers()
                           throws ClusterException

  Returns remote members.

  Returns:
    remote members.
  Throws:
    `ClusterException`
  Since:

### getLocalMember

    Member getLocalMember()

  Returns the local member.

  Returns:
    the local member.
  Since:

### getAdminMember

    Member getAdminMember()
                          throws ClusterException

  Returns the admin member of the cluster.

  Returns:
    the admin member.
  Throws:
    `ClusterException`
  Since:
    5.0

### getDefaultLoadBalancer

    LoadBalancer getDefaultLoadBalancer()

  Gets the default load balancer.

  Returns:
    the default load balancer.
  Since:

### setDefaultLoadBalancer

    void setDefaultLoadBalancer(LoadBalancer lb)

  Sets default load balancer.

  Parameters:
    `lb` - the default load balancer.
  Since:

### getMember

    Member getMember()

  Selects a member by a load balancer. Using the default load balancer if the load balancer is null.

  Returns:
    the member.
  Since:

### registerLocalMember

    void registerLocalMember()
                             throws ClusterException

  register local member in cluster's member table.

  Throws:
    `ClusterException`

### removeLocalMember

    void removeLocalMember()
                           throws ClusterException

  remove local member from cluster's member table.

  Throws:
    `ClusterException`

### isAdminServerCrashed

    boolean isAdminServerCrashed()

  Judge that if admin server is really crashed. Invoke this method when java.rmi.ConnectException or java.rmi.ConnectIOExcetpion was caught.

  Returns:
    true if admin server is really crashed, otherwise false.

### isTaskQueueFull

    boolean isTaskQueueFull(int priority)

  return whether cluster server task queue is full.

  Returns:
    If cluster task queue is full return true, otherwise return false

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD