Skip to content

Commit 2afc95e

Browse files
committed
update Javadoc for AerospikeGeneration
1 parent 1dec655 commit 2afc95e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.aerospike.mapper.annotations;
22

3+
import com.aerospike.client.policy.GenerationPolicy;
4+
import com.aerospike.client.policy.WritePolicy;
5+
36
import java.lang.annotation.ElementType;
47
import java.lang.annotation.Retention;
58
import java.lang.annotation.RetentionPolicy;
@@ -8,11 +11,11 @@
811
/**
912
* Mark a field or property to be used for optimistic concurrency control using Aerospike's generation field.
1013
* <p/>
11-
* The field or property must be of Integer or int type. When reading an object which has a field marked
12-
* with @AerospikeGeneration, the returned record's generation field will be mapped into the @AerospikeGeneration field.
13-
* When writing the record, if the @AerospikeGeneration field is non-zero, the generation will be set in the
14-
* writePolicy.generation field and the writePolicy.generationPolicy will be set to
15-
* GenerationPolicy.EXPECT_GEN_EQUAL.
14+
* The field or property must be of Integer or int type. When reading an object which has a field marked
15+
* with @AerospikeGeneration, the returned record's generation field will be mapped into the @AerospikeGeneration field.
16+
* When writing the record, if the @AerospikeGeneration field is non-zero, the generation will be set in the
17+
* {@link WritePolicy#generation} field and the {@link WritePolicy#generationPolicy} will be set to
18+
* {@link GenerationPolicy#EXPECT_GEN_EQUAL}.
1619
* <p/>
1720
* Example usage:
1821
* <pre>
@@ -22,8 +25,8 @@
2225
* private int id;
2326
* &#64;AerospikeBin
2427
* private String name;
25-
* &#64;Version
26-
* private int version;
28+
* &#64;AerospikeGeneration
29+
* private int generation;
2730
* }
2831
* </pre>
2932
*
@@ -32,4 +35,4 @@
3235
@Retention(RetentionPolicy.RUNTIME)
3336
@Target({ElementType.FIELD, ElementType.METHOD})
3437
public @interface AerospikeGeneration {
35-
}
38+
}

0 commit comments

Comments
 (0)