org.jgroups.blocks
Class RequestOptions

java.lang.Object
  extended by 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
protected  java.util.Set<Address> exclusion_list
          A list of members which should be excluded from a call
protected  short flags
          The flags set in the message in which a request is sent
protected  ResponseMode mode
          The mode of a request.
protected  RspFilter rsp_filter
          Allows for filtering of responses
protected  short scope
          The scope of a message, allows for concurrent delivery of messages from the same sender
protected  long timeout
          The max time (in ms) for a blocking call.
protected  boolean use_anycast_addresses
          If use_anycasting is true: do we want to use an AnycastAddress [B,C] or a unicast to B and another unicast to C to send an anycast to {B,C} ? Only used if use_anycasting is true
protected  boolean use_anycasting
          Turns on anycasting; this results in multiple unicasts rather than a multicast for group calls
 
Constructor Summary
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, Message.Flag... flags)
           
RequestOptions(ResponseMode mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, short flags)
           
 
Method Summary
static RequestOptions ASYNC()
           
 RequestOptions clearFlags(Message.Flag... flags)
           
 boolean getAnycasting()
           
 java.util.Collection<Address> getExclusionList()
           
 short getFlags()
           
 ResponseMode getMode()
           
 RspFilter getRspFilter()
           
 short getScope()
           
 long getTimeout()
           
 boolean hasExclusionList()
           
 boolean isFlagSet(Message.Flag flag)
           
 RequestOptions setAnycasting(boolean use_anycasting)
           
 RequestOptions setExclusionList(Address... mbrs)
           
 RequestOptions setFlags(Message.Flag... flags)
           
 RequestOptions setMode(ResponseMode mode)
           
 RequestOptions setRspFilter(RspFilter rsp_filter)
           
 RequestOptions setScope(short scope)
           
 RequestOptions setTimeout(long timeout)
           
static RequestOptions SYNC()
           
 java.lang.String toString()
           
 boolean useAnycastAddresses()
           
 RequestOptions useAnycastAddresses(boolean flag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mode

protected ResponseMode mode
The mode of a request. Defined in ResponseMode 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


use_anycast_addresses

protected boolean use_anycast_addresses
If use_anycasting is true: do we want to use an AnycastAddress [B,C] or a unicast to B and another unicast to C to send an anycast to {B,C} ? Only used if use_anycasting is true


rsp_filter

protected RspFilter rsp_filter
Allows for filtering of responses


scope

protected short scope
The scope of a message, allows for concurrent delivery of messages from the same sender


flags

protected short flags
The flags set in the message in which a request is sent


exclusion_list

protected java.util.Set<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()

setMode

public RequestOptions setMode(ResponseMode mode)

getTimeout

public long getTimeout()

setTimeout

public RequestOptions setTimeout(long timeout)

getAnycasting

public boolean getAnycasting()

setAnycasting

public RequestOptions setAnycasting(boolean use_anycasting)

useAnycastAddresses

public boolean useAnycastAddresses()

useAnycastAddresses

public RequestOptions useAnycastAddresses(boolean flag)

getScope

public short getScope()

setScope

public RequestOptions setScope(short scope)

getRspFilter

public RspFilter getRspFilter()

setRspFilter

public RequestOptions setRspFilter(RspFilter rsp_filter)

getFlags

public short getFlags()

isFlagSet

public boolean isFlagSet(Message.Flag flag)

setFlags

public RequestOptions setFlags(Message.Flag... flags)

clearFlags

public RequestOptions clearFlags(Message.Flag... flags)

hasExclusionList

public boolean hasExclusionList()

getExclusionList

public java.util.Collection<Address> getExclusionList()

setExclusionList

public RequestOptions setExclusionList(Address... mbrs)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.