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.
 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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.