jet.server.api.rmi.cluster
Interface RemoteClusterService

All Superinterfaces:
java.rmi.Remote

public interface RemoteClusterService
extends java.rmi.Remote

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

Since:
5.2

Method Summary
 Member getAdminMember()
          Returns the admin member of the cluster.
 Member[] getAllMembers()
          Returns remote members.
 java.lang.String getClusterName()
          Returns the cluster name.
 RemoteLoadBalancer 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(RemoteLoadBalancer lb)
          Sets default load balancer.
 

Method Detail

getClusterName

java.lang.String getClusterName()
                                throws java.rmi.RemoteException
Returns the cluster name.

Returns:
the cluster name.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer
Since:

getAllMembers

Member[] getAllMembers()
                       throws java.rmi.RemoteException,
                              ClusterException
Returns remote members.

Returns:
remote members.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer
ClusterException - if a ClusterException occurs.
Since:

getLocalMember

Member getLocalMember()
                      throws java.rmi.RemoteException
Returns the local member.

Returns:
the local member.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.
Since:

getAdminMember

Member getAdminMember()
                      throws java.rmi.RemoteException,
                             ClusterException
Returns the admin member of the cluster.

Returns:
the admin member.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.
ClusterException - if a ClusterException occurs.
Since:
5.0

getDefaultLoadBalancer

RemoteLoadBalancer getDefaultLoadBalancer()
                                          throws java.rmi.RemoteException
Gets the default load balancer.

Returns:
the default load balancer.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.
Since:

setDefaultLoadBalancer

void setDefaultLoadBalancer(RemoteLoadBalancer lb)
                            throws java.rmi.RemoteException
Sets default load balancer.

Parameters:
lb - the default load balancer.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.
Since:

getMember

Member getMember()
                 throws java.rmi.RemoteException
Selects a member by a load balancer. Using the default load balancer if the load balancer is null.

Returns:
the member.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.
Since:

registerLocalMember

void registerLocalMember()
                         throws java.rmi.RemoteException,
                                ClusterException
register local member in cluster's member table.

Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.
ClusterException - if a ClusterException occurs.

removeLocalMember

void removeLocalMember()
                       throws java.rmi.RemoteException,
                              ClusterException
remove local member from cluster's member table.

Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.
ClusterException - if a ClusterException occurs.

isAdminServerCrashed

boolean isAdminServerCrashed()
                             throws java.rmi.RemoteException
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.
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer.

isTaskQueueFull

boolean isTaskQueueFull(int priority)
                        throws java.rmi.RemoteException,
                               ClusterException
return whether cluster server task queue is full.

Returns:
If cluster task queue is full return true, otherwise return false
Throws:
java.rmi.RemoteException - if a RemoteException occurs in remote RptServer
ClusterException - if a ClusterException occurs.