private static final InstanceIdentifier<TestStatus> TEST_STATUS_IID =
InstanceIdentifier.builder(TestStatus.class).build();
- private final AtomicReference<ExecStatus> execStatus = new AtomicReference<ExecStatus>( ExecStatus.Idle );
+ private final AtomicReference<ExecStatus> execStatus = new AtomicReference<>(ExecStatus.Idle);
private final DsbenchmarkListenerProvider listenerProvider = new DsbenchmarkListenerProvider();
private final DOMDataBroker domDataBroker; // Async DOM Broker for use with all DOM operations
private final DataBroker bindingDataBroker; // Async Binding-Aware Broker for use in tx chains; initialized to
private static final InstanceIdentifier<TestExec> TEST_EXEC_IID =
InstanceIdentifier.builder(TestExec.class).build();
private final List<ListenerRegistration<DsbenchmarkListener>> listeners =
- new ArrayList<ListenerRegistration<DsbenchmarkListener>>();
+ new ArrayList<>();
private DataBroker dataBroker;
public void setDataBroker(DataBroker dataBroker) {
for (int i = 0; i < numListeners; i++) {
DsbenchmarkListener listener = new DsbenchmarkListener();
listeners.add(dataBroker.registerDataTreeChangeListener(
- new DataTreeIdentifier<TestExec>(LogicalDatastoreType.CONFIGURATION, TEST_EXEC_IID), listener));
+ new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION, TEST_EXEC_IID), listener));
listeners.add(dataBroker.registerDataTreeChangeListener(
- new DataTreeIdentifier<TestExec>(LogicalDatastoreType.OPERATIONAL, TEST_EXEC_IID), listener));
+ new DataTreeIdentifier<>(LogicalDatastoreType.OPERATIONAL, TEST_EXEC_IID), listener));
}
LOG.info("DsbenchmarkListenerProvider created {} listeneres", numListeners);
public void run() {
int ntfOk = 0;
int ntfError = 0;
- ListenableFuture<? extends Object> lastOkFuture = null;
+ ListenableFuture<?> lastOkFuture = null;
for (int i = 0; i < this.iterations; i++) {
try {
- final ListenableFuture<? extends Object> result = this.publishService.offerNotification(this.ntf);
+ final ListenableFuture<?> result = this.publishService.offerNotification(this.ntf);
if (NotificationPublishService.REJECTED == result) {
ntfError++;
} else {
if (expectedSize == notification.getPayload().size()) {
received++;
}
- };
+ }
public int getReceived() {
return received;
rpcError++;
}
}
- } catch (InterruptedException e) {
- rpcError++;
- LOG.error("Execution failed: ", e);
- } catch (ExecutionException e) {
+ } catch (InterruptedException | ExecutionException e) {
rpcError++;
LOG.error("Execution failed: ", e);
}
rpcError++;
}
}
- } catch (InterruptedException e) {
- rpcError++;
- LOG.error("Execution failed: ", e);
- } catch (ExecutionException e) {
+ } catch (InterruptedException | ExecutionException e) {
rpcError++;
LOG.error("Execution failed: ", e);
}
private static final Logger LOG = LoggerFactory.getLogger(RpcbenchmarkProvider.class);
private static final GlobalBindingRTCServer gServer = new GlobalBindingRTCServer();
private static final int testTimeout = 5;
- private final AtomicReference<ExecStatus> execStatus = new AtomicReference<ExecStatus>(ExecStatus.Idle );
+ private final AtomicReference<ExecStatus> execStatus = new AtomicReference<>(ExecStatus.Idle);
private RpcConsumerRegistry consumerRegistry;
private RpcProviderRegistry providerRegistry;