com.hazelcast.spi

## Class CallsPerMember

- java.lang.Object
- - com.hazelcast.spi.CallsPerMember

- All Implemented Interfaces:
    LiveOperations

      public final class CallsPerMember
      extends Object
      implements LiveOperations

  Implements `LiveOperations` and additionally collects the call IDs of operations on remote members whose cancellation was requested.

  This data-structure can be optimized to generate less litter. Instead of using an ArrayList for Long objects, use an array for primitive longs. Also the lists don't need to be recreated every time the `LiveOperationsTracker.populate(LiveOperations)` method is called; they could be recycled. This would be easy to do since the `CallsPerMember` is used by a single thread.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CallsPerMember(Address localAddress)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(Address address, long callId)` Registers an invocation with this object.
    `void` | `addOpToCancel(Address address, long callId)`
    `Set<Address>` | `addresses()`
    `void` | `clear()`
    `void` | `ensureMember(Address address)` Makes sure that a list of counters is created for a member.
    `com.hazelcast.spi.CallsPerMember.CategorizedCallIds` | `getOrCreateCallIdsForMember(Address address)`
    `OperationControl` | `toOpControl(Address address)`

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

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

- - ### Constructor Detail

    - #### CallsPerMember

          public CallsPerMember(Address localAddress)

  - ### Method Detail

    - #### add

          public void add(Address address,
                          long callId)

      Description copied from interface: `LiveOperations`
      Registers an invocation with this object.
      Specified by:
        `add` in interface `LiveOperations`
      Parameters:
        `address` - address of the sender of the operation
        `callId` - call ID of the operation

    - #### addOpToCancel

          public void addOpToCancel(Address address,
                                    long callId)

    - #### addresses

          public Set<Address> addresses()

    - #### toOpControl

          public OperationControl toOpControl(Address address)

    - #### clear

          public void clear()

    - #### ensureMember

          public void ensureMember(Address address)

      Makes sure that a list of counters is created for a member.

      This method exists to ensure that an operation-heartbeat is always sent, even if there are no running operations.
      Parameters:
        `address` - the address of the member.

    - #### getOrCreateCallIdsForMember

          public com.hazelcast.spi.CallsPerMember.CategorizedCallIds getOrCreateCallIdsForMember(Address address)

Copyright © 2020. All rights reserved.