@@ -99,6 +99,26 @@ public GraphCreateOptions isSmart(final Boolean isSmart) {
9999 return this ;
100100 }
101101
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+
102122 public Integer getNumberOfShards () {
103123 return getOptions ().getNumberOfShards ();
104124 }
@@ -136,13 +156,22 @@ private SmartOptions getOptions() {
136156 }
137157
138158 public static class SmartOptions {
159+ private Integer replicationFactor ;
139160 private Integer numberOfShards ;
140161 private String smartGraphAttribute ;
141162
142163 public SmartOptions () {
143164 super ();
144165 }
145166
167+ public Integer getReplicationFactor () {
168+ return replicationFactor ;
169+ }
170+
171+ public void setReplicationFactor (final Integer replicationFactor ) {
172+ this .replicationFactor = replicationFactor ;
173+ }
174+
146175 public Integer getNumberOfShards () {
147176 return numberOfShards ;
148177 }
0 commit comments