this.identifier = requireNonNull(identifier);
}
+ @VisibleForTesting
protected AbstractShardManagerCreator<?> getShardManagerCreator() {
return new ShardManagerCreator();
}
return client;
}
- final ClientIdentifier getIdentifier() {
- return identifier;
- }
-
public void setCloseable(final AutoCloseable closeable) {
this.closeable = closeable;
}
@Override
- public Registration registerTreeChangeListener(final YangInstanceIdentifier treeId,
+ public final Registration registerTreeChangeListener(final YangInstanceIdentifier treeId,
final DOMDataTreeChangeListener listener) {
return registerTreeChangeListener(treeId, listener, true);
}
@Override
@Deprecated(since = "9.0.0", forRemoval = true)
- public Registration registerLegacyTreeChangeListener(final YangInstanceIdentifier treeId,
+ public final Registration registerLegacyTreeChangeListener(final YangInstanceIdentifier treeId,
final DOMDataTreeChangeListener listener) {
return registerTreeChangeListener(treeId, listener, false);
}
@Override
+ // Non-final for testing
public Registration registerCommitCohort(final DOMDataTreeIdentifier subtree,
final DOMDataTreeCommitCohort cohort) {
YangInstanceIdentifier treeId = requireNonNull(subtree, "subtree should not be null").path();
}
@Override
- public void onDatastoreContextUpdated(final DatastoreContextFactory contextFactory) {
+ public final void onDatastoreContextUpdated(final DatastoreContextFactory contextFactory) {
LOG.info("DatastoreContext updated for data store {}", actorUtils.getDataStoreName());
actorUtils.setDatastoreContext(contextFactory);
@Override
@SuppressWarnings("checkstyle:IllegalCatch")
- public void close() {
+ public final void close() {
LOG.info("Closing data store {}", identifier);
if (datastoreConfigMXBean != null) {
// TODO: consider removing this in favor of awaitReadiness()
@Deprecated
- public void waitTillReady() {
+ public final void waitTillReady() {
LOG.info("Beginning to wait for data store to become ready : {}", identifier);
final Duration toWait = initialSettleTime();
@Beta
@Deprecated
- public boolean awaitReadiness() throws InterruptedException {
+ public final boolean awaitReadiness() throws InterruptedException {
return awaitReadiness(initialSettleTime());
}
@Beta
@Deprecated
- public boolean awaitReadiness(final Duration toWait) throws InterruptedException {
+ public final boolean awaitReadiness(final Duration toWait) throws InterruptedException {
try {
if (toWait.isFinite()) {
try {
@Beta
@Deprecated
- public void awaitReadiness(final long timeout, final TimeUnit unit) throws InterruptedException, TimeoutException {
+ public final void awaitReadiness(final long timeout, final TimeUnit unit)
+ throws InterruptedException, TimeoutException {
if (!awaitReadiness(Duration.create(timeout, unit))) {
throw new TimeoutException("Shard leaders failed to settle");
}
}
@Override
- public Registration registerProxyListener(final YangInstanceIdentifier shardLookup,
+ public final Registration registerProxyListener(final YangInstanceIdentifier shardLookup,
final YangInstanceIdentifier insideShard, final DOMDataTreeChangeListener delegate) {
requireNonNull(shardLookup, "shardLookup should not be null");
requireNonNull(insideShard, "insideShard should not be null");