All Packages Class Hierarchy This Package Previous Next Index
Class JavaGroups.EnsChannel
java.lang.Object
|
+----JavaGroups.Channel
|
+----JavaGroups.EnsChannel
- public class EnsChannel
- extends Channel
- implements Hot_Callbacks
EnsChannel is an implementation of Channel based on
Ensemble. It
maps a process group to a channel. Requirements are the presence of an executable called
outboard (which is Ensemble) and gossip running.
-
EnsChannel()
-
-
EnsChannel(Object)
- Creates a new EnsChannel, which spawns an outboard process and connects to it.
-
EnsChannel(Object, String, int)
- Creates a new EnsChannel.
-
AcceptedView(Hot_GroupContext, Object, Hot_ViewState)
-
-
Block(Hot_GroupContext, Object)
-
-
BlockOk()
- Called to acknowledge a Block (callback in
MembershipListener
or
BlockEvent
received from call to Receive
).
-
Close()
- Destroys the channel and its associated resources (e.g.
-
Connect(Object)
-
Connects the channel to a group.
-
Disconnect()
- Disconnects the channel from the current group (if connected), leaving the group.
-
Exit(Hot_GroupContext, Object)
-
-
finalize()
-
-
GetAllStates(Vector, long)
- Retrieve all states of the group members.
-
GetGroupAddress()
- Returns the group address of the group of which the channel is a member.
-
GetLocalAddress()
-
Returns the channel's own address.
-
GetOpt(int)
-
Gets an option.
-
GetState(Object, long)
- Retrieve the state of the group.
-
GetView()
- Gets the current view.
-
Heartbeat(Hot_GroupContext, Object, int)
-
-
Peek(long)
- Returns the next message, view, block, suspect or other event without removing
it from the queue.
-
Receive(long)
- Receives a message, a view change or a block event.
-
ReceiveCast(Hot_GroupContext, Object, Hot_Endpoint, Hot_Message)
-
-
ReceiveSend(Hot_GroupContext, Object, Hot_Endpoint, Hot_Message)
-
-
ReturnState(Object)
- Called by the application is response to receiving a
GetState
object when
calling Receive
.
-
Send(Message)
- Sends a message to a destination.
-
SetOpt(int, Object)
-
Sets an option.
EnsChannel
public EnsChannel() throws ChannelException
EnsChannel
public EnsChannel(Object props) throws ChannelException
- Creates a new EnsChannel, which spawns an outboard process and connects to it.
- Parameters:
- name - Channel name. All channels with the same name form a group.
- properties - Ensemble properties (cf. Ensemble reference manual).
A value of
null
uses the default properties.
EnsChannel
public EnsChannel(Object props,
String transport_props,
int outboard_port) throws ChannelException
- Creates a new EnsChannel. Instead of spawning a new outboard process, it connects to an
already running outboard process (on the same machine) using
outboard_port
.
This allows multiple EnsChannels to share a copy of outboard. If the port is 0, outboard
will be spawned. Parameter transport_props
defines the type
of transport to be used (UDP, ATM, IP MCAST etc).
- Parameters:
- properties - Ensemble properties (cf. Ensemble reference manual).
A value of
null
uses the default properties.
- transport_props - Transport parameters.
Null
means use default (UDP).
Example: "UDP:DEERING"
uses IP multicast (gossip is not
needed in this case).
- outboard_port - Port on which the local outboard process is listening. The outboard
process has to be started before. Value of 0 means spawn outboard
nevertheless.
Connect
public void Connect(Object address) throws ChannelClosed
- Connects the channel to a group.
- Overrides:
- Connect in class Channel
Disconnect
public void Disconnect()
- Disconnects the channel from the current group (if connected), leaving the group.
- Overrides:
- Disconnect in class Channel
Close
public void Close()
- Destroys the channel and its associated resources (e.g.
- Overrides:
- Close in class Channel
finalize
public void finalize()
- Overrides:
- finalize in class Object
Send
public void Send(Message msg) throws ChannelNotConnected, ChannelClosed
- Sends a message to a destination.
- Overrides:
- Send in class Channel
Receive
public Object Receive(long timeout) throws ChannelNotConnected, ChannelClosed, Timeout
- Receives a message, a view change or a block event.
- Overrides:
- Receive in class Channel
Peek
public Object Peek(long timeout) throws ChannelNotConnected, ChannelClosed, Timeout
- Returns the next message, view, block, suspect or other event without removing
it from the queue.
- Overrides:
- Peek in class Channel
GetView
public View GetView()
- Gets the current view.
- Overrides:
- GetView in class Channel
GetLocalAddress
public Object GetLocalAddress()
- Returns the channel's own address.
- Overrides:
- GetLocalAddress in class Channel
GetGroupAddress
public Object GetGroupAddress()
- Returns the group address of the group of which the channel is a member.
- Overrides:
- GetGroupAddress in class Channel
SetOpt
public void SetOpt(int option,
Object value)
- Sets an option.
- Overrides:
- SetOpt in class Channel
GetOpt
public Object GetOpt(int option)
- Gets an option.
- Overrides:
- GetOpt in class Channel
BlockOk
public void BlockOk()
- Called to acknowledge a Block (callback in
MembershipListener
or
BlockEvent
received from call to Receive
).
- Overrides:
- BlockOk in class Channel
GetState
public boolean GetState(Object target,
long timeout)
- Retrieve the state of the group.
- Overrides:
- GetState in class Channel
GetAllStates
public boolean GetAllStates(Vector targets,
long timeout)
- Retrieve all states of the group members.
- Overrides:
- GetAllStates in class Channel
ReturnState
public void ReturnState(Object state)
- Called by the application is response to receiving a
GetState
object when
calling Receive
.
- Overrides:
- ReturnState in class Channel
ReceiveCast
public void ReceiveCast(Hot_GroupContext gctx,
Object env,
Hot_Endpoint origin,
Hot_Message msg)
ReceiveSend
public void ReceiveSend(Hot_GroupContext gctx,
Object env,
Hot_Endpoint origin,
Hot_Message msg)
AcceptedView
public void AcceptedView(Hot_GroupContext gctx,
Object env,
Hot_ViewState viewState)
Heartbeat
public void Heartbeat(Hot_GroupContext gctx,
Object env,
int rate)
Block
public void Block(Hot_GroupContext gctx,
Object env)
Exit
public void Exit(Hot_GroupContext gctx,
Object env)
All Packages Class Hierarchy This Package Previous Next Index