Interface GridDhtTopologyFuture

    • Method Detail

      • initialVersion

        AffinityTopologyVersion initialVersion()
        Returns topology version when exchange started. It can differ from result topology version if exchanges for multiple discovery events are merged. Initial version should not be used as version for cache operation since it is possible affinity for this version is never calculated.
        Returns:
        Topology version when exchange started.
      • topologyVersion

        AffinityTopologyVersion topologyVersion()
        Gets result topology version of this future. Result version can differ from initial exchange version if exchanges for multiple discovery events are merged, in this case result version is version of last discovery event.

        This method should be called only for finished topology future since result version is not known before exchange finished.

        Returns:
        Result topology version.
      • validateCache

        @Nullable
        @Nullable CacheInvalidStateException validateCache​(GridCacheContext cctx,
                                                           boolean recovery,
                                                           boolean read,
                                                           @Nullable
                                                           @Nullable Object key,
                                                           @Nullable
                                                           @Nullable Collection<?> keys)
        Returns error is cache topology is not valid.
        Parameters:
        cctx - Cache context.
        recovery - True if cache operation is done in recovery mode. Then it will only check for cache active state and topology validator result.
        read - True if validating read operation, false if validating write.
        key - Key (optimization to avoid collection creation).
        keys - Keys involved in a cache operation.
        Returns:
        Not null exception if a cache is in invalid state.
      • changedAffinity

        boolean changedAffinity()
        Returns:
        True if this exchange changed affinity.