- if (carsDtclRegistration != null) {
- carsDtclRegistrations.add(carsDtclRegistration);
- return RpcResultBuilder.<Void>success().buildFuture();
- }
- return RpcResultBuilder.<Void>failed().buildFuture();
- }
-
- @Override
- public Future<RpcResult<java.lang.Void>> unregisterLoggingDcls() {
- LOG_CAR_PROVIDER.info("Unregistering the CarDataChangeListener(s)");
- synchronized (carsDclRegistrations) {
- int numListeners = 0;
- for (ListenerRegistration<?> carsDclRegistration : carsDclRegistrations) {
- carsDclRegistration.close();
- numListeners++;
- }
- carsDclRegistrations.clear();
- LOG_CAR_PROVIDER.info("Unregistered {} CarDataChangeListener(s)", numListeners);
- }