@@ -99,6 +99,26 @@ public GraphCreateOptions isSmart(final Boolean isSmart) {
99
99
return this ;
100
100
}
101
101
102
+ public Integer getReplicationFactor () {
103
+ return getOptions ().getReplicationFactor ();
104
+ }
105
+
106
+ /**
107
+ * @param replicationFactor
108
+ * (The default is 1): in a cluster, this attribute determines how many copies of each shard are kept on
109
+ * different DBServers. The value 1 means that only one copy (no synchronous replication) is kept. A
110
+ * value of k means that k-1 replicas are kept. Any two copies reside on different DBServers. Replication
111
+ * between them is synchronous, that is, every write operation to the "leader" copy will be replicated to
112
+ * all "follower" replicas, before the write operation is reported successful. If a server fails, this is
113
+ * detected automatically and one of the servers holding copies take over, usually without an error being
114
+ * reported.
115
+ * @return options
116
+ */
117
+ public GraphCreateOptions replicationFactor (final Integer replicationFactor ) {
118
+ getOptions ().setReplicationFactor (replicationFactor );
119
+ return this ;
120
+ }
121
+
102
122
public Integer getNumberOfShards () {
103
123
return getOptions ().getNumberOfShards ();
104
124
}
@@ -136,13 +156,22 @@ private SmartOptions getOptions() {
136
156
}
137
157
138
158
public static class SmartOptions {
159
+ private Integer replicationFactor ;
139
160
private Integer numberOfShards ;
140
161
private String smartGraphAttribute ;
141
162
142
163
public SmartOptions () {
143
164
super ();
144
165
}
145
166
167
+ public Integer getReplicationFactor () {
168
+ return replicationFactor ;
169
+ }
170
+
171
+ public void setReplicationFactor (final Integer replicationFactor ) {
172
+ this .replicationFactor = replicationFactor ;
173
+ }
174
+
146
175
public Integer getNumberOfShards () {
147
176
return numberOfShards ;
148
177
}
0 commit comments