1 package com.atlassian.vcache;
2
3 import com.atlassian.annotations.PublicApi;
4
5 /**
6 * Represents the different policies for a put operation on a cache.
7 *
8 * @since 1.0
9 */
10 @PublicApi
11 public enum PutPolicy {
12 /**
13 * Only put the value if no value is currently associated with the key.
14 */
15 ADD_ONLY,
16 /**
17 * Only put the value if a value is currently associated with the key.
18 */
19 REPLACE_ONLY,
20 /**
21 * Always put the value, regardless of whether a value is currently associated or not.
22 */
23 PUT_ALWAYS
24 }