/** * Returns null if no stats available. */ public DMStats getDMStats() { DistributionManager dm = getDM(); if (dm != null) { return dm.getStats(); // fix for bug#34004 } else { return null; } }
/** * @return distribution stats, or null if there is no distributed system available */ public static DMStats getDMStats() { InternalDistributedSystem sys = getAnyInstance(); if (sys != null && sys.dm != null) { return sys.dm.getStats(); } return null; }
private void incMessagesInFlight(int val) { dm.getStats().incInitialImageMessagesInFlight(val); }
@Override public void commit() throws CommitConflictException { if (logger.isDebugEnabled()) { logger.debug("DistPeerTXStateStub.commit target=" + target); } // [DISTTX] TODO Handle Stats this.dm.getStats().incSentCommitMessages(1L); final Set<DistributedMember> recipients = Collections.singleton(target); this.commitDistTxMsg.setRecipients(recipients); this.dm.putOutgoing(this.commitDistTxMsg); this.commitDistTxMsg.resetRecipients(); }
/** * @return Object associated with the key that was sent in the get message */ public TXCommitMessage waitForResponse() throws RemoteOperationException { waitForRemoteResponse(); if (DistributionStats.enableClockStats) { getDistributionManager().getStats().incReplyHandOffTime(this.start); } return commitMessage; } }
public static DMStats getDMStats(InternalCache internalCache) { if (internalCache != null) { return internalCache.getDistributionManager().getStats(); } else { DMStats result = InternalDistributedSystem.getDMStats(); if (result == null) { result = new LonerDistributionManager.DummyDMStats(); } return result; } }
/** * @return Object associated with the key that was sent in the get message */ public Boolean waitForResponse() throws RemoteOperationException { waitForRemoteResponse(); if (DistributionStats.enableClockStats) { getDistributionManager().getStats().incReplyHandOffTime(this.start); } return rollbackState; } }
@Override protected void preWait() { this.waiting = true; DistributionManager mgr = getDistributionManager(); this.statStart = mgr.getStats().startReplyWait(); // Note we do not use addMembershipListenerAndGetDistributionManagerIds // because this is the startup message and we do not yet have any // members in the dm's list. mgr.addMembershipListener(this); // Set activeMembers = mgr.addMembershipListenerAndGetDistributionManagerIds(this); // synchronized (this.members) { // for (int i = 0; i < getMembers().length; i++) { // if (!activeMembers.contains(getMembers()[i])) { // memberDeparted(getMembers()[i], false); // } // } // } } }
protected void preWait() { waiting = true; DistributionManager mgr = getDistributionManager(); statStart = mgr.getStats().startReplyWait(); synchronized (this.members) { Set activeMembers = addListenerAndGetMembers(); processActiveMembers(activeMembers); } }
/** * Processes this message. This method is invoked by the receiver of the message. * * @param dm the distribution manager that is processing the message. */ @Override public void process(final DistributionManager dm, ReplyProcessor21 processor) { final long startTime = getTimestamp(); if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "ContainsKeyValueReplyMessage processor not found"); } return; } processor.process(this); dm.getStats().incReplyMessageTime(DistributionStats.getStatTime() - startTime); }
@Override public void process(final DistributionManager dm, final ReplyProcessor21 processor) { final long startTime = getTimestamp(); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "BecomePrimaryBucketReplyMessage process invoking reply processor with processorId:{}", this.processorId); } if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "BecomePrimaryBucketReplyMessage processor not found"); } return; } processor.process(this); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "processed {}", this); } dm.getStats().incReplyMessageTime(NanoTimer.getTime() - startTime); }
@Override public void process(final DistributionManager dm, final ReplyProcessor21 processor) { final long startTime = getTimestamp(); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "DeposePrimaryBucketReplyMessage process invoking reply processor with processorId: {}", this.processorId); } if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "DeposePrimaryBucketReplyMessage processor not found"); } return; } processor.process(this); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "{} processed {}", processor, this); } dm.getStats().incReplyMessageTime(NanoTimer.getTime() - startTime); }
@Override public void process(final DistributionManager dm, final ReplyProcessor21 processor) { final long startTime = getTimestamp(); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "DumpB2NReplyMessage process invoking reply processor with processorId: {}", this.processorId); } if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "DumpB2NReplyMessage processor not found"); } return; } processor.process(this); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "{} processed {}", processor, this); } dm.getStats().incReplyMessageTime(DistributionStats.getStatTime() - startTime); }
/** * Processes this message. This method is invoked by the receiver of the message. * * @param dm the distribution manager that is processing the message. */ @Override public void process(final DistributionManager dm, ReplyProcessor21 processor) { final long startTime = getTimestamp(); if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "RemoteClearReplyMessage processor not found"); } return; } processor.process(this); dm.getStats().incReplyMessageTime(DistributionStats.getStatTime() - startTime); }
/** * Processes this message. This method is invoked by the receiver of the message. * * @param dm the distribution manager that is processing the message. */ @Override public void process(final DistributionManager dm, ReplyProcessor21 processor) { final long startTime = getTimestamp(); if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "ContainsKeyValueReplyMessage processor not found"); } return; } processor.process(this); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "{} Processed {}", processor, this); } dm.getStats().incReplyMessageTime(DistributionStats.getStatTime() - startTime); }
/** * Processes this message. This method is invoked by the receiver of the message. * * @param dm the distribution manager that is processing the message. */ @Override public void process(final DistributionManager dm, final ReplyProcessor21 p) { final long startTime = getTimestamp(); FetchBulkEntriesResponse processor = (FetchBulkEntriesResponse) p; if (processor == null) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "FetchBulkEntriesReplyMessage processor not found"); } return; } processor.processChunkResponse(this); if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, "{} processed {}", processor, this); } dm.getStats().incReplyMessageTime(DistributionStats.getStatTime() - startTime); }
private void postWait() { waiting = false; removeListener(); final DistributionManager mgr = getDistributionManager(); mgr.getStats().endReplyWait(this.statStart, this.initTime); mgr.getCancelCriterion().checkCancelInProgress(null); }
/** * @return Object associated with the key that was sent in the get message */ public Object waitForResponse(boolean preferCD) throws RemoteOperationException { waitForRemoteResponse(); if (DistributionStats.enableClockStats) { getDistributionManager().getStats().incReplyHandOffTime(this.start); } if (!this.returnValueReceived) { throw new RemoteOperationException( "no return value received"); } return getValue(preferCD); } }
/** * Helper method for send */ private void setRecipientsSendData(Set recipients, ReplyProcessor21 processor, RegionCommitList rcl) { setRecipients(recipients); this.regions = rcl; if (rcl.getNeedsAck()) { this.processorId = processor.getProcessorId(); } else { this.processorId = 0; } this.dm.getStats().incSentCommitMessages(1L); this.sequenceNum++; this.dm.putOutgoing(this); resetRecipients(); }
public void dmProcess(final DistributionManager dm) { final long startTime = getTimestamp(); ReplyProcessor21 processor = ReplyProcessor21.getProcessor(processorId); try { this.process(dm, processor); if (DistributionStats.enableClockStats) { dm.getStats().incReplyMessageTime(DistributionStats.getStatTime() - startTime); } } catch (RuntimeException ex) { if (processor != null) { processor.cancel(getSender(), ex); } throw ex; } }