
com.hazelcast.spi.InvocationBuilder Maven / Gradle / Ivy
/*
* Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.hazelcast.spi;
import com.hazelcast.core.ExecutionCallback;
import com.hazelcast.nio.Address;
import com.hazelcast.partition.InternalPartition;
import com.hazelcast.spi.impl.NodeEngineImpl;
/**
* The InvocationBuilder is responsible for building an invocation of an operation and invoking it.
*
* The original design exposed the actual Invocation class, but this will limit flexibility since
* the whole invocation can't be changed or fully removed easily.
*/
public abstract class InvocationBuilder {
/**
* Default call timeout.
*/
public static final long DEFAULT_CALL_TIMEOUT = -1L;
/**
* Default replica index.
*/
public static final int DEFAULT_REPLICA_INDEX = 0;
/**
* Default try count.
*/
public static final int DEFAULT_TRY_COUNT = 250;
/**
* Default try pause in milliseconds. If a call is retried, then perhaps a delay is needed.
*/
public static final long DEFAULT_TRY_PAUSE_MILLIS = 500;
/**
* True that the result of an operation automatically should be deserialized to an object.
*/
public static final boolean DEFAULT_DESERIALIZE_RESULT = true;
protected final NodeEngineImpl nodeEngine;
protected final String serviceName;
protected final Operation op;
protected final int partitionId;
protected final Address target;
protected Callback
© 2015 - 2025 Weber Informatics LLC | Privacy Policy