com.hazelcast.spi.impl.operationservice
Interface InternalOperationService

All Superinterfaces:
OperationService
All Known Implementing Classes:
OperationServiceImpl

public interface InternalOperationService
extends OperationService

This is the interface that needs to be implemented by actual InternalOperationService. Currently there is a single InternalOperationService: OperationServiceImpl, but in the future others can be added.

It exposes methods that will not be called by regular code, like shutdown, but will only be called by the the SPI management.


Method Summary
<V> void
asyncInvokeOnPartition(String serviceName, Operation op, int partitionId, ExecutionCallback<V> callback)
           
<V> void
asyncInvokeOnTarget(String serviceName, Operation op, Address target, ExecutionCallback<V> callback)
           
 void execute(PartitionSpecificRunnable task)
          Executes a PartitionSpecificRunnable.
 double getInvocationUsagePercentage()
          Returns the percentage of the the used invocations.
 OperationExecutor getOperationExecutor()
          Gets the OperationExecutor that is executing operations for this InternalOperationService.
 int getPendingInvocationCount()
          Gets the current number of pending invocations.
 List<SlowOperationDTO> getSlowOperationDTOs()
          Returns information about long running operations.
 boolean isCallTimedOut(Operation op)
          Checks if this call is timed out.
 
Methods inherited from interface com.hazelcast.spi.OperationService
createInvocationBuilder, createInvocationBuilder, dumpPerformanceMetrics, executeOperation, getExecutedOperationCount, getGenericOperationThreadCount, getOperationExecutorQueueSize, getPartitionOperationThreadCount, getPriorityOperationExecutorQueueSize, getRemoteOperationsCount, getResponseQueueSize, getRunningOperationsCount, invokeOnAllPartitions, invokeOnPartition, invokeOnPartitions, invokeOnTarget, isAllowedToRunOnCallingThread, runOperationOnCallingThread, send, send
 

Method Detail

getInvocationUsagePercentage

double getInvocationUsagePercentage()
Returns the percentage of the the used invocations. With back pressure there is a cap on the number of concurrent invocations. This call sends back the percentage of used invocations compared to that cap.

Returns:
percentage of used invocations.

getPendingInvocationCount

int getPendingInvocationCount()
Gets the current number of pending invocations. Each map.put or a queue.take, is a pending invocation until it is answered. In most cases the number of pending invocations is bound by the number of concurrent threads, but if you use async API's, the number of pending invocations is not bound to the number of threads.

Returns:
number of pending invocations

isCallTimedOut

boolean isCallTimedOut(Operation op)
Checks if this call is timed out. A timed out call is not going to be executed.

Parameters:
op - the operation to check.
Returns:
true if it is timed out, false otherwise.

execute

void execute(PartitionSpecificRunnable task)
Executes a PartitionSpecificRunnable.

This method is typically used by the ClientEngine when it has received a Packet containing a request that needs to be processed.

Parameters:
task - the task to execute

getOperationExecutor

OperationExecutor getOperationExecutor()
Gets the OperationExecutor that is executing operations for this InternalOperationService.

Returns:
the OperationExecutor.

getSlowOperationDTOs

List<SlowOperationDTO> getSlowOperationDTOs()
Returns information about long running operations.

Returns:
list of SlowOperationDTO instances.

asyncInvokeOnPartition

<V> void asyncInvokeOnPartition(String serviceName,
                                Operation op,
                                int partitionId,
                                ExecutionCallback<V> callback)

asyncInvokeOnTarget

<V> void asyncInvokeOnTarget(String serviceName,
                             Operation op,
                             Address target,
                             ExecutionCallback<V> callback)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.