final class DOMBrokerTransactionChain extends AbstractDOMTransactionFactory<DOMStoreTransactionChain>
implements DOMTransactionChain {
- private static enum State {
+ private enum State {
RUNNING,
CLOSING,
CLOSED,
* @author Robert Varga
*/
abstract class AbstractClientHistory extends LocalAbortable implements Identifiable<LocalHistoryIdentifier> {
- static enum State {
+ enum State {
IDLE,
TX_OPEN,
CLOSED,
return NULL_FUTURE;
}
- final CompletableFuture<ShardBackendInfo> ret = new CompletableFuture<ShardBackendInfo>();
+ final CompletableFuture<ShardBackendInfo> ret = new CompletableFuture<>();
FutureConverters.toJava(actorContext.findPrimaryShardAsync(shardName)).thenCompose(info -> {
LOG.debug("Looking up primary info for {} from {}", shardName, info);
public class DatastoreContextConfigAdminOverlay implements AutoCloseable {
public static final String CONFIG_ID = "org.opendaylight.controller.cluster.datastore";
- public static interface Listener {
+ public interface Listener {
void onDatastoreContextUpdated(DatastoreContextFactory contextFactory);
}
LOG.debug("Registering tree listener: {} for tree: {} shard: {}", listener, treeId, shardName);
final DataTreeChangeListenerProxy<L> listenerRegistrationProxy =
- new DataTreeChangeListenerProxy<L>(actorContext, listener);
+ new DataTreeChangeListenerProxy<>(actorContext, listener);
listenerRegistrationProxy.init(shardName, treeId);
return listenerRegistrationProxy;
final String shardName = actorContext.getShardStrategyFactory().getStrategy(treeId).findShard(treeId);
LOG.debug("Registering cohort: {} for tree: {} shard: {}", cohort, treeId, shardName);
- DataTreeCohortRegistrationProxy<C> cohortProxy = new DataTreeCohortRegistrationProxy<C>(actorContext, subtree, cohort);
+ DataTreeCohortRegistrationProxy<C> cohortProxy =
+ new DataTreeCohortRegistrationProxy<>(actorContext, subtree, cohort);
cohortProxy.init(shardName);
return cohortProxy;
}
* A transaction potentially spanning multiple backend shards.
*/
public class TransactionProxy extends AbstractDOMStoreTransaction<TransactionIdentifier> implements DOMStoreReadWriteTransaction {
- private static enum TransactionState {
+ private enum TransactionState {
OPEN,
READY,
CLOSED,
public class TransactionRateLimitingCallback implements OperationCallback{
private static Ticker TICKER = Ticker.systemTicker();
- private static enum State {
+ private enum State {
STOPPED,
RUNNING,
PAUSED
}
@FunctionalInterface
- private static interface EntityWalker {
+ private interface EntityWalker {
void onEntity(MapEntryNode entityTypeNode, MapEntryNode entityNode);
}
}, new Dispatchers(context().system().dispatchers()).getDispatcher(Dispatchers.DispatcherType.Client));
}
- private static interface RunnableMessage extends Runnable {
+ private interface RunnableMessage extends Runnable {
}
/**
* The FindPrimaryResponseHandler provides specific callback methods which are invoked when a response to the
* a remote or local find primary message is processed
*/
- private static interface FindPrimaryResponseHandler {
+ private interface FindPrimaryResponseHandler {
/**
* Invoked when a Failure message is received as a response
*
private final akka.dispatch.Dispatchers dispatchers;
- public static enum DispatcherType {
+ public enum DispatcherType {
Client(CLIENT_DISPATCHER_PATH),
Transaction(TXN_DISPATCHER_PATH),
Shard(SHARD_DISPATCHER_PATH),
Notification(NOTIFICATION_DISPATCHER_PATH);
private final String path;
- private DispatcherType(String path){
+ DispatcherType(String path){
this.path = path;
}
private String path(akka.dispatch.Dispatchers dispatchers){
public static final ThreadLocal<NormalizedNodeDataOutput> REUSABLE_WRITER_TL = new ThreadLocal<>();
public static final ThreadLocal<NormalizedNodeDataInput> REUSABLE_READER_TL = new ThreadLocal<>();
- public static interface Applier<T> {
+ public interface Applier<T> {
void apply(T instance, YangInstanceIdentifier path, NormalizedNode<?, ?> node);
}
private final DOMStoreThreePhaseCommitCohort mockCohort1 = mock(DOMStoreThreePhaseCommitCohort.class);
private final DOMStoreThreePhaseCommitCohort mockCohort2 = mock(DOMStoreThreePhaseCommitCohort.class);
private final ThreadPoolExecutor futureExecutor =
- new ThreadPoolExecutor(0, 1, 5, TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
+ new ThreadPoolExecutor(0, 1, 5, TimeUnit.SECONDS, new SynchronousQueue<>());
private ConcurrentDOMDataBroker coordinator;
@Before
updated = introspector.update(null);
assertEquals("updated", false, updated);
- updated = introspector.update(new Hashtable<String, Object>());
+ updated = introspector.update(new Hashtable<>());
assertEquals("updated", false, updated);
}
}
}
- public static interface RaftStateVerifier {
+ public interface RaftStateVerifier {
void verify(OnDemandRaftState raftState);
}
}
\ No newline at end of file
public static TransactionIdentifier transactionIdentifier(final Class<?> clazz, final String memberName) {
return new TransactionIdentifier(historyIdentifier(clazz, memberName), 0);
- };
+ }
}
}
@FunctionalInterface
- private static interface DataTreeOperation {
+ private interface DataTreeOperation {
void execute(DataTreeModification snapshot);
}
static class TestException extends RuntimeException {
}
- static interface Invoker {
+ interface Invoker {
CheckedFuture<?, ReadFailedException> invoke(TransactionProxy proxy) throws Exception;
}
eq(actorSelection(actorRef)), isA(CloseTransaction.class));
}
- private static interface TransactionProxyOperation {
+ private interface TransactionProxyOperation {
void run(TransactionProxy transactionProxy);
}
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
-;
/**
* Unit tests for EntityOwnerChangeListener.
final Map<String, Entry<ActorRef, DatastoreContext>> shardInfoMap = Collections.synchronizedMap(
new HashMap<String, Entry<ActorRef, DatastoreContext>>());
- shardInfoMap.put("default", new AbstractMap.SimpleEntry<ActorRef, DatastoreContext>(defaultShardActor, null));
- shardInfoMap.put("topology", new AbstractMap.SimpleEntry<ActorRef, DatastoreContext>(topologyShardActor, null));
+ shardInfoMap.put("default", new AbstractMap.SimpleEntry<>(defaultShardActor, null));
+ shardInfoMap.put("topology", new AbstractMap.SimpleEntry<>(topologyShardActor, null));
final PrimaryShardInfoFutureCache primaryShardInfoCache = new PrimaryShardInfoFutureCache();
final CountDownLatch newShardActorLatch = new CountDownLatch(2);