@Override public InternalDistributedMember getDistributedMember() { return this.dm.getId(); } @Override
/** * 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 local lock grantor. * * @return true if this instance represents a local lock grantor */ public boolean isLocal() { return this.dm.getId().equals(this.lockGrantorMember); }
/** * Initializes the Node for this Map. */ private Node initializeNode() { return new Node(getDistributionManager().getId(), SERIAL_NUMBER_GENERATOR.getAndIncrement()); }
@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; }
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; } }
@SuppressWarnings("unchecked") public Set<InternalDistributedMember> getBucketOwners() { Set<InternalDistributedMember> s = getOtherBucketOwners(); if (s == Collections.<InternalDistributedMember> emptySet()) { s = new THashSet(); } if (isHosting()) { s.add(this.partitionedRegion.getDistributionManager().getId()); } return s; }
public void run() { DM dm = getSystem().getDistributionManager(); assertEquals("For DM " + dm.getId(), 3, dm.getOtherNormalDistributionManagerIds().size()); FirstMessage message = new FirstMessage(); dm.putOutgoing(message); } });
/** * 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()); }
/** * 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()); }
public void testGetDistributionVMType() { DM dm = this.agent.getDM(); InternalDistributedMember ipaddr = dm.getId(); assertEquals(DistributionManager.ADMIN_ONLY_DM_TYPE, ipaddr.getVmKind()); }
/** * Accessed via reflection. DO NOT REMOVE */ protected InternalDistributedMember getDistributionManagerId() { Cache cache = getCache(); DistributedSystem ds = cache.getDistributedSystem(); return ((InternalDistributedSystem)ds).getDistributionManager().getId(); }
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; }
private JmxManagerAdvisor(DistributionAdvisee advisee) { super(advisee); JmxManagerProfile p = new JmxManagerProfile(getDistributionManager().getId(), incrementAndGetVersion()); advisee.fillInProfile(p); ((JmxManagerAdvisee)advisee).initProfile(p); }
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) { } }