private boolean isMySignal(Signal sig) { return currentInstanceName != null && currentInstanceName.equals(sig.getMemberToken()); }
/** * Implementations of consumeSignal should strive to return control * promptly back to the thread that has delivered the Signal. */ public void consumeSignal( final Signal s ) throws ActionException { try { s.acquire(); callBack.processNotification( s ); } catch( SignalAcquireException e ) { logger.log( Level.SEVERE, e.getLocalizedMessage(), e); } try { s.release(); } catch( SignalReleaseException e ) { logger.log( Level.SEVERE, e.getLocalizedMessage(), e); } } }
private void handleSignal(final Signal signal) { fineLog( "IiopFolbGmsClient.handleSignal: signal from: {0}", signal.getMemberToken()); fineLog( "IiopFolbGmsClient.handleSignal: map entryset: {0}", signal.getMemberDetails().entrySet()); if (signal instanceof PlannedShutdownSignal || signal instanceof FailureNotificationSignal) { removeMember(signal); } else if (signal instanceof JoinedAndReadyNotificationSignal) { addMember(signal); } else { _logger.log(Level.SEVERE, "IiopFolbGmsClient.handleSignal: unknown signal: {0}", signal.toString()); } }
GMSBS_LOGGER.log(LogLevel.FINE, "signal: " + signal.toString()); String name = signal.getMemberToken(); long time = signal.getStartTime(); STATE state = null;
new Object [] { signal.getClass().getSimpleName() + signalSubevent, signal.getMemberToken(), signal.getGroupName(), current, previous
GMSBS_LOGGER.log(LogLevel.FINE, "signal: " + signal.toString()); String name = signal.getMemberToken(); long time = signal.getStartTime(); STATE state = null;
private boolean isMySignal(Signal sig) { return currentInstanceName != null && currentInstanceName.equals(sig.getMemberToken()); }
/** * Implementations of consumeSignal should strive to return control * promptly back to the thread that has delivered the Signal. */ public void consumeSignal( final Signal s ) throws ActionException { try { s.acquire(); callBack.processNotification( s ); } catch( SignalAcquireException e ) { logger.log( Level.SEVERE, e.getLocalizedMessage(), e); } try { s.release(); } catch( SignalReleaseException e ) { logger.log( Level.SEVERE, e.getLocalizedMessage(), e); } } }
String instance = signal.getMemberToken(); String logdir = null; if (Configuration.isDBLoggingEnabled()) { Map<Serializable, Serializable> failedMemberDetails = signal.getMemberDetails(); if (failedMemberDetails != null) { logdir = (String)failedMemberDetails.get(TXLOGLOCATION);
public void processNotification(Signal notification) { boolean isJoin = true; if ((notification instanceof JoinedAndReadyNotificationSignal) || (notification instanceof FailureNotificationSignal) || (notification instanceof PlannedShutdownSignal)) { isJoin = notification instanceof JoinedAndReadyNotificationSignal; checkAndNotifyAboutCurrentAndPreviousMembers(notification.getMemberToken(), isJoin, true); } }
@Override public void processNotification(final Signal signal) { try { fineLog( "processNotification: signal {0}", signal ) ; signal.acquire(); handleSignal(signal); } catch (SignalAcquireException e) { _logger.log(Level.SEVERE, e.getLocalizedMessage()); } catch (Throwable t) { _logger.log(Level.SEVERE, t.getLocalizedMessage(), t); } finally { try { signal.release(); } catch (SignalReleaseException e) { _logger.log(Level.SEVERE, e.getLocalizedMessage()); } } }
@Override public void processNotification(Signal signal) { if (signal instanceof PlannedShutdownSignal) { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "[DistributedEJBTimerService] planned shutdown signal: " + signal); } PlannedShutdownSignal pssig = (PlannedShutdownSignal)signal; if (pssig.getEventSubType() == GMSConstants.shutdownType.INSTANCE_SHUTDOWN) { migrateTimers(signal.getMemberToken()); } } else { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "[DistributedEJBTimerService] ignoring signal: " + signal); } } }
/** * Implementations of consumeSignal should strive to return control * promptly back to the thread that has delivered the Signal. */ public void consumeSignal(final Signal s) throws ActionException { boolean signalAcquired = false; try { s.acquire(); signalAcquired = true; callBack.processNotification(s); } catch (SignalAcquireException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } finally { if (signalAcquired) { try { s.release(); } catch (SignalReleaseException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } } } } }
@Override public void processNotification(Signal signal) { Logger logger = ejbContainerUtil.getLogger(); if (signal instanceof PlannedShutdownSignal) { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "[DistributedEJBTimerServiceImpl] planned shutdown signal: " + signal); } PlannedShutdownSignal pssig = (PlannedShutdownSignal)signal; if (pssig.getEventSubType() == GMSConstants.shutdownType.INSTANCE_SHUTDOWN) { migrateTimers(signal.getMemberToken()); } } else { if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, "[DistributedEJBTimerServiceImpl] ignoring signal: " + signal); } } }
/** * Implementations of consumeSignal should strive to return control * promptly back to the thread that has delivered the Signal. */ public void consumeSignal(final Signal s) throws ActionException { boolean signalAcquired = false; try { s.acquire(); signalAcquired = true; callBack.processNotification(s); } catch (SignalAcquireException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } finally { if (signalAcquired) { try { s.release(); } catch (SignalReleaseException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } } } } }
private void removeMember(final Signal signal) { String instanceName = signal.getMemberToken(); try { fineLog( "IiopFolbGmsClient.removeMember->: {0}", instanceName); synchronized (this) { if (currentMembers.get(instanceName) != null) { currentMembers.remove(instanceName); fineLog( "IiopFolbGmsClient.removeMember: {0} removed - notifying listeners", instanceName); gis.notifyObservers(); fineLog( "IiopFolbGmsClient.removeMember: {0} - notification complete", instanceName); } else { fineLog( "IiopFolbGmsClient.removeMember: {0} not present: no action", instanceName); } } } finally { fineLog( "IiopFolbGmsClient.removeMember<-: {0}", instanceName); } }
/** * Implementations of consumeSignal should strive to return control * promptly back to the thread that has delivered the Signal. */ public void consumeSignal(final Signal s) throws ActionException { boolean signalAcquired = false; try { s.acquire(); signalAcquired = true; callBack.processNotification(s); } catch (SignalAcquireException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } finally { if (signalAcquired) { try { s.release(); } catch (SignalReleaseException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } } } } }
public void processNotification(Signal signal) { if (signal instanceof PlannedShutdownSignal || signal instanceof FailureNotificationSignal) { synchronized (aliveAndReadyView) { // only consider CORE members. AliveAndReadyView current = getCurrentView(); if (current != null && current.getMembers().contains(signal.getMemberToken())) { SortedSet<String> currentMembers = new TreeSet<String>(current.getMembers()); boolean result = currentMembers.remove(signal.getMemberToken()); assert (result); add(signal, currentMembers); if (signal instanceof PlannedShutdownSignalImpl) { PlannedShutdownSignalImpl pssig = (PlannedShutdownSignalImpl)signal; pssig.setCurrentView(getCurrentView()); pssig.setPreviousView(getPreviousView()); } else if (signal instanceof FailureNotificationSignalImpl) { FailureNotificationSignalImpl fsig = (FailureNotificationSignalImpl)signal; fsig.setCurrentView(getCurrentView()); fsig.setPreviousView(getPreviousView()); } } } } } }
/** * Implementations of consumeSignal should strive to return control * promptly back to the thread that has delivered the Signal. */ public void consumeSignal(final Signal s) throws ActionException { boolean signalAcquired = false; try { s.acquire(); signalAcquired = true; callBack.processNotification(s); } catch (SignalAcquireException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } finally { if (signalAcquired) { try { s.release(); } catch (SignalReleaseException e) { logger.log(Level.SEVERE, e.getLocalizedMessage(), e); } } } } }
public void processNotification(Signal signal) { if (signal instanceof PlannedShutdownSignal || signal instanceof FailureNotificationSignal) { synchronized (aliveAndReadyView) { // only consider CORE members. AliveAndReadyView current = getCurrentView(); if (current != null && current.getMembers().contains(signal.getMemberToken())) { SortedSet<String> currentMembers = new TreeSet<String>(current.getMembers()); boolean result = currentMembers.remove(signal.getMemberToken()); assert (result); add(signal, currentMembers); if (signal instanceof PlannedShutdownSignalImpl) { PlannedShutdownSignalImpl pssig = (PlannedShutdownSignalImpl)signal; pssig.setCurrentView(getCurrentView()); pssig.setPreviousView(getPreviousView()); } else if (signal instanceof FailureNotificationSignalImpl) { FailureNotificationSignalImpl fsig = (FailureNotificationSignalImpl)signal; fsig.setCurrentView(getCurrentView()); fsig.setPreviousView(getPreviousView()); } } } } } }