org.jgroups.ensemble

Class Hot_Ensemble

Implemented Interfaces:
java.lang.Runnable

public class Hot_Ensemble
extends java.lang.Object
implements java.lang.Runnable

Field Summary

int
HOT_ENS_MSG_SEND_CURRENT_VIEW
int
HOT_ENS_MSG_SEND_NEXT_VIEW
int
HOT_ENS_MSG_SEND_UNSPECIFIED_VIEW

Constructor Summary

Hot_Ensemble()
Constructs a Hot_Ensemble object starting the Ensemble Outboard process on a random port between 5000 and 8000
Hot_Ensemble(int port)
Constructs a Hot_Ensemble object starting the Ensemble Outboard process on the specified port.

Method Summary

Hot_Error
cast(Hot_GroupContext gc, Hot_Message orig_msg, int[] send_view)
Broadcast a Hot_Message to the group specified in the Hot_GroupContext
Hot_Error
changeProperties(Hot_GroupContext gc, String properties)
Change the properties of the group specified by the Hot_GroupContext to the properties specified by the String
Hot_Error
changeProtocol(Hot_GroupContext gc, String protocol)
Change the protocol used by the group specified by the Hot_GroupContext to the protocol specified by the String
void
destroyOutboard()
Destroys the associated outboard process.
Hot_Error
join(Hot_JoinOps jops, Hot_GroupContext gctx)
Join the Ensemble group specified in the Hot_JoinOps structure
Hot_Error
leave(Hot_GroupContext gc)
Leave the Ensemble group specified in the Hot_GroupContext
static void
panic(String s)
Halts the application with the error specified by the String
Hot_Error
requestNewView(Hot_GroupContext gc)
Request a new view in the group specified by the Hot_GroupContext
void
run()
Mainloop of the process
Hot_Error
send(Hot_GroupContext gc, Hot_Endpoint dest, Hot_Message orig_msg, int[] send_view)
Send a Hot_Message to member specified by the Hot_Endpoint in the group specified by the Hot_GroupContext
void
setDebug(boolean b)
Set whether or not to display lots of debug information.
void
stopEnsThread()
Hot_Error
suspect(Hot_GroupContext gc, Hot_Endpoint[] suspects)
NOT SUPPORTED CURRENTLY IN THE ML
static void
trace(String s)
Prints (or does not print) the specified string to standard error based upon the debug flag

Field Details

HOT_ENS_MSG_SEND_CURRENT_VIEW

public final int HOT_ENS_MSG_SEND_CURRENT_VIEW


HOT_ENS_MSG_SEND_NEXT_VIEW

public final int HOT_ENS_MSG_SEND_NEXT_VIEW


HOT_ENS_MSG_SEND_UNSPECIFIED_VIEW

public final int HOT_ENS_MSG_SEND_UNSPECIFIED_VIEW

Constructor Details

Hot_Ensemble

public Hot_Ensemble()
Constructs a Hot_Ensemble object starting the Ensemble Outboard process on a random port between 5000 and 8000


Hot_Ensemble

public Hot_Ensemble(int port)
Constructs a Hot_Ensemble object starting the Ensemble Outboard process on the specified port. If you use this version of the constructor, you are expected to make sure the port is not already in use. You can check for successful startup by invoking isOutboardStarted();

Method Details

cast

public Hot_Error cast(Hot_GroupContext gc,
                      Hot_Message orig_msg,
                      int[] send_view)
Broadcast a Hot_Message to the group specified in the Hot_GroupContext


changeProperties

public Hot_Error changeProperties(Hot_GroupContext gc,
                                  String properties)
Change the properties of the group specified by the Hot_GroupContext to the properties specified by the String


changeProtocol

public Hot_Error changeProtocol(Hot_GroupContext gc,
                                String protocol)
Change the protocol used by the group specified by the Hot_GroupContext to the protocol specified by the String


destroyOutboard

public void destroyOutboard()
Destroys the associated outboard process. All instances of Hot_Ensemble (in an instance of the VM) use the same outboard process (currently). So, if you destroy the outboard process for one instance, it gets destroyed for all instances. A future version of Ensemble/Java will change this restriction.


join

public Hot_Error join(Hot_JoinOps jops,
                      Hot_GroupContext gctx)
Join the Ensemble group specified in the Hot_JoinOps structure


leave

public Hot_Error leave(Hot_GroupContext gc)
Leave the Ensemble group specified in the Hot_GroupContext


panic

public static void panic(String s)
Halts the application with the error specified by the String


requestNewView

public Hot_Error requestNewView(Hot_GroupContext gc)
Request a new view in the group specified by the Hot_GroupContext


run

public void run()
Mainloop of the process


send

public Hot_Error send(Hot_GroupContext gc,
                      Hot_Endpoint dest,
                      Hot_Message orig_msg,
                      int[] send_view)
Send a Hot_Message to member specified by the Hot_Endpoint in the group specified by the Hot_GroupContext


setDebug

public void setDebug(boolean b)
Set whether or not to display lots of debug information. Default: false


stopEnsThread

public void stopEnsThread()


suspect

public Hot_Error suspect(Hot_GroupContext gc,
                         Hot_Endpoint[] suspects)
NOT SUPPORTED CURRENTLY IN THE ML


trace

public static void trace(String s)
Prints (or does not print) the specified string to standard error based upon the debug flag


Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.