com.hazelcast.spi

## Interface PreJoinAwareService

-     public interface PreJoinAwareService

  Services which need to perform operations on a joining member just before the member is set as joined must implement this interface. These operations are executed on the joining member before it is set as joined, in contrast to `PostJoinAwareService.getPostJoinOperation()`s which are executed on the joining member after it is set as joined. The practical outcome is that pre-join operations are already executed before the `HazelcastInstance` is returned to the caller, while post-join operations may be still executing.
  Since:
    3.9

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Operation` | `getPreJoinOperation()` An operation to be executed on the joining member before it is set as joined.

- - ### Method Detail

    - #### getPreJoinOperation

          Operation getPreJoinOperation()

      An operation to be executed on the joining member before it is set as joined. As is the case with `PostJoinAwareService.getPostJoinOperation()`s, no partition locks, no key-based locks, no service level locks, no database interaction are allowed. Additionally, a pre-join operation is executed while the cluster lock is being held on the joining member, so it is important that the operation finishes quickly and does not interact with other locks. The `Operation.getPartitionId()` method should return a negative value. This means that the operations should not implement `PartitionAwareOperation`.

      Pre join operations should return response, which may also be a `null` response.

      Returns:
        an operation to be executed on joining member before it is set as joined. Can be `null`.

Copyright © 2018. All rights reserved.