View Javadoc

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      ADD_ONLY,
15      /** Only put the value if a value is currently associated with the key. */
16      REPLACE_ONLY,
17      /** Always put the value, regardless of whether a value is currently associated or not. */
18      PUT_ALWAYS
19  }