com.hazelcast.wan

## Interface WanReplicationService

- All Superinterfaces:
    CoreService, StatisticsAwareService<LocalWanStats>

      public interface WanReplicationService
      extends CoreService, StatisticsAwareService<LocalWanStats>

  This is the WAN replications service API core interface. The WanReplicationService needs to be capable of creating the actual `WanReplicationPublisher` instances to replicate values to other clusters over the wide area network, so it has to deal with long delays, slow uploads and higher latencies.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `SERVICE_NAME` Service name.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addWanReplicationConfig(WanReplicationConfig wanConfig)` Adds a new `WanReplicationConfig` to this member and creates the `WanReplicationPublisher`s specified in the config.
    `void` | `checkWanReplicationQueues(String name)`
    `void` | `clearQueues(String wanReplicationName, String targetGroupName)` Clears WAN replication queues of the given wanReplicationName for the given target.
    `com.hazelcast.wan.impl.WanEventCounter` | `getReceivedEventCounter(String serviceName)` Returns a counter of received and processed WAN replication events.
    `com.hazelcast.wan.impl.WanEventCounter` | `getSentEventCounter(String serviceName)` Returns a counter of sent and processed WAN replication events.
    `WanReplicationPublisher` | `getWanReplicationPublisher(String name)` Creates a new `WanReplicationPublisher` by the given name.
    `WanSyncState` | `getWanSyncState()` Returns current status of WAN sync operation
    `void` | `pause(String name, String targetGroupName)` Pauses wan replication to target group for the called node
    `void` | `removeWanEventCounters(String serviceName, String dataStructureName)` Removes the WAN event counters for the given `dataStructureName`.
    `void` | `resume(String name, String targetGroupName)` Resumes wan replication to target group for the called node.
    `void` | `shutdown()` Starts the shutdown process of the WAN replication service.
    `void` | `syncAllMaps(String wanReplicationName, String targetGroupName)` Initiate wan sync for all maps.
    `void` | `syncMap(String wanReplicationName, String targetGroupName, String mapName)` Initiate wan sync for a specific map.

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

      `getStats`

- - ### Field Detail

    - #### SERVICE_NAME

          static final String SERVICE_NAME

      Service name.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getWanReplicationPublisher

          WanReplicationPublisher getWanReplicationPublisher(String name)

      Creates a new `WanReplicationPublisher` by the given name. If the name already exists, returns the previous instance.
      Parameters:
        `name` - name of the WAN replication configuration
      Returns:
        instance of the corresponding replication publisher

    - #### shutdown

          void shutdown()

      Starts the shutdown process of the WAN replication service.

    - #### pause

          void pause(String name,
                     String targetGroupName)

      Pauses wan replication to target group for the called node
      Parameters:
        `name` - name of WAN replication configuration
        `targetGroupName` - name of wan target cluster config

    - #### resume

          void resume(String name,
                      String targetGroupName)

      Resumes wan replication to target group for the called node.
      Parameters:
        `name` - name of WAN replication configuration
        `targetGroupName` - name of wan target cluster config

    - #### checkWanReplicationQueues

          void checkWanReplicationQueues(String name)

    - #### syncMap

          void syncMap(String wanReplicationName,
                       String targetGroupName,
                       String mapName)

      Initiate wan sync for a specific map. NOTE: not supported on OS, only on EE
      Parameters:
        `wanReplicationName` - the name of the wan replication config
        `targetGroupName` - the group name on the target cluster
        `mapName` - the map name
      Throws:
        `UnsupportedOperationException` - if the operation is not supported (not EE)
        `InvalidConfigurationException` - if there is no WAN replication config for `wanReplicationName`
        `SyncFailedException` - if there is a sync request in progress

    - #### syncAllMaps

          void syncAllMaps(String wanReplicationName,
                           String targetGroupName)

      Initiate wan sync for all maps. NOTE: not supported on OS, only on EE
      Parameters:
        `wanReplicationName` - the name of the wan replication config
        `targetGroupName` - the group name on the target cluster
      Throws:
        `UnsupportedOperationException` - if the operation is not supported (not EE)
        `InvalidConfigurationException` - if there is no WAN replication config for `wanReplicationName`
        `SyncFailedException` - if there is a sync request in progress

    - #### clearQueues

          void clearQueues(String wanReplicationName,
                           String targetGroupName)

      Clears WAN replication queues of the given wanReplicationName for the given target.
      Parameters:
        `wanReplicationName` - the name of the wan replication config
        `targetGroupName` - the target cluster group name

    - #### addWanReplicationConfig

          void addWanReplicationConfig(WanReplicationConfig wanConfig)

      Adds a new `WanReplicationConfig` to this member and creates the `WanReplicationPublisher`s specified in the config.

    - #### getWanSyncState

          WanSyncState getWanSyncState()

      Returns current status of WAN sync operation

    - #### getReceivedEventCounter

          com.hazelcast.wan.impl.WanEventCounter getReceivedEventCounter(String serviceName)

      Returns a counter of received and processed WAN replication events.

    - #### getSentEventCounter

          com.hazelcast.wan.impl.WanEventCounter getSentEventCounter(String serviceName)

      Returns a counter of sent and processed WAN replication events.

    - #### removeWanEventCounters

          void removeWanEventCounters(String serviceName,
                                      String dataStructureName)

      Removes the WAN event counters for the given `dataStructureName`.

Copyright © 2018. All rights reserved.