org.apache.ignite.internal.processors.cache

## Class ClientCacheChangeDiscoveryMessage

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.ClientCacheChangeDiscoveryMessage

All Implemented Interfaces:
  Serializable, DiscoveryCustomMessage

    public class ClientCacheChangeDiscoveryMessage
    extends Object
    implements DiscoveryCustomMessage

Sent from cache client node to asynchronously notify about started.closed client caches.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`ClientCacheChangeDiscoveryMessage(Map<Integer,Boolean> startedCaches, Set<Integer> closedCaches)`

### Method Summary

All Methods Instance Methods Concrete Methods
`DiscoveryCustomMessage` `ackMessage()` Called when custom message has been handled by all nodes.
`Set<Integer>` `closedCaches()`
`DiscoCache` `createDiscoCache(GridDiscoveryManager mgr, AffinityTopologyVersion topVer, DiscoCache discoCache)` Creates new discovery cache if message caused topology version change.
`boolean` `empty()`
`IgniteUuid` `id()`
`boolean` `isMutable()`
`void` `merge(Map<Integer,Boolean> startedCaches, Set<Integer> closedCaches)`
`Map<Integer,Boolean>` `startedCaches()`
`boolean` `stopProcess()` See `DiscoverySpiCustomMessage.stopProcess()`.
`String` `toString()`
`org.apache.ignite.internal.processors.cache.ClientCacheUpdateTimeout` `updateTimeoutObject()`
`void` `updateTimeoutObject(org.apache.ignite.internal.processors.cache.ClientCacheUpdateTimeout updateTimeoutObj)`

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

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

### Constructor Detail

#### ClientCacheChangeDiscoveryMessage

    public ClientCacheChangeDiscoveryMessage(Map<Integer,Boolean> startedCaches,
                                             Set<Integer> closedCaches)

Parameters:
  `startedCaches` - Started caches.
  `closedCaches` - Closed caches.

### Method Detail

#### merge

    public void merge(@Nullable
                      Map<Integer,Boolean> startedCaches,
                      @Nullable
                      Set<Integer> closedCaches)

Parameters:
  `startedCaches` - Started caches.
  `closedCaches` - Closed caches.

#### empty

    public boolean empty()

Returns:
  `True` if there are no info about started/closed caches.

#### updateTimeoutObject

    public org.apache.ignite.internal.processors.cache.ClientCacheUpdateTimeout updateTimeoutObject()

Returns:
  Update timeout object.

#### updateTimeoutObject

    public void updateTimeoutObject(org.apache.ignite.internal.processors.cache.ClientCacheUpdateTimeout updateTimeoutObj)

Parameters:
  `updateTimeoutObj` - Update timeout object.

#### startedCaches

    @Nullable
    public Map<Integer,Boolean> startedCaches()

Returns:
  Started caches map (cache ID to near enabled flag).

#### closedCaches

    @Nullable
    public Set<Integer> closedCaches()

Returns:
  Closed caches.

#### id

    public IgniteUuid id()

Specified by:
  `id` in interface `DiscoveryCustomMessage`
Returns:
  Unique custom message ID.

#### ackMessage

    @Nullable
    public DiscoveryCustomMessage ackMessage()

Called when custom message has been handled by all nodes.

Specified by:
  `ackMessage` in interface `DiscoveryCustomMessage`
Returns:
  Ack message or `null` if ack is not required.

#### isMutable

    public boolean isMutable()

Specified by:
  `isMutable` in interface `DiscoveryCustomMessage`
Returns:
  `True` if message can be modified during listener notification. Changes will be sent to next nodes.

#### stopProcess

    public boolean stopProcess()

See `DiscoverySpiCustomMessage.stopProcess()`.

Specified by:
  `stopProcess` in interface `DiscoveryCustomMessage`
Returns:
  `True` if message should not be sent to others nodes after it was processed on coordinator.

#### createDiscoCache

    @Nullable
    public DiscoCache createDiscoCache(GridDiscoveryManager mgr,
                                                 AffinityTopologyVersion topVer,
                                                 DiscoCache discoCache)

Creates new discovery cache if message caused topology version change.

Specified by:
  `createDiscoCache` in interface `DiscoveryCustomMessage`
Parameters:
  `mgr` - Discovery manager.
  `topVer` - New topology version.
  `discoCache` - Current discovery cache.
Returns:
  Reused discovery cache.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.5.0
Release Date | : May 23 2018