@Override public InternalDistributedMember getDistributedMember() { return this.dm.getId(); }
/** * Returns the string value of the distribution manager's id. */ @Override public String getMemberId() { return String.valueOf(this.dm.getId()); }
/** * Returns true if this instance represents a local lock grantor. * * @return true if this instance represents a local lock grantor */ public boolean isLocal() { return this.dm.getId().equals(this.lockGrantorMember); }
/** * Returns true if this instance represents a local lock grantor with the specified DLS serial * number * * @return ture if local grantor with matching serial number */ public boolean isLocal(int dlsSerialNumber) { return this.lockGrantorSerialNumber == dlsSerialNumber && this.dm.getId().equals(this.lockGrantorMember); }
/** * Returns true if this instance represents a remote lock grantor. * * @return true if this instance represents a remote lock grantor */ public boolean isRemote() { return !this.dm.getId().equals(this.lockGrantorMember); }
@Override public TXStateInterface getRealDeal(DistributedMember t) { assert t != null; if (this.realDeal == null) { this.target = t; this.realDeal = new DistTXState(this, false); if (logger.isDebugEnabled()) { logger.debug("Built a new DistTXState: {} me:{}", this.realDeal, this.txMgr.getDM().getId()); } } return this.realDeal; }
@Override public Set adviseProfileRemove() { // Our set of profiles includes local members. However, the update // attributes message doesn't seem to be able to handle being sent to local // members Set results = super.adviseProfileRemove(); results.remove(getDistributionManager().getId()); return results; }
/** * Initializes the Node for this Map. */ private Node initializeNode() { return new Node(getDistributionManager().getId(), SERIAL_NUMBER_GENERATOR.getAndIncrement()); }
@Override public Set<InternalDistributedMember> getBucketOwners() { Set<InternalDistributedMember> s = this.advisor.adviseInitialized(); if (s == Collections.<InternalDistributedMember>emptySet()) { s = new HashSet<InternalDistributedMember>(); } if (isHosting()) { s.add(this.partitionedRegion.getDistributionManager().getId()); } return s; }
public VersionMismatchAlert(RemoteGfManagerAgent sender, String message) { this.source = sender; this.sourceId = sender.toString(); this.time = new Date(System.currentTimeMillis()); this.message = message; /* sender in this case is going to be the agent itself. */ if (sender.getDM() != null) { this.sender = sender.getDM().getId(); } else { this.sender = null; } }
/** * Returns true if the request comes from the local member. * * @param request the lock request to check * @return true if the request comes from the local member */ private boolean isLocalRequest(DLockRequestMessage request) { return request.getSender().equals(this.dlock.getDistributionManager().getId()); }
/** * return true if the given member has this advisor's partitioned region */ public boolean hasPartitionedRegion(InternalDistributedMember profileId) { if (getDistributionManager().getId().equals(profileId)) { return true; } return (getProfile(profileId) != null); }
public static void send(DistributionManager dm, InternalDistributedMember dest, int processorId, Map<? extends DataSerializable, ? extends DataSerializable> eventState, boolean isHARegion) { RegionStateMessage msg = new RegionStateMessage(dest, processorId, eventState, isHARegion); msg.setSender(dm.getId()); // for EventStateHelper.dataSerialize dm.putOutgoing(msg); }
public static void send(DistributionManager dm, InternalDistributedMember dest, int processorId, RegionVersionVector rvv, boolean isHARegion) { RegionStateMessage msg = new RegionStateMessage(dest, processorId, rvv, isHARegion); msg.setSender(dm.getId()); // for EventStateHelper.dataSerialize dm.putOutgoing(msg); }
private Set<InternalDistributedMember> getAllStores(String partitionName) { if (partitionName != null) { return getFixedPartitionStores(partitionName); } final Set<InternalDistributedMember> allStores = this.prRegion.getRegionAdvisor().adviseDataStore(true); PartitionedRegionDataStore myDS = this.prRegion.getDataStore(); if (myDS != null) { allStores.add(this.prRegion.getDistributionManager().getId()); } return allStores; }
private JmxManagerAdvisor(DistributionAdvisee advisee) { super(advisee); JmxManagerProfile p = new JmxManagerProfile(getDistributionManager().getId(), incrementAndGetVersion()); advisee.fillInProfile(p); ((JmxManagerAdvisee) advisee).initProfile(p); }
/** Creates the current distribution profile for this member */ public Profile createProfile() { Profile newProfile = instantiateProfile(getDistributionManager().getId(), incrementAndGetVersion()); getAdvisee().fillInProfile(newProfile); return newProfile; }
public synchronized void updateRemoteProfile() { Set<InternalDistributedMember> recips = adviseGeneric(); ResourceManagerProfile profile = new ResourceManagerProfile(getDistributionManager().getId(), incrementAndGetVersion()); getResourceManager().fillInProfile(profile); ResourceProfileMessage.send(getResourceManager(), recips, profile); }
public void broadcastChange() { try { Set<InternalDistributedMember> recips = adviseGeneric(); // for now just tell everyone JmxManagerProfile p = new JmxManagerProfile(getDistributionManager().getId(), incrementAndGetVersion()); getAdvisee().fillInProfile(p); JmxManagerProfileMessage.send(getAdvisee().getSystem().getDistributionManager(), recips, p); } catch (CancelException ignore) { } }
public static void send(MessageWithReply destroyedMsg, byte replyCode, DistributionManager dm) { NonGrantorDestroyedReplyMessage m = new NonGrantorDestroyedReplyMessage(); m.processorId = destroyedMsg.getProcessorId(); m.setRecipient(destroyedMsg.getSender()); m.replyCode = replyCode; if (dm.getId().equals(destroyedMsg.getSender())) { m.setSender(destroyedMsg.getSender()); m.dmProcess(dm); } else { dm.putOutgoing(m); } }