*/
package org.opendaylight.mdsal.binding.api;
-
-
import org.opendaylight.yangtools.yang.binding.RpcService;
/**
*/
public interface RpcProviderService {
- <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
- final T implementation);
+ <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
+ T implementation);
- <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
- final T implementation, final Set<InstanceIdentifier<?>> paths);
+ <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
+ T implementation, Set<InstanceIdentifier<?>> paths);
}
@Test
public final void testBasicProducer() throws DOMDataTreeProducerException, TransactionCommitFailedException {
// Create a producer. It is an AutoCloseable resource, hence the try-with pattern
- try (final DOMDataTreeProducer prod =
+ try (DOMDataTreeProducer prod =
service().createProducer(Collections.singleton(UNORDERED_CONTAINER_TREE))) {
assertNotNull(prod);
* {@link TransactionCommitFailedException}.
*/
protected abstract CheckedFuture<Void,TransactionCommitFailedException> submit(
- final DOMDataTreeWriteTransaction transaction,
- final Collection<DOMStoreThreePhaseCommitCohort> cohorts);
+ DOMDataTreeWriteTransaction transaction,
+ Collection<DOMStoreThreePhaseCommitCohort> cohorts);
/**
* Creates a new composite read-only transaction.
for (final Entry<LogicalDatastoreType, T> store : storeTxFactories.entrySet()) {
txns.put(store.getKey(), store.getValue().newWriteOnlyTransaction());
}
- return new DOMForwardedWriteTransaction<DOMStoreWriteTransaction>(newTransactionIdentifier(), txns, this);
+ return new DOMForwardedWriteTransaction<>(newTransactionIdentifier(), txns, this);
}
/**
return v.isEmpty() ? null : newInstance(v);
}
- protected abstract CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(final NormalizedNode<?, ?> input);
+ protected abstract CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(NormalizedNode<?, ?> input);
protected abstract AbstractDOMRpcRoutingTableEntry newInstance(
- final Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls);
+ Map<YangInstanceIdentifier, List<DOMRpcImplementation>> impls);
}
final InMemoryDOMDataTreeShard outerListShard = InMemoryDOMDataTreeShard.create(OUTER_LIST_ID, executor, 1, 1);
outerListShard.onGlobalContextUpdated(schemaContext);
- try (final DOMDataTreeProducer producer =
+ try (DOMDataTreeProducer producer =
dataTreeService.createProducer(Collections.singletonList(OUTER_LIST_ID))) {
dataTreeService.registerDataTreeShard(OUTER_LIST_ID, outerListShard, producer);
}
return;
}
- try (final RegistrationTreeSnapshot<AbstractDOMDataTreeChangeListenerRegistration<?>> snapshot
+ try (RegistrationTreeSnapshot<AbstractDOMDataTreeChangeListenerRegistration<?>> snapshot
= takeSnapshot()) {
final List<PathArgument> toLookup = ImmutableList.copyOf(candidate.getRootPath().getPathArguments());
final Multimap<AbstractDOMDataTreeChangeListenerRegistration<?>, DataTreeCandidate> listenerChanges =
do {
entry = getSnapshot();
- ret = new SnapshotBackedReadWriteTransaction<T>(transactionId,
+ ret = new SnapshotBackedReadWriteTransaction<>(transactionId,
getDebugTransactions(), entry.getValue(), this);
} while (!recordTransaction(entry.getKey(), ret));
do {
entry = getSnapshot();
- ret = new SnapshotBackedWriteTransaction<T>(transactionId,
+ ret = new SnapshotBackedWriteTransaction<>(transactionId,
getDebugTransactions(), entry.getValue(), this);
} while (!recordTransaction(entry.getKey(), ret));
* @return A {@link DOMStoreThreePhaseCommitCohort} cohort.
*/
protected abstract DOMStoreThreePhaseCommitCohort createCohort(
- final SnapshotBackedWriteTransaction<T> transaction, final DataTreeModification modification);
+ SnapshotBackedWriteTransaction<T> transaction, DataTreeModification modification);
}
*
* @param tx Transaction which got aborted.
*/
- protected abstract void transactionAborted(final SnapshotBackedWriteTransaction<T> tx);
+ protected abstract void transactionAborted(SnapshotBackedWriteTransaction<T> tx);
/**
* Returns a commit coordinator associated with supplied transactions.
* @param entityOwnershipServiceInst - EOS type
* @return instance of EntityOwnershipListenerRegistration
*/
- protected abstract R registerListener(final String entityType, final S entityOwnershipServiceInst);
+ protected abstract R registerListener(String entityType, S entityOwnershipServiceInst);
/**
* Creates an extended {@link GenericEntity} instance.
* @param entityIdentifier the identifier of the entity
* @return instance of Entity extended GenericEntity type
*/
- protected abstract E createEntity(final String entityType, final String entityIdentifier);
+ protected abstract E createEntity(String entityType, String entityIdentifier);
/**
* Method is responsible for parsing ServiceGroupIdentifier from E entity.
* @param entity instance of GenericEntity type
* @return ServiceGroupIdentifier parsed from entity key value.
*/
- protected abstract String getServiceIdentifierFromEntity(final E entity);
+ protected abstract String getServiceIdentifierFromEntity(E entity);
/**
* Method is called async. from close method in end of Provider lifecycle.
*
* @param ownershipChange change role for ClusterSingletonServiceGroup
*/
- void ownershipChanged(final C ownershipChange);
+ void ownershipChanged(C ownershipChange);
/**
* Closes this service group. All registered service providers are also closed. Please be careful