Package org.jgroups.blocks
Class RequestOptions
- java.lang.Object
-
- org.jgroups.blocks.RequestOptions
-
public class RequestOptions extends java.lang.Object
Class which captures a bunch of options relevant to remote method invocation or message sending- Since:
- 2.10
- Author:
- Bela Ban
-
-
Field Summary
Fields Modifier and Type Field Description protected Address[]
exclusion_list
A list of members which should be excluded from a callprotected short
flags
The flags set in the message in which a request is sentprotected ResponseMode
mode
The mode of a request.protected RspFilter
rsp_filter
Allows for filtering of responsesprotected long
timeout
The max time (in ms) for a blocking call.protected short
transient_flags
protected boolean
use_anycasting
Turns on anycasting; this results in multiple unicasts rather than a multicast for group calls
-
Constructor Summary
Constructors Constructor Description RequestOptions()
RequestOptions(RequestOptions opts)
RequestOptions(ResponseMode mode, long timeout)
RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting)
RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter)
RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, short flags)
RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, Message.Flag... flags)
-
Method Summary
-
-
-
Field Detail
-
mode
protected ResponseMode mode
The mode of a request. Defined inResponseMode
e.g. GET_NONE, GET_ALL
-
timeout
protected long timeout
The max time (in ms) for a blocking call. 0 blocks until all responses have been received (if mode = GET_ALL)
-
use_anycasting
protected boolean use_anycasting
Turns on anycasting; this results in multiple unicasts rather than a multicast for group calls
-
rsp_filter
protected RspFilter rsp_filter
Allows for filtering of responses
-
flags
protected short flags
The flags set in the message in which a request is sent
-
transient_flags
protected short transient_flags
-
exclusion_list
protected Address[] exclusion_list
A list of members which should be excluded from a call
-
-
Constructor Detail
-
RequestOptions
public RequestOptions()
-
RequestOptions
public RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, Message.Flag... flags)
-
RequestOptions
public RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, short flags)
-
RequestOptions
public RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter)
-
RequestOptions
public RequestOptions(ResponseMode mode, long timeout)
-
RequestOptions
public RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting)
-
RequestOptions
public RequestOptions(RequestOptions opts)
-
-
Method Detail
-
SYNC
public static RequestOptions SYNC()
-
ASYNC
public static RequestOptions ASYNC()
-
getMode
public ResponseMode getMode()
-
mode
public ResponseMode mode()
-
setMode
public RequestOptions setMode(ResponseMode mode)
-
mode
public RequestOptions mode(ResponseMode mode)
-
getTimeout
public long getTimeout()
-
timeout
public long timeout()
-
setTimeout
public RequestOptions setTimeout(long timeout)
-
timeout
public RequestOptions timeout(long timeout)
-
getAnycasting
public boolean getAnycasting()
-
anycasting
public boolean anycasting()
-
setAnycasting
public RequestOptions setAnycasting(boolean a)
-
anycasting
public RequestOptions anycasting(boolean a)
-
getRspFilter
public RspFilter getRspFilter()
-
rspFilter
public RspFilter rspFilter()
-
setRspFilter
public RequestOptions setRspFilter(RspFilter filter)
-
rspFilter
public RequestOptions rspFilter(RspFilter filter)
-
getFlags
public short getFlags()
-
flags
public short flags()
-
getTransientFlags
public short getTransientFlags()
-
transientFlags
public short transientFlags()
-
getExclusionList
public Address[] getExclusionList()
-
exclusionList
public Address[] exclusionList()
-
hasExclusionList
public boolean hasExclusionList()
-
isFlagSet
public boolean isFlagSet(Message.Flag flag)
-
flagSet
public boolean flagSet(Message.Flag flag)
-
transientFlagSet
public boolean transientFlagSet(Message.TransientFlag flag)
-
setFlags
public RequestOptions setFlags(Message.Flag... flags)
-
flags
public RequestOptions flags(Message.Flag... flags)
-
setFlags
public RequestOptions setFlags(short flags)
Not recommended as the internal representation of flags might change (e.g. from short to int). UsesetFlags(Message.Flag...)
instead
-
setTransientFlags
public RequestOptions setTransientFlags(Message.TransientFlag... flags)
-
transientFlags
public RequestOptions transientFlags(Message.TransientFlag... flags)
-
setTransientFlags
public RequestOptions setTransientFlags(short flags)
Not recommended as the internal representation of flags might change (e.g. from short to int). UsesetTransientFlags(Message.TransientFlag...)
instead.
-
clearFlags
public RequestOptions clearFlags(Message.Flag... flags)
-
clearTransientFlags
public RequestOptions clearTransientFlags(Message.TransientFlag... flags)
-
exclusionList
public RequestOptions exclusionList(Address... mbrs)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-