"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dso-l2/src/main/java/com/tc/objectserver/impl/DistributedObjectServer.java" between
terracotta-core-5.7.0.tar.gz and terracotta-core-5.7.1.tar.gz

About: Terracotta - Clustering technology for Java ("Network Attached Memory", "Distributed Cache"). Source code of the server (5.x) core components.

DistributedObjectServer.java  (terracotta-core-5.7.0):DistributedObjectServer.java  (terracotta-core-5.7.1)
skipping to change at line 516 skipping to change at line 516
while(!persistor.start(capablities.contains(ProductID.PERMANENT))) { while(!persistor.start(capablities.contains(ProductID.PERMANENT))) {
wasZapped = true; wasZapped = true;
// make sure peristor is not using any storage service // make sure peristor is not using any storage service
persistor.close(); persistor.close();
// Log that that the state was not clean so we are going to clear all serv ice provider state. // Log that that the state was not clean so we are going to clear all serv ice provider state.
logger.warn("DB state not clean! Clearing all ServiceProvider state (ZAP request)"); logger.warn("DB state not clean! Clearing all ServiceProvider state (ZAP request)");
serviceRegistry.clearServiceProvidersState(); serviceRegistry.clearServiceProvidersState();
// create the persistor once again as underlying storage service might hav e cleared its internal state // create the persistor once again as underlying storage service might hav e cleared its internal state
persistor = serverBuilder.createPersistor(platformServiceRegistry); persistor = serverBuilder.createPersistor(platformServiceRegistry);
} }
// if the DB was zapped, reset the flag until the server has finished sync // if the DB was zapped and not started in diagnostic mode, reset the flag until the server has finished sync
persistor.getClusterStatePersistor().setDBClean(!wasZapped); persistor.getClusterStatePersistor().setDBClean(!wasZapped);
new ServerPersistenceVersionChecker().checkAndBumpPersistedVersion(persistor .getClusterStatePersistor()); new ServerPersistenceVersionChecker().checkAndBumpPersistedVersion(persistor .getClusterStatePersistor());
this.threadGroup this.threadGroup
.addCallbackOnExitExceptionHandler(ZapDirtyDbServerNodeException.class, .addCallbackOnExitExceptionHandler(ZapDirtyDbServerNodeException.class,
new CallbackZapDirtyDbExceptionAdapte r(logger, consoleLogger, this.persistor new CallbackZapDirtyDbExceptionAdapte r(logger, consoleLogger, this.persistor
.getClusterStatePersistor())); .getClusterStatePersistor()));
this.threadGroup this.threadGroup
.addCallbackOnExitExceptionHandler(ZapServerNodeException.class, .addCallbackOnExitExceptionHandler(ZapServerNodeException.class,
skipping to change at line 802 skipping to change at line 802
startStages(stageManager, toInit); startStages(stageManager, toInit);
// XXX: yucky casts // XXX: yucky casts
this.managementContext = new ServerManagementContext((DSOChannelManagerMBean ) channelManager,channelStats, this.managementContext = new ServerManagementContext((DSOChannelManagerMBean ) channelManager,channelStats,
connectionPolicy, getOp erationGuardian(platformServiceRegistry, connectionPolicy, getOp erationGuardian(platformServiceRegistry,
channelLifeCycl eHandler), voltron, voltronSink); channelLifeCycl eHandler), voltron, voltronSink);
final CallbackOnExitHandler handler = new CallbackGroupExceptionHandler(logg er, consoleLogger); final CallbackOnExitHandler handler = new CallbackGroupExceptionHandler(logg er, consoleLogger);
this.threadGroup.addCallbackOnExitExceptionHandler(GroupException.class, han dler); this.threadGroup.addCallbackOnExitExceptionHandler(GroupException.class, han dler);
// don't join the group if the configuration is not complete
startGroupManagers(); if (!configuration.isPartialConfiguration()) {
this.l2Coordinator.start(); startGroupManagers();
this.l2Coordinator.start();
} else {
TCLogging.getConsoleLogger().info("Started the server in diagnostic mode")
;
}
startDiagnosticListener(); startDiagnosticListener();
setLoggerOnExit(); setLoggerOnExit();
} }
private ConsistencyManager createConsistencyManager(ServerConfigurationManager configSetupManager, private ConsistencyManager createConsistencyManager(ServerConfigurationManager configSetupManager,
int knownPeers, int knownPeers,
int voteCount) { int voteCount) {
// start the server in diagnostic mode if the configuration is not complete // start the server in diagnostic mode if the configuration is not complete
if (configSetupManager.isPartialConfiguration()) { if (configSetupManager.isPartialConfiguration()) {
if (knownPeers != 0) { if (knownPeers != 0) {
skipping to change at line 997 skipping to change at line 1001
} else { } else {
logger.warn("Deferring PlatformInfoRequest to new passive: " + nodeI D); logger.warn("Deferring PlatformInfoRequest to new passive: " + nodeI D);
} }
} }
} }
@Override @Override
public void nodeLeft(NodeID nodeID) { public void nodeLeft(NodeID nodeID) {
if (l2Coordinator.getStateManager().isActiveCoordinator()) { if (l2Coordinator.getStateManager().isActiveCoordinator()) {
PlatformInfoRequest fake = PlatformInfoRequest.createServerInfoRemoveM essage((ServerID)nodeID); PlatformInfoRequest fake = PlatformInfoRequest.createServerInfoRemoveM essage((ServerID)nodeID);
fake.setMessageOrginator(nodeID); fake.setMessageOrginator((ServerID)nodeID);
infoHandler.addToSink(fake); infoHandler.addToSink(fake);
} }
} }
}; };
} }
private void connectServerStateToReplicatedState(LocalMonitoringProducer monit oringShimService, StateManager mgr, ClientEntityStateManager clients, Replicated ClusterStateManager rcs) { private void connectServerStateToReplicatedState(LocalMonitoringProducer monit oringShimService, StateManager mgr, ClientEntityStateManager clients, Replicated ClusterStateManager rcs) {
mgr.registerForStateChangeEvents(new StateChangeListener() { mgr.registerForStateChangeEvents(new StateChangeListener() {
@Override @Override
public void l2StateChanged(StateChangedEvent sce) { public void l2StateChanged(StateChangedEvent sce) {
skipping to change at line 1036 skipping to change at line 1040
} catch (IOException ioe) { } catch (IOException ioe) {
throw new RuntimeException(ioe); throw new RuntimeException(ioe);
} }
} }
} }
}); });
} }
public void startGroupManagers() { public void startGroupManagers() {
try { try {
final NodeID myNodeId = this.groupCommManager.join(this.configSetupManag er.getGroupConfiguration()); final NodeID myNodeId = this.groupCommManager.join(this.configSetupManag er.getGroupConfiguration());
logger.info("This L2 Node ID = " + myNodeId); logger.info("This L2 Node ID = " + myNodeId);
} catch (final GroupException e) { } catch (final GroupException e) {
logger.error("Caught Exception :", e); logger.error("Caught Exception :", e);
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
@SuppressWarnings("unused")
public void reloadConfiguration() throws ConfigurationSetupException {
if (false) { throw new ConfigurationSetupException(); }
throw new UnsupportedOperationException();
}
private HashMap<TCMessageType, Class<? extends TCMessage>> getMessageTypeClass Mappings() { private HashMap<TCMessageType, Class<? extends TCMessage>> getMessageTypeClass Mappings() {
HashMap<TCMessageType, Class<? extends TCMessage>> messageTypeClassMapping = new HashMap<>(); HashMap<TCMessageType, Class<? extends TCMessage>> messageTypeClassMapping = new HashMap<>();
messageTypeClassMapping.put(TCMessageType.CLIENT_HANDSHAKE_MESSAGE, ClientHa ndshakeMessageImpl.class); messageTypeClassMapping.put(TCMessageType.CLIENT_HANDSHAKE_MESSAGE, ClientHa ndshakeMessageImpl.class);
messageTypeClassMapping.put(TCMessageType.CLIENT_HANDSHAKE_ACK_MESSAGE, Clie ntHandshakeAckMessageImpl.class); messageTypeClassMapping.put(TCMessageType.CLIENT_HANDSHAKE_ACK_MESSAGE, Clie ntHandshakeAckMessageImpl.class);
messageTypeClassMapping messageTypeClassMapping
.put(TCMessageType.CLIENT_HANDSHAKE_REFUSED_MESSAGE, ClientHandshakeRefu sedMessageImpl.class); .put(TCMessageType.CLIENT_HANDSHAKE_REFUSED_MESSAGE, ClientHandshakeRefu sedMessageImpl.class);
messageTypeClassMapping.put(TCMessageType.CLUSTER_MEMBERSHIP_EVENT_MESSAGE, ClusterMembershipMessage.class); messageTypeClassMapping.put(TCMessageType.CLUSTER_MEMBERSHIP_EVENT_MESSAGE, ClusterMembershipMessage.class);
messageTypeClassMapping.put(TCMessageType.VOLTRON_ENTITY_MESSAGE, NetworkVol tronEntityMessageImpl.class); messageTypeClassMapping.put(TCMessageType.VOLTRON_ENTITY_MESSAGE, NetworkVol tronEntityMessageImpl.class);
messageTypeClassMapping.put(TCMessageType.VOLTRON_ENTITY_RECEIVED_RESPONSE, VoltronEntityReceivedResponseImpl.class); messageTypeClassMapping.put(TCMessageType.VOLTRON_ENTITY_RECEIVED_RESPONSE, VoltronEntityReceivedResponseImpl.class);
 End of changes. 5 change blocks. 
12 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)