BUG 2138: Introduce prefix based shards into ShardManager
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / DatastoreContext.java
1 /*
2  * Copyright (c) 2014 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.controller.cluster.datastore;
10
11 import akka.util.Timeout;
12 import com.google.common.annotations.VisibleForTesting;
13 import com.google.common.base.Preconditions;
14 import com.google.common.collect.Sets;
15 import java.util.Set;
16 import java.util.concurrent.TimeUnit;
17 import org.apache.commons.lang3.text.WordUtils;
18 import org.opendaylight.controller.cluster.common.actor.AkkaConfigurationReader;
19 import org.opendaylight.controller.cluster.common.actor.FileAkkaConfigurationReader;
20 import org.opendaylight.controller.cluster.raft.ConfigParams;
21 import org.opendaylight.controller.cluster.raft.DefaultConfigParamsImpl;
22 import org.opendaylight.controller.cluster.raft.PeerAddressResolver;
23 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
24 import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStoreConfigProperties;
25 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
26 import scala.concurrent.duration.Duration;
27 import scala.concurrent.duration.FiniteDuration;
28
29 /**
30  * Contains contextual data for a data store.
31  *
32  * @author Thomas Pantelis
33  */
34 public class DatastoreContext {
35     public static final String METRICS_DOMAIN = "org.opendaylight.controller.cluster.datastore";
36
37     public static final Duration DEFAULT_SHARD_TRANSACTION_IDLE_TIMEOUT = Duration.create(10, TimeUnit.MINUTES);
38     public static final int DEFAULT_OPERATION_TIMEOUT_IN_MS = 5000;
39     public static final int DEFAULT_SHARD_TX_COMMIT_TIMEOUT_IN_SECONDS = 30;
40     public static final int DEFAULT_JOURNAL_RECOVERY_BATCH_SIZE = 1;
41     public static final int DEFAULT_SNAPSHOT_BATCH_COUNT = 20000;
42     public static final int DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS = 500;
43     public static final int DEFAULT_ISOLATED_LEADER_CHECK_INTERVAL_IN_MILLIS =
44             DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS * 10;
45     public static final int DEFAULT_SHARD_TX_COMMIT_QUEUE_CAPACITY = 50000;
46     public static final Timeout DEFAULT_SHARD_INITIALIZATION_TIMEOUT = new Timeout(5, TimeUnit.MINUTES);
47     public static final Timeout DEFAULT_SHARD_LEADER_ELECTION_TIMEOUT = new Timeout(30, TimeUnit.SECONDS);
48     public static final boolean DEFAULT_PERSISTENT = true;
49     public static final FileAkkaConfigurationReader DEFAULT_CONFIGURATION_READER = new FileAkkaConfigurationReader();
50     public static final int DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD_PERCENTAGE = 12;
51     public static final int DEFAULT_SHARD_ELECTION_TIMEOUT_FACTOR = 2;
52     public static final int DEFAULT_TX_CREATION_INITIAL_RATE_LIMIT = 100;
53     public static final String UNKNOWN_DATA_STORE_TYPE = "unknown";
54     public static final int DEFAULT_SHARD_BATCHED_MODIFICATION_COUNT = 1000;
55     public static final long DEFAULT_SHARD_COMMIT_QUEUE_EXPIRY_TIMEOUT_IN_MS =
56             TimeUnit.MILLISECONDS.convert(2, TimeUnit.MINUTES);
57     public static final int DEFAULT_SHARD_SNAPSHOT_CHUNK_SIZE = 2048000;
58
59     private static final Set<String> GLOBAL_DATASTORE_NAMES = Sets.newConcurrentHashSet();
60
61     private InMemoryDOMDataStoreConfigProperties dataStoreProperties;
62     private Duration shardTransactionIdleTimeout = DatastoreContext.DEFAULT_SHARD_TRANSACTION_IDLE_TIMEOUT;
63     private long operationTimeoutInMillis = DEFAULT_OPERATION_TIMEOUT_IN_MS;
64     private String dataStoreMXBeanType;
65     private int shardTransactionCommitTimeoutInSeconds = DEFAULT_SHARD_TX_COMMIT_TIMEOUT_IN_SECONDS;
66     private int shardTransactionCommitQueueCapacity = DEFAULT_SHARD_TX_COMMIT_QUEUE_CAPACITY;
67     private Timeout shardInitializationTimeout = DEFAULT_SHARD_INITIALIZATION_TIMEOUT;
68     private Timeout shardLeaderElectionTimeout = DEFAULT_SHARD_LEADER_ELECTION_TIMEOUT;
69     private boolean persistent = DEFAULT_PERSISTENT;
70     private AkkaConfigurationReader configurationReader = DEFAULT_CONFIGURATION_READER;
71     private long transactionCreationInitialRateLimit = DEFAULT_TX_CREATION_INITIAL_RATE_LIMIT;
72     private final DefaultConfigParamsImpl raftConfig = new DefaultConfigParamsImpl();
73     private String dataStoreName = UNKNOWN_DATA_STORE_TYPE;
74     private LogicalDatastoreType logicalStoreType = LogicalDatastoreType.OPERATIONAL;
75     private YangInstanceIdentifier storeRoot = YangInstanceIdentifier.EMPTY;
76     private int shardBatchedModificationCount = DEFAULT_SHARD_BATCHED_MODIFICATION_COUNT;
77     private boolean writeOnlyTransactionOptimizationsEnabled = true;
78     private long shardCommitQueueExpiryTimeoutInMillis = DEFAULT_SHARD_COMMIT_QUEUE_EXPIRY_TIMEOUT_IN_MS;
79     private boolean transactionDebugContextEnabled = false;
80     private String shardManagerPersistenceId;
81
82     public static Set<String> getGlobalDatastoreNames() {
83         return GLOBAL_DATASTORE_NAMES;
84     }
85
86     private DatastoreContext() {
87         setShardJournalRecoveryLogBatchSize(DEFAULT_JOURNAL_RECOVERY_BATCH_SIZE);
88         setSnapshotBatchCount(DEFAULT_SNAPSHOT_BATCH_COUNT);
89         setHeartbeatInterval(DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS);
90         setIsolatedLeaderCheckInterval(DEFAULT_ISOLATED_LEADER_CHECK_INTERVAL_IN_MILLIS);
91         setSnapshotDataThresholdPercentage(DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD_PERCENTAGE);
92         setElectionTimeoutFactor(DEFAULT_SHARD_ELECTION_TIMEOUT_FACTOR);
93         setShardSnapshotChunkSize(DEFAULT_SHARD_SNAPSHOT_CHUNK_SIZE);
94     }
95
96     private DatastoreContext(final DatastoreContext other) {
97         this.dataStoreProperties = other.dataStoreProperties;
98         this.shardTransactionIdleTimeout = other.shardTransactionIdleTimeout;
99         this.operationTimeoutInMillis = other.operationTimeoutInMillis;
100         this.dataStoreMXBeanType = other.dataStoreMXBeanType;
101         this.shardTransactionCommitTimeoutInSeconds = other.shardTransactionCommitTimeoutInSeconds;
102         this.shardTransactionCommitQueueCapacity = other.shardTransactionCommitQueueCapacity;
103         this.shardInitializationTimeout = other.shardInitializationTimeout;
104         this.shardLeaderElectionTimeout = other.shardLeaderElectionTimeout;
105         this.persistent = other.persistent;
106         this.configurationReader = other.configurationReader;
107         this.transactionCreationInitialRateLimit = other.transactionCreationInitialRateLimit;
108         this.dataStoreName = other.dataStoreName;
109         this.logicalStoreType = other.logicalStoreType;
110         this.storeRoot = other.storeRoot;
111         this.shardBatchedModificationCount = other.shardBatchedModificationCount;
112         this.writeOnlyTransactionOptimizationsEnabled = other.writeOnlyTransactionOptimizationsEnabled;
113         this.shardCommitQueueExpiryTimeoutInMillis = other.shardCommitQueueExpiryTimeoutInMillis;
114         this.transactionDebugContextEnabled = other.transactionDebugContextEnabled;
115         this.shardManagerPersistenceId = other.shardManagerPersistenceId;
116
117         setShardJournalRecoveryLogBatchSize(other.raftConfig.getJournalRecoveryLogBatchSize());
118         setSnapshotBatchCount(other.raftConfig.getSnapshotBatchCount());
119         setHeartbeatInterval(other.raftConfig.getHeartBeatInterval().toMillis());
120         setIsolatedLeaderCheckInterval(other.raftConfig.getIsolatedCheckIntervalInMillis());
121         setSnapshotDataThresholdPercentage(other.raftConfig.getSnapshotDataThresholdPercentage());
122         setElectionTimeoutFactor(other.raftConfig.getElectionTimeoutFactor());
123         setCustomRaftPolicyImplementation(other.raftConfig.getCustomRaftPolicyImplementationClass());
124         setShardSnapshotChunkSize(other.raftConfig.getSnapshotChunkSize());
125         setPeerAddressResolver(other.raftConfig.getPeerAddressResolver());
126     }
127
128     public static Builder newBuilder() {
129         return new Builder(new DatastoreContext());
130     }
131
132     public static Builder newBuilderFrom(DatastoreContext context) {
133         return new Builder(new DatastoreContext(context));
134     }
135
136     public InMemoryDOMDataStoreConfigProperties getDataStoreProperties() {
137         return dataStoreProperties;
138     }
139
140     public Duration getShardTransactionIdleTimeout() {
141         return shardTransactionIdleTimeout;
142     }
143
144     public String getDataStoreMXBeanType() {
145         return dataStoreMXBeanType;
146     }
147
148     public long getOperationTimeoutInMillis() {
149         return operationTimeoutInMillis;
150     }
151
152     public ConfigParams getShardRaftConfig() {
153         return raftConfig;
154     }
155
156     public int getShardTransactionCommitTimeoutInSeconds() {
157         return shardTransactionCommitTimeoutInSeconds;
158     }
159
160     public int getShardTransactionCommitQueueCapacity() {
161         return shardTransactionCommitQueueCapacity;
162     }
163
164     public Timeout getShardInitializationTimeout() {
165         return shardInitializationTimeout;
166     }
167
168     public Timeout getShardLeaderElectionTimeout() {
169         return shardLeaderElectionTimeout;
170     }
171
172     public boolean isPersistent() {
173         return persistent;
174     }
175
176     public AkkaConfigurationReader getConfigurationReader() {
177         return configurationReader;
178     }
179
180     public long getShardElectionTimeoutFactor() {
181         return raftConfig.getElectionTimeoutFactor();
182     }
183
184     public String getDataStoreName() {
185         return dataStoreName;
186     }
187
188     public LogicalDatastoreType getLogicalStoreType() {
189         return logicalStoreType;
190     }
191
192     public YangInstanceIdentifier getStoreRoot() {
193         return storeRoot;
194     }
195
196     public long getTransactionCreationInitialRateLimit() {
197         return transactionCreationInitialRateLimit;
198     }
199
200     public String getShardManagerPersistenceId() {
201         return shardManagerPersistenceId;
202     }
203
204     private void setPeerAddressResolver(PeerAddressResolver resolver) {
205         raftConfig.setPeerAddressResolver(resolver);
206     }
207
208     private void setHeartbeatInterval(long shardHeartbeatIntervalInMillis) {
209         raftConfig.setHeartBeatInterval(new FiniteDuration(shardHeartbeatIntervalInMillis,
210                 TimeUnit.MILLISECONDS));
211     }
212
213     private void setShardJournalRecoveryLogBatchSize(int shardJournalRecoveryLogBatchSize) {
214         raftConfig.setJournalRecoveryLogBatchSize(shardJournalRecoveryLogBatchSize);
215     }
216
217
218     private void setIsolatedLeaderCheckInterval(long shardIsolatedLeaderCheckIntervalInMillis) {
219         raftConfig.setIsolatedLeaderCheckInterval(
220                 new FiniteDuration(shardIsolatedLeaderCheckIntervalInMillis, TimeUnit.MILLISECONDS));
221     }
222
223     private void setElectionTimeoutFactor(long shardElectionTimeoutFactor) {
224         raftConfig.setElectionTimeoutFactor(shardElectionTimeoutFactor);
225     }
226
227     private void setCustomRaftPolicyImplementation(String customRaftPolicyImplementation) {
228         raftConfig.setCustomRaftPolicyImplementationClass(customRaftPolicyImplementation);
229     }
230
231     private void setSnapshotDataThresholdPercentage(int shardSnapshotDataThresholdPercentage) {
232         Preconditions.checkArgument(shardSnapshotDataThresholdPercentage >= 0
233                 && shardSnapshotDataThresholdPercentage <= 100);
234         raftConfig.setSnapshotDataThresholdPercentage(shardSnapshotDataThresholdPercentage);
235     }
236
237     private void setSnapshotBatchCount(long shardSnapshotBatchCount) {
238         raftConfig.setSnapshotBatchCount(shardSnapshotBatchCount);
239     }
240
241     private void setShardSnapshotChunkSize(int shardSnapshotChunkSize) {
242         raftConfig.setSnapshotChunkSize(shardSnapshotChunkSize);
243     }
244
245     public int getShardBatchedModificationCount() {
246         return shardBatchedModificationCount;
247     }
248
249     public boolean isWriteOnlyTransactionOptimizationsEnabled() {
250         return writeOnlyTransactionOptimizationsEnabled;
251     }
252
253     public long getShardCommitQueueExpiryTimeoutInMillis() {
254         return shardCommitQueueExpiryTimeoutInMillis;
255     }
256
257     public boolean isTransactionDebugContextEnabled() {
258         return transactionDebugContextEnabled;
259     }
260
261     public int getShardSnapshotChunkSize() {
262         return raftConfig.getSnapshotChunkSize();
263     }
264
265     public static class Builder {
266         private final DatastoreContext datastoreContext;
267         private int maxShardDataChangeExecutorPoolSize =
268                 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_EXECUTOR_POOL_SIZE;
269         private int maxShardDataChangeExecutorQueueSize =
270                 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_EXECUTOR_QUEUE_SIZE;
271         private int maxShardDataChangeListenerQueueSize =
272                 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_CHANGE_LISTENER_QUEUE_SIZE;
273         private int maxShardDataStoreExecutorQueueSize =
274                 InMemoryDOMDataStoreConfigProperties.DEFAULT_MAX_DATA_STORE_EXECUTOR_QUEUE_SIZE;
275
276         private Builder(DatastoreContext datastoreContext) {
277             this.datastoreContext = datastoreContext;
278
279             if (datastoreContext.getDataStoreProperties() != null) {
280                 maxShardDataChangeExecutorPoolSize =
281                         datastoreContext.getDataStoreProperties().getMaxDataChangeExecutorPoolSize();
282                 maxShardDataChangeExecutorQueueSize =
283                         datastoreContext.getDataStoreProperties().getMaxDataChangeExecutorQueueSize();
284                 maxShardDataChangeListenerQueueSize =
285                         datastoreContext.getDataStoreProperties().getMaxDataChangeListenerQueueSize();
286                 maxShardDataStoreExecutorQueueSize =
287                         datastoreContext.getDataStoreProperties().getMaxDataStoreExecutorQueueSize();
288             }
289         }
290
291         public Builder boundedMailboxCapacity(int boundedMailboxCapacity) {
292             // TODO - this is defined in the yang DataStoreProperties but not currently used.
293             return this;
294         }
295
296         public Builder enableMetricCapture(boolean enableMetricCapture) {
297             // TODO - this is defined in the yang DataStoreProperties but not currently used.
298             return this;
299         }
300
301
302         public Builder shardTransactionIdleTimeout(long timeout, TimeUnit unit) {
303             datastoreContext.shardTransactionIdleTimeout = Duration.create(timeout, unit);
304             return this;
305         }
306
307         public Builder shardTransactionIdleTimeoutInMinutes(long timeout) {
308             return shardTransactionIdleTimeout(timeout, TimeUnit.MINUTES);
309         }
310
311         public Builder operationTimeoutInSeconds(int operationTimeoutInSeconds) {
312             datastoreContext.operationTimeoutInMillis = TimeUnit.SECONDS.toMillis(operationTimeoutInSeconds);
313             return this;
314         }
315
316         public Builder operationTimeoutInMillis(long operationTimeoutInMillis) {
317             datastoreContext.operationTimeoutInMillis = operationTimeoutInMillis;
318             return this;
319         }
320
321         public Builder dataStoreMXBeanType(String dataStoreMXBeanType) {
322             datastoreContext.dataStoreMXBeanType = dataStoreMXBeanType;
323             return this;
324         }
325
326         public Builder shardTransactionCommitTimeoutInSeconds(int shardTransactionCommitTimeoutInSeconds) {
327             datastoreContext.shardTransactionCommitTimeoutInSeconds = shardTransactionCommitTimeoutInSeconds;
328             return this;
329         }
330
331         public Builder shardJournalRecoveryLogBatchSize(int shardJournalRecoveryLogBatchSize) {
332             datastoreContext.setShardJournalRecoveryLogBatchSize(shardJournalRecoveryLogBatchSize);
333             return this;
334         }
335
336         public Builder shardSnapshotBatchCount(int shardSnapshotBatchCount) {
337             datastoreContext.setSnapshotBatchCount(shardSnapshotBatchCount);
338             return this;
339         }
340
341         public Builder shardSnapshotDataThresholdPercentage(int shardSnapshotDataThresholdPercentage) {
342             datastoreContext.setSnapshotDataThresholdPercentage(shardSnapshotDataThresholdPercentage);
343             return this;
344         }
345
346         public Builder shardHeartbeatIntervalInMillis(int shardHeartbeatIntervalInMillis) {
347             datastoreContext.setHeartbeatInterval(shardHeartbeatIntervalInMillis);
348             return this;
349         }
350
351         public Builder shardTransactionCommitQueueCapacity(int shardTransactionCommitQueueCapacity) {
352             datastoreContext.shardTransactionCommitQueueCapacity = shardTransactionCommitQueueCapacity;
353             return this;
354         }
355
356         public Builder shardInitializationTimeout(long timeout, TimeUnit unit) {
357             datastoreContext.shardInitializationTimeout = new Timeout(timeout, unit);
358             return this;
359         }
360
361         public Builder shardInitializationTimeoutInSeconds(long timeout) {
362             return shardInitializationTimeout(timeout, TimeUnit.SECONDS);
363         }
364
365         public Builder shardLeaderElectionTimeout(long timeout, TimeUnit unit) {
366             datastoreContext.shardLeaderElectionTimeout = new Timeout(timeout, unit);
367             return this;
368         }
369
370         public Builder shardLeaderElectionTimeoutInSeconds(long timeout) {
371             return shardLeaderElectionTimeout(timeout, TimeUnit.SECONDS);
372         }
373
374         public Builder configurationReader(AkkaConfigurationReader configurationReader) {
375             datastoreContext.configurationReader = configurationReader;
376             return this;
377         }
378
379         public Builder persistent(boolean persistent) {
380             datastoreContext.persistent = persistent;
381             return this;
382         }
383
384         public Builder shardIsolatedLeaderCheckIntervalInMillis(int shardIsolatedLeaderCheckIntervalInMillis) {
385             datastoreContext.setIsolatedLeaderCheckInterval(shardIsolatedLeaderCheckIntervalInMillis);
386             return this;
387         }
388
389         public Builder shardElectionTimeoutFactor(long shardElectionTimeoutFactor) {
390             datastoreContext.setElectionTimeoutFactor(shardElectionTimeoutFactor);
391             return this;
392         }
393
394         public Builder transactionCreationInitialRateLimit(long initialRateLimit) {
395             datastoreContext.transactionCreationInitialRateLimit = initialRateLimit;
396             return this;
397         }
398
399         public Builder logicalStoreType(LogicalDatastoreType logicalStoreType) {
400             datastoreContext.logicalStoreType = Preconditions.checkNotNull(logicalStoreType);
401
402             // Retain compatible naming
403             switch (logicalStoreType) {
404                 case CONFIGURATION:
405                     dataStoreName("config");
406                     break;
407                 case OPERATIONAL:
408                     dataStoreName("operational");
409                     break;
410                 default:
411                     dataStoreName(logicalStoreType.name());
412             }
413
414             return this;
415         }
416
417         public Builder storeRoot(final YangInstanceIdentifier storeRoot) {
418             datastoreContext.storeRoot = storeRoot;
419             return this;
420         }
421
422         public Builder dataStoreName(String dataStoreName) {
423             datastoreContext.dataStoreName = Preconditions.checkNotNull(dataStoreName);
424             datastoreContext.dataStoreMXBeanType = "Distributed" + WordUtils.capitalize(dataStoreName) + "Datastore";
425             return this;
426         }
427
428         public Builder shardBatchedModificationCount(final int shardBatchedModificationCount) {
429             datastoreContext.shardBatchedModificationCount = shardBatchedModificationCount;
430             return this;
431         }
432
433         public Builder writeOnlyTransactionOptimizationsEnabled(boolean value) {
434             datastoreContext.writeOnlyTransactionOptimizationsEnabled = value;
435             return this;
436         }
437
438         public Builder shardCommitQueueExpiryTimeoutInMillis(long value) {
439             datastoreContext.shardCommitQueueExpiryTimeoutInMillis = value;
440             return this;
441         }
442
443         public Builder shardCommitQueueExpiryTimeoutInSeconds(long value) {
444             datastoreContext.shardCommitQueueExpiryTimeoutInMillis = TimeUnit.MILLISECONDS.convert(
445                     value, TimeUnit.SECONDS);
446             return this;
447         }
448
449         public Builder transactionDebugContextEnabled(boolean value) {
450             datastoreContext.transactionDebugContextEnabled = value;
451             return this;
452         }
453
454         public Builder maxShardDataChangeExecutorPoolSize(int maxShardDataChangeExecutorPoolSize) {
455             this.maxShardDataChangeExecutorPoolSize = maxShardDataChangeExecutorPoolSize;
456             return this;
457         }
458
459         public Builder maxShardDataChangeExecutorQueueSize(int maxShardDataChangeExecutorQueueSize) {
460             this.maxShardDataChangeExecutorQueueSize = maxShardDataChangeExecutorQueueSize;
461             return this;
462         }
463
464         public Builder maxShardDataChangeListenerQueueSize(int maxShardDataChangeListenerQueueSize) {
465             this.maxShardDataChangeListenerQueueSize = maxShardDataChangeListenerQueueSize;
466             return this;
467         }
468
469         public Builder maxShardDataStoreExecutorQueueSize(int maxShardDataStoreExecutorQueueSize) {
470             this.maxShardDataStoreExecutorQueueSize = maxShardDataStoreExecutorQueueSize;
471             return this;
472         }
473
474         /**
475          * For unit tests only.
476          */
477         @VisibleForTesting
478         public Builder shardManagerPersistenceId(String id) {
479             datastoreContext.shardManagerPersistenceId = id;
480             return this;
481         }
482
483         public DatastoreContext build() {
484             datastoreContext.dataStoreProperties = InMemoryDOMDataStoreConfigProperties.create(
485                     maxShardDataChangeExecutorPoolSize, maxShardDataChangeExecutorQueueSize,
486                     maxShardDataChangeListenerQueueSize, maxShardDataStoreExecutorQueueSize);
487
488             if (datastoreContext.dataStoreName != null) {
489                 GLOBAL_DATASTORE_NAMES.add(datastoreContext.dataStoreName);
490             }
491
492             return datastoreContext;
493         }
494
495         public Builder customRaftPolicyImplementation(String customRaftPolicyImplementation) {
496             datastoreContext.setCustomRaftPolicyImplementation(customRaftPolicyImplementation);
497             return this;
498         }
499
500         public Builder shardSnapshotChunkSize(int shardSnapshotChunkSize) {
501             datastoreContext.setShardSnapshotChunkSize(shardSnapshotChunkSize);
502             return this;
503         }
504
505         public Builder shardPeerAddressResolver(PeerAddressResolver resolver) {
506             datastoreContext.setPeerAddressResolver(resolver);
507             return this;
508         }
509     }
510 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.