1 package com.atlassian.vcache;
2
3 import com.atlassian.annotations.PublicApi;
4
5 /**
6 * Represents a value that has an associated {@link CasIdentifier} that can be used for "compare-and-swap" operations.
7 *
8 * @param <T> the type of the value
9 * @since 1.0
10 */
11 @PublicApi
12 public interface IdentifiedValue<T> {
13 /**
14 * Returns the value.
15 *
16 * @return the value.
17 */
18 T value();
19
20 /**
21 * Returns the {@link CasIdentifier} associated with the value.
22 *
23 * @return the {@link CasIdentifier} associated with the value.
24 */
25 CasIdentifier identifier();
26 }