com.hazelcast.concurrent.semaphore.operations

## Class SemaphoreOperation

- java.lang.Object
- - com.hazelcast.spi.Operation
  - - com.hazelcast.spi.impl.AbstractNamedOperation
    - - com.hazelcast.concurrent.semaphore.operations.SemaphoreOperation

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, NamedOperation, PartitionAwareOperation
  Direct Known Subclasses:
    AvailableOperation, SemaphoreBackupAwareOperation, SemaphoreBackupOperation

      public abstract class SemaphoreOperation
      extends com.hazelcast.spi.impl.AbstractNamedOperation
      implements PartitionAwareOperation, IdentifiedDataSerializable

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `permitCount`
    `protected Object` | `response`

    - ### Fields inherited from class com.hazelcast.spi.impl.AbstractNamedOperation

      `name`

    - ### Fields inherited from class com.hazelcast.spi.Operation

      `GENERIC_PARTITION_ID`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SemaphoreOperation()`
    `protected` | `SemaphoreOperation(String name, int permitCount)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `Object` | `getResponse()` Called if and only if `Operation.returnsResponse()` returned `true`, shortly after `Operation.run()` returns.
    `SemaphoreContainer` | `getSemaphoreContainer()`
    `String` | `getServiceName()`
    `void` | `readInternal(ObjectDataInput in)`
    `void` | `writeInternal(ObjectDataOutput out)`

    - ### Methods inherited from class com.hazelcast.spi.impl.AbstractNamedOperation

      `getName, toString`

    - ### Methods inherited from class com.hazelcast.spi.Operation

      `afterRun, beforeRun, call, executedLocally, getCallerAddress, getCallerUuid, getCallId, getCallTimeout, getConnection, getInvocationTime, getLogger, getNodeEngine, getOperationResponseHandler, getPartitionId, getReplicaIndex, getService, getWaitTimeout, isUrgent, logError, onExecutionFailure, onInvocationException, onSetCallId, readData, requiresExplicitServiceName, returnsResponse, run, sendResponse, setCallerUuid, setNodeEngine, setOperationResponseHandler, setPartitionId, setReplicaIndex, setService, setServiceName, setValidateTarget, setWaitTimeout, toString, validatesTarget, writeData`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.hazelcast.spi.PartitionAwareOperation

      `getPartitionId`

    - ### Methods inherited from interface com.hazelcast.nio.serialization.IdentifiedDataSerializable

      `getId`

    - ### Methods inherited from interface com.hazelcast.nio.serialization.DataSerializable

      `readData, writeData`

- - ### Field Detail

    - #### permitCount

          protected int permitCount

    - #### response

          protected transient Object response

  - ### Constructor Detail

    - #### SemaphoreOperation

          protected SemaphoreOperation()

    - #### SemaphoreOperation

          protected SemaphoreOperation(String name,
                                       int permitCount)

  - ### Method Detail

    - #### getServiceName

          public String getServiceName()

      Overrides:
        `getServiceName` in class `Operation`

    - #### getResponse

          public Object getResponse()

      Description copied from class: `Operation`
      Called if and only if `Operation.returnsResponse()` returned `true`, shortly after `Operation.run()` returns.
      Overrides:
        `getResponse` in class `Operation`

    - #### getSemaphoreContainer

          public SemaphoreContainer getSemaphoreContainer()

    - #### getFactoryId

          public final int getFactoryId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
        `getFactoryId` in interface `IdentifiedDataSerializable`
      Returns:
        factory ID

    - #### writeInternal

          public void writeInternal(ObjectDataOutput out)
                             throws IOException

      Overrides:
        `writeInternal` in class `com.hazelcast.spi.impl.AbstractNamedOperation`
      Throws:
        `IOException`

    - #### readInternal

          public void readInternal(ObjectDataInput in)
                            throws IOException

      Overrides:
        `readInternal` in class `com.hazelcast.spi.impl.AbstractNamedOperation`
      Throws:
        `IOException`

Copyright © 2019. All rights reserved.