public CrdtSetDelegate(String name, Serializer serializer, CrdtProtocolConfig config, PrimitiveManagementService managementService) { this.clusterCommunicator = managementService.getCommunicationService(); this.executorService = managementService.getExecutorService(); this.elementSerializer = serializer; this.timestampProvider = config.getTimestampProvider(); this.subject = String.format("atomix-crdt-set-%s", name); clusterCommunicator.subscribe(subject, SERIALIZER::decode, this::updateElements, executorService); broadcastFuture = executorService.scheduleAtFixedRate( this::broadcastElements, config.getGossipInterval().toMillis(), config.getGossipInterval().toMillis(), TimeUnit.MILLISECONDS); }
public CrdtCounterDelegate(String name, CrdtProtocolConfig config, PrimitiveManagementService managementService) { this.localMemberId = managementService.getMembershipService().getLocalMember().id(); this.clusterCommunicator = managementService.getCommunicationService(); this.executorService = managementService.getExecutorService(); this.subject = String.format("atomix-crdt-counter-%s", name); clusterCommunicator.subscribe(subject, SERIALIZER::decode, this::updateCounters, executorService); broadcastFuture = executorService.scheduleAtFixedRate( this::broadcastCounters, config.getGossipInterval().toMillis(), config.getGossipInterval().toMillis(), TimeUnit.MILLISECONDS); }
destroyedMessage = mapName + ERROR_DESTROYED; this.clusterCommunicator = managementService.getCommunicationService(); this.membershipService = managementService.getMembershipService();
public CrdtSetDelegate(String name, Serializer serializer, CrdtProtocolConfig config, PrimitiveManagementService managementService) { this.clusterCommunicator = managementService.getCommunicationService(); this.executorService = managementService.getExecutorService(); this.elementSerializer = serializer; this.timestampProvider = config.getTimestampProvider(); this.subject = String.format("atomix-crdt-set-%s", name); clusterCommunicator.subscribe(subject, SERIALIZER::decode, this::updateElements, executorService); broadcastFuture = executorService.scheduleAtFixedRate( this::broadcastElements, config.getGossipInterval().toMillis(), config.getGossipInterval().toMillis(), TimeUnit.MILLISECONDS); }
public CrdtCounterDelegate(String name, CrdtProtocolConfig config, PrimitiveManagementService managementService) { this.localMemberId = managementService.getMembershipService().getLocalMember().id(); this.clusterCommunicator = managementService.getCommunicationService(); this.executorService = managementService.getExecutorService(); this.subject = String.format("atomix-crdt-counter-%s", name); clusterCommunicator.subscribe(subject, SERIALIZER::decode, this::updateCounters, executorService); broadcastFuture = executorService.scheduleAtFixedRate( this::broadcastCounters, config.getGossipInterval().toMillis(), config.getGossipInterval().toMillis(), TimeUnit.MILLISECONDS); }
destroyedMessage = mapName + ERROR_DESTROYED; this.clusterCommunicator = managementService.getCommunicationService(); this.membershipService = managementService.getMembershipService();