/** * Reply with a {@link Response} */ public void process(DistributionManager dm) { Response response = new Response(); response.processorId = this.processorId; response.setRecipient(this.getSender()); dm.putOutgoing(response); }
public void waitForCurrentOperations() { long timeout = 1000L * this.getDistributionManager().getSystem() .getConfig().getAckWaitThreshold(); waitForCurrentOperations(timeout); }
public void run() { DM dm = getSystem().getDistributionManager(); listener = new TestMembershipListener(); dm.addMembershipListener(listener); } });
/** Creates the current distribution profile for this member */ public Profile createProfile() { Profile newProfile = instantiateProfile( getDistributionManager().getId(), incrementAndGetVersion()); getAdvisee().fillInProfile(newProfile); return newProfile; }
@Override public Object call() throws Exception { InternalDistributedSystem system = getSystem(); DistributionManager dm = (DistributionManager) system.getDistributionManager(); long timeOffset = dm.getCacheTimeOffset(); return timeOffset; } });
protected void preWait() { waiting = true; DM mgr = getDistributionManager(); statStart = mgr.getStats().startReplyWait(); synchronized (this.members) { Set activeMembers = addListenerAndGetMembers(); processActiveMembers(activeMembers); } }
/** * Return the time in sec to wait before removing unresponsive members * from the distributed system. This period starts after the ack-wait-threshold * period has elapsed */ protected int getSevereAlertThreshold() { return this.system.getConfig().getAckSevereAlertThreshold(); }
/** * Return the time in sec to wait before sending an alert while * waiting for ack replies. Note that the ack wait threshold may * change at runtime, so we have to consult the system every time. */ private int getAckWaitThreshold() { return dm.getConfig().getAckWaitThreshold(); }
/** * Unregisters this processor as a membership listener * @since 5.7 */ protected void removeListener() { try { getDistributionManager().removeMembershipListener(this); } catch (DistributedSystemDisconnectedException e) { // ignore } }
/** * Return the Executor in which to process this message. */ protected Executor getExecutor(DistributionManager dm) { return dm.getExecutor(getProcessorType(), sender); }
private static void endSerialization(long start, int bytes) { DMStats stats = InternalDistributedSystem.getDMStats(); if (stats != null) { stats.endSerialization(start, bytes); } }
private static long startDeserialization() { long result = 0; DMStats stats = InternalDistributedSystem.getDMStats(); if (stats != null) { result = stats.startDeserialization(); } return result; }
private static void endDeserialization(long start, int bytes) { DMStats stats = InternalDistributedSystem.getDMStats(); if (stats != null) { stats.endDeserialization(start, bytes); } }
@Override protected boolean removeMember(InternalDistributedMember m, boolean departed) { if(isExpectingDirectReply()) { return true; } else { return super.removeMember(m, departed); } }
@Override public long cacheTimeMillis() { return this.system.getClock().cacheTimeMillis(); } public InternalDistributedMember getDistributionManagerId() {
/** Creates the current distribution profile for this member */ public Profile createProfile() { Profile newProfile = instantiateProfile( getDistributionManager().getId(), incrementAndGetVersion()); getAdvisee().fillInProfile(newProfile); return newProfile; }
@Override public Object call() throws Exception { InternalDistributedSystem system = getSystem(); DistributionManager dm = (DistributionManager) system.getDistributionManager(); long timeOffset = dm.getCacheTimeOffset(); return timeOffset; } });
@Override public Object call() throws Exception { InternalDistributedSystem system = getSystem(); DistributionManager dm = (DistributionManager) system.getDistributionManager(); long timeOffset = dm.getCacheTimeOffset(); return timeOffset; } });