public InternalDistributedMember getLocalAddress() { return membershipManager.getLocalMember(); }
public InternalDistributedMember getLocalAddress() { return membershipManager.getLocalMember(); }
public void disconnect(boolean duringStartup) { StringBuilder sb = new StringBuilder(); sb.append("Disconnected from distribution channel "); long start = System.currentTimeMillis(); if (membershipManager != null) { sb.append(membershipManager.getLocalMember()); sb.append(" (took "); long begin = System.currentTimeMillis(); if (duringStartup) { membershipManager.uncleanShutdown("Failed to start distribution", null); } else { membershipManager.shutdown(); } long delta = System.currentTimeMillis() - begin; sb.append(delta); sb.append("/"); } membershipManager = null; if (DistributionManager.VERBOSE) { long delta = System.currentTimeMillis() - start; sb.append(delta); sb.append(" ms)"); logger.fine(sb.toString()); } }
public void disconnect(boolean duringStartup) { StringBuffer sb = new StringBuffer(); sb.append("Disconnected from distribution channel "); long start = System.currentTimeMillis(); logger.debug("DistributionChannel disconnecting with "+ membershipManager + "; duringStartup="+duringStartup); if (membershipManager != null) { sb.append(membershipManager.getLocalMember()); sb.append(" (took "); long begin = System.currentTimeMillis(); if (duringStartup) { membershipManager.uncleanShutdown("Failed to start distribution", null); } else { membershipManager.shutdown(); } long delta = System.currentTimeMillis() - begin; sb.append(delta); sb.append("/"); } membershipManager = null; if (logger.isTraceEnabled(LogMarker.DM)) { long delta = System.currentTimeMillis() - start; sb.append(delta); sb.append(" ms)"); logger.trace(LogMarker.DM, sb); } }
/** * Returns the id of this distribution channel. If this channel * uses JavaGroups and the conduit to communicate with others, then * the port of the JavaGroups channel's {@link InternalDistributedMember address} is * returned. * * @since 3.0 */ public long getId() { InternalDistributedMember moi = membershipManager.getLocalMember(); if (moi == null) { throw new DistributedSystemDisconnectedException(LocalizedStrings.DistributionChannel_I_NO_LONGER_HAVE_A_MEMBERSHIP_ID.toLocalizedString(), membershipManager.getShutdownCause()); } return moi.getPort(); }
/** * Returns the id of this distribution channel. If this channel * uses JavaGroups and the conduit to communicate with others, then * the port of the JavaGroups channel's {@link InternalDistributedMember address} is * returned. * * @since 3.0 */ public long getId() { MembershipManager mgr = this.membershipManager; if (mgr == null) { throw new DistributedSystemDisconnectedException(LocalizedStrings.DistributionChannel_I_NO_LONGER_HAVE_A_MEMBERSHIP_ID.toLocalizedString()); } InternalDistributedMember moi = mgr.getLocalMember(); if (moi == null) { throw new DistributedSystemDisconnectedException(LocalizedStrings.DistributionChannel_I_NO_LONGER_HAVE_A_MEMBERSHIP_ID.toLocalizedString(), membershipManager.getShutdownCause()); } return moi.getPort(); }
logger.info(LocalizedMessage.create( LocalizedStrings.Connection_0_SUCCESSFULLY_REESTABLISHED_CONNECTION_TO_PEER_1, new Object[] {mgr.getLocalMember(), remoteAddr}));
this.myid = membershipManager.getLocalMember();
this.myid = membershipManager.getLocalMember();
t.getLogger().info( LocalizedStrings.Connection_0_SUCCESSFULLY_REESTABLISHED_CONNECTION_TO_PEER_1, new Object[] {mgr.getLocalMember(), remoteAddr});