<commit_before>package org.jgroups.blocks;

import org.jgroups.Message;
import org.jgroups.util.Util;

/** Class which captures a bunch of options relevant to remote method invocation or message sending
 * @author <NAME>
 * @version $Id: RequestOptions.java,v 1.6 2010/01/21 13:09:55 belaban Exp $
 */
public class RequestOptions {
    /** The mode of a request. Defined in GroupRequest e.g. GET_NONE, GET_ALL */
    private int       mode=Request.GET_NONE;

    /** The max time (in ms) for a blocking call. 0 blocks until all responses have been received (if mode = GET_ALL) */
    private long      timeout; // used when mode != GET_NONE

    /** Turns on anycasting; this results in multiple unicasts rather than a multicast for group calls */
    private boolean   use_anycasting;

    /** Allows for filtering of responses */
    private RspFilter rsp_filter;

    /** The flags set in the message in which a request is sent */
    private byte      flags; // Message.OOB, Message.DONT_BUNDLE etc



    public RequestOptions() {
    }

    public RequestOptions(int mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, byte flags) {
        this.mode=mode;
        this.timeout=timeout;
        this.use_anycasting=use_anycasting;
        this.rsp_filter=rsp_filter;
        this.flags=flags;
    }

    public RequestOptions(int mode, long timeout, boolean use_anycasting, RspFilter rsp_filter) {
        this(mode, timeout, use_anycasting, rsp_filter, (byte)0);
    }

    public RequestOptions(int mode, long timeout) {<commit_msg>added SYNC and ASYNC configs<commit_after>package org.jgroups.blocks;

import org.jgroups.Message;
import org.jgroups.util.Util;

/** Class which captures a bunch of options relevant to remote method invocation or message sending
 * @author <NAME>
 * @version $Id: RequestOptions.java,v 1.7 2010/01/21 13:31:56 belaban Exp $
 */
public class RequestOptions {
    /** The mode of a request. Defined in GroupRequest e.g. GET_NONE, GET_ALL */
    private int       mode=Request.GET_NONE;

    /** The max time (in ms) for a blocking call. 0 blocks until all responses have been received (if mode = GET_ALL) */
    private long      timeout; // used when mode != GET_NONE

    /** Turns on anycasting; this results in multiple unicasts rather than a multicast for group calls */
    private boolean   use_anycasting;

    /** Allows for filtering of responses */
    private RspFilter rsp_filter;

    /** The flags set in the message in which a request is sent */
    private byte      flags; // Message.OOB, Message.DONT_BUNDLE etc


    public static final RequestOptions SYNC=new RequestOptions(Request.GET_ALL, 5000);
    public static final RequestOptions ASYNC=new RequestOptions(Request.GET_NONE, 5000);


    public RequestOptions() {
    }

    public RequestOptions(int mode, long timeout, boolean use_anycasting, RspFilter rsp_filter, byte flags) {
        this.mode=mode;
        this.timeout=timeout;
        this.use_anycasting=use_anycasting;
        this.rsp_filter=rsp_filter;
        this.flags=flags;
    }

    public RequestOptions(int mode, long timeout, boolean use_anycasting, RspFilter rsp_filter) {
        this(mode, timeout, use_anycasting, rsp_filter, (byte)0);
    }

    public RequestOptions(int mode, long timeout) {
{'fraction_non_alphanumeric': 0.08484848484848485, 'fraction_numerical': 0.013333333333333334, 'mean_word_length': 3.287012987012987, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4031210', 'n_tokens_mistral': 1005, 'n_tokens_neox': 937, 'n_words': 330}