@Deprecated public interface

VersionTracker

com.atlassian.bitbucket.concurrent.VersionTracker<K extends java.io.Serializable>

This interface is deprecated.
in 4.10 for removal in 5.0. Please use TopicService and asynchronous messages instead to coordinate changes across the cluster.

Class Overview

Tracks a version against a key. This can be used in a cluster to help track changes to entities across the cluster.

Summary

Public Methods
int get(K key)
void increment(K key)
Increments the version for the supplied key
void incrementAll()
Increments all versions for all known keys.
int incrementAndGet(K key)

Public Methods

public int get (K key)

Returns
  • retrieves the current version for the supplied key

public void increment (K key)

Increments the version for the supplied key

public void incrementAll ()

Increments all versions for all known keys.

Note: This is potentially an expensive operation, especially in a cluster.

public int incrementAndGet (K key)

Returns
  • the incremented version for the supplied key