|
6 | 6 | * |
7 | 7 | * Convenience object for collection creation. |
8 | 8 | * |
9 | | - * @see com.arangodb.entity.CollectionEntity |
10 | | - * author fbartels - [email protected] |
| 9 | + * @see com.arangodb.entity.CollectionEntity author fbartels - |
| 10 | + |
11 | 11 | */ |
12 | 12 | public class CollectionOptions { |
13 | 13 |
|
14 | | - /** |
15 | | - * If true each write operation is synchronised to disk before the server sends a response |
16 | | - */ |
17 | | - private Boolean waitForSync; |
18 | | - |
19 | | - /** |
20 | | - * Whether or not the collection will be compacted. |
21 | | - */ |
22 | | - private Boolean doCompact; |
23 | | - |
24 | | - /** |
25 | | - * The maximal size setting for journals / datafiles. |
26 | | - */ |
27 | | - private Integer journalSize; |
28 | | - |
29 | | - /** |
30 | | - * If true the collection is a system collection |
31 | | - */ |
32 | | - private Boolean isSystem; |
33 | | - |
34 | | - /** |
35 | | - * If true then the collection data will be kept in memory only and ArangoDB will not write or sync the data to disk. |
36 | | - */ |
37 | | - private Boolean isVolatile; |
38 | | - |
39 | | - /** |
40 | | - * The collections type, either EDGE or DOCUMENT |
41 | | - */ |
42 | | - private CollectionType type; |
43 | | - |
44 | | - /** |
45 | | - * The collection key options |
46 | | - * @see com.arangodb.entity.CollectionKeyOption |
47 | | - */ |
48 | | - private CollectionKeyOption keyOptions; |
49 | | - |
50 | | - /** |
51 | | - * in a cluster, this value determines the number of shards to create for the collection. In a single server setup, |
52 | | - * this option is meaningless. |
53 | | - */ |
54 | | - private int numberOfShards; |
55 | | - |
56 | | - /** |
57 | | - * in a cluster, this attribute determines which document attributes are used to determine the target shard for |
58 | | - * documents. Documents are sent to shards based on the values of their shard key attributes. The values of all |
59 | | - * shard key attributes in a document are hashed, and the hash value is used to determine the target shard. |
60 | | - */ |
61 | | - private List<String> shardKeys; |
62 | | - |
63 | | - |
64 | | - public CollectionOptions() { |
65 | | - } |
66 | | - |
67 | | - public Boolean getWaitForSync() { |
68 | | - return waitForSync; |
69 | | - } |
70 | | - |
71 | | - public void setWaitForSync(Boolean waitForSync) { |
72 | | - this.waitForSync = waitForSync; |
73 | | - } |
74 | | - |
75 | | - public Boolean getDoCompact() { |
76 | | - return doCompact; |
77 | | - } |
78 | | - |
79 | | - public void setDoCompact(Boolean doCompact) { |
80 | | - this.doCompact = doCompact; |
81 | | - } |
82 | | - |
83 | | - public Integer getJournalSize() { |
84 | | - return journalSize; |
85 | | - } |
86 | | - |
87 | | - public void setJournalSize(Integer journalSize) { |
88 | | - this.journalSize = journalSize; |
89 | | - } |
90 | | - |
91 | | - public Boolean getIsSystem() { |
92 | | - return isSystem; |
93 | | - } |
94 | | - |
95 | | - public void setIsSystem(Boolean isSystem) { |
96 | | - this.isSystem = isSystem; |
97 | | - } |
98 | | - |
99 | | - public Boolean getIsVolatile() { |
100 | | - return isVolatile; |
101 | | - } |
102 | | - |
103 | | - public void setIsVolatile(Boolean isVolatile) { |
104 | | - this.isVolatile = isVolatile; |
105 | | - } |
106 | | - |
107 | | - public CollectionType getType() { |
108 | | - return type; |
109 | | - } |
110 | | - |
111 | | - public void setType(CollectionType type) { |
112 | | - this.type = type; |
113 | | - } |
114 | | - |
115 | | - public CollectionKeyOption getKeyOptions() { |
116 | | - return keyOptions; |
117 | | - } |
118 | | - |
119 | | - public void setKeyOptions(CollectionKeyOption keyOptions) { |
120 | | - this.keyOptions = keyOptions; |
121 | | - } |
122 | | - |
123 | | - public int getNumberOfShards() { |
124 | | - return numberOfShards; |
125 | | - } |
126 | | - |
127 | | - public void setNumberOfShards(int numberOfShards) { |
128 | | - this.numberOfShards = numberOfShards; |
129 | | - } |
130 | | - |
131 | | - public List<String> getShardKeys() { |
132 | | - return shardKeys; |
133 | | - } |
134 | | - |
135 | | - public void setShardKeys(List<String> shardKeys) { |
136 | | - this.shardKeys = shardKeys; |
137 | | - } |
| 14 | + /** |
| 15 | + * If true each write operation is synchronised to disk before the server |
| 16 | + * sends a response |
| 17 | + */ |
| 18 | + private Boolean waitForSync; |
| 19 | + |
| 20 | + /** |
| 21 | + * Whether or not the collection will be compacted. |
| 22 | + */ |
| 23 | + private Boolean doCompact; |
| 24 | + |
| 25 | + /** |
| 26 | + * The maximal size setting for journals / datafiles. |
| 27 | + */ |
| 28 | + private Integer journalSize; |
| 29 | + |
| 30 | + /** |
| 31 | + * If true the collection is a system collection |
| 32 | + */ |
| 33 | + private Boolean isSystem; |
| 34 | + |
| 35 | + /** |
| 36 | + * If true then the collection data will be kept in memory only and ArangoDB |
| 37 | + * will not write or sync the data to disk. |
| 38 | + */ |
| 39 | + private Boolean isVolatile; |
| 40 | + |
| 41 | + /** |
| 42 | + * The collections type, either EDGE or DOCUMENT |
| 43 | + */ |
| 44 | + private CollectionType type; |
| 45 | + |
| 46 | + /** |
| 47 | + * The collection key options |
| 48 | + * |
| 49 | + * @see com.arangodb.entity.CollectionKeyOption |
| 50 | + */ |
| 51 | + private CollectionKeyOption keyOptions; |
| 52 | + |
| 53 | + /** |
| 54 | + * in a cluster, this value determines the number of shards to create for |
| 55 | + * the collection. In a single server setup, this option is meaningless. |
| 56 | + */ |
| 57 | + private int numberOfShards; |
| 58 | + |
| 59 | + /** |
| 60 | + * in a cluster, this attribute determines which document attributes are |
| 61 | + * used to determine the target shard for documents. Documents are sent to |
| 62 | + * shards based on the values of their shard key attributes. The values of |
| 63 | + * all shard key attributes in a document are hashed, and the hash value is |
| 64 | + * used to determine the target shard. |
| 65 | + */ |
| 66 | + private List<String> shardKeys; |
| 67 | + |
| 68 | + public CollectionOptions() { |
| 69 | + } |
| 70 | + |
| 71 | + public Boolean getWaitForSync() { |
| 72 | + return waitForSync; |
| 73 | + } |
| 74 | + |
| 75 | + public CollectionOptions setWaitForSync(Boolean waitForSync) { |
| 76 | + this.waitForSync = waitForSync; |
| 77 | + return this; |
| 78 | + } |
| 79 | + |
| 80 | + public Boolean getDoCompact() { |
| 81 | + return doCompact; |
| 82 | + } |
| 83 | + |
| 84 | + public CollectionOptions setDoCompact(Boolean doCompact) { |
| 85 | + this.doCompact = doCompact; |
| 86 | + return this; |
| 87 | + } |
| 88 | + |
| 89 | + public Integer getJournalSize() { |
| 90 | + return journalSize; |
| 91 | + } |
| 92 | + |
| 93 | + public CollectionOptions setJournalSize(Integer journalSize) { |
| 94 | + this.journalSize = journalSize; |
| 95 | + return this; |
| 96 | + } |
| 97 | + |
| 98 | + public Boolean getIsSystem() { |
| 99 | + return isSystem; |
| 100 | + } |
| 101 | + |
| 102 | + public CollectionOptions setIsSystem(Boolean isSystem) { |
| 103 | + this.isSystem = isSystem; |
| 104 | + return this; |
| 105 | + } |
| 106 | + |
| 107 | + public Boolean getIsVolatile() { |
| 108 | + return isVolatile; |
| 109 | + } |
| 110 | + |
| 111 | + public CollectionOptions setIsVolatile(Boolean isVolatile) { |
| 112 | + this.isVolatile = isVolatile; |
| 113 | + return this; |
| 114 | + } |
| 115 | + |
| 116 | + public CollectionType getType() { |
| 117 | + return type; |
| 118 | + } |
| 119 | + |
| 120 | + public CollectionOptions setType(CollectionType type) { |
| 121 | + this.type = type; |
| 122 | + return this; |
| 123 | + } |
| 124 | + |
| 125 | + public CollectionKeyOption getKeyOptions() { |
| 126 | + return keyOptions; |
| 127 | + } |
| 128 | + |
| 129 | + public CollectionOptions setKeyOptions(CollectionKeyOption keyOptions) { |
| 130 | + this.keyOptions = keyOptions; |
| 131 | + return this; |
| 132 | + } |
| 133 | + |
| 134 | + public int getNumberOfShards() { |
| 135 | + return numberOfShards; |
| 136 | + } |
| 137 | + |
| 138 | + public CollectionOptions setNumberOfShards(int numberOfShards) { |
| 139 | + this.numberOfShards = numberOfShards; |
| 140 | + return this; |
| 141 | + } |
| 142 | + |
| 143 | + public List<String> getShardKeys() { |
| 144 | + return shardKeys; |
| 145 | + } |
| 146 | + |
| 147 | + public CollectionOptions setShardKeys(List<String> shardKeys) { |
| 148 | + this.shardKeys = shardKeys; |
| 149 | + return this; |
| 150 | + } |
138 | 151 |
|
139 | 152 | } |
0 commit comments