public interface

VersionTracker

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

Class Overview

Tracks a version against a key. If Stash is clustered then this can be used 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. When Stash is clustered this is potentially an expensive operation.

public int incrementAndGet (K key)

Returns
  • the incremented version for the supplied key