private void addLocalApplicationStateInternal(ApplicationState state, VersionedValue value) { assert taskLock.isHeldByCurrentThread(); EndpointState epState = endpointStateMap.get(FBUtilities.getBroadcastAddress()); InetAddress epAddr = FBUtilities.getBroadcastAddress(); assert epState != null; // Fire "before change" notifications: doBeforeChangeNotifications(epAddr, epState, state, value); // Notifications may have taken some time, so preventively raise the version // of the new value, otherwise it could be ignored by the remote node // if another value with a newer version was received in the meantime: value = StorageService.instance.valueFactory.cloneWithHigherVersion(value); // Add to local application state and fire "on change" notifications: epState.addApplicationState(state, value); doOnChangeNotifications(epAddr, state, value); }
private void addLocalApplicationStateInternal(ApplicationState state, VersionedValue value) { assert taskLock.isHeldByCurrentThread(); EndpointState epState = endpointStateMap.get(FBUtilities.getBroadcastAddress()); InetAddress epAddr = FBUtilities.getBroadcastAddress(); assert epState != null; // Fire "before change" notifications: doBeforeChangeNotifications(epAddr, epState, state, value); // Notifications may have taken some time, so preventively raise the version // of the new value, otherwise it could be ignored by the remote node // if another value with a newer version was received in the meantime: value = StorageService.instance.valueFactory.cloneWithHigherVersion(value); // Add to local application state and fire "on change" notifications: epState.addApplicationState(state, value); doOnChangeNotifications(epAddr, state, value); }
private void addLocalApplicationStateInternal(ApplicationState state, VersionedValue value) { assert taskLock.isHeldByCurrentThread(); EndpointState epState = endpointStateMap.get(FBUtilities.getBroadcastAddress()); InetAddress epAddr = FBUtilities.getBroadcastAddress(); assert epState != null; // Fire "before change" notifications: doBeforeChangeNotifications(epAddr, epState, state, value); // Notifications may have taken some time, so preventively raise the version // of the new value, otherwise it could be ignored by the remote node // if another value with a newer version was received in the meantime: value = StorageService.instance.valueFactory.cloneWithHigherVersion(value); // Add to local application state and fire "on change" notifications: epState.addApplicationState(state, value); doOnChangeNotifications(epAddr, state, value); }
private void addLocalApplicationStateInternal(ApplicationState state, VersionedValue value) { assert taskLock.isHeldByCurrentThread(); EndpointState epState = endpointStateMap.get(FBUtilities.getBroadcastAddress()); InetAddress epAddr = FBUtilities.getBroadcastAddress(); assert epState != null; // Fire "before change" notifications: doBeforeChangeNotifications(epAddr, epState, state, value); // Notifications may have taken some time, so preventively raise the version // of the new value, otherwise it could be ignored by the remote node // if another value with a newer version was received in the meantime: value = StorageService.instance.valueFactory.cloneWithHigherVersion(value); // Add to local application state and fire "on change" notifications: epState.addApplicationState(state, value); doOnChangeNotifications(epAddr, state, value); }