@Override public boolean equals(Object obj) { if ((obj == null) || !(obj instanceof DataStoreBuckets)) { return false; } DataStoreBuckets other = (DataStoreBuckets) obj; return this.numBuckets == other.numBuckets && this.memberId.equals(other.memberId); }
@Override public boolean equals(Object other) { if (other instanceof DistributedLockOwner) { final DistributedLockOwner otherOwner = (DistributedLockOwner)other; return this.ownerThreadId == otherOwner.ownerThreadId && this.ownerMember.equals(otherOwner.ownerMember); } return false; }
@Override public boolean equals(Object other) { if (this == other) return true; if (other instanceof Key) { Key toTest = (Key)other; return (toTest.console.equals(this.console) && toTest.msgId == this.msgId); } return false; }
@Override public boolean equals(Object obj) { if ((obj == null) || !(obj instanceof DataStoreBuckets)) { return false; } DataStoreBuckets other = (DataStoreBuckets) obj; return this.numBuckets == other.numBuckets && this.memberId.equals(other.memberId); }
@Override public boolean equals(Object other) { if (other instanceof DistributedLockOwner) { final DistributedLockOwner otherOwner = (DistributedLockOwner)other; return this.ownerThreadId == otherOwner.ownerThreadId && this.ownerMember.equals(otherOwner.ownerMember); } return false; }
public void memberDeparted(InternalDistributedMember id, boolean crashed) { if (memberId.equals(id)) { synchronized(lock) { lock.notifyAll(); } } } public void quorumLost(Set<InternalDistributedMember> failures, List<InternalDistributedMember> remaining) {
public void abort(InternalDistributedMember memberId) { // abort if current join matches id... if (memberId.equals(RemoteGfManagerAgent.this.currentJoin)) { RemoteGfManagerAgent.this.abortCurrentJoin = true; this.interrupt(); } // cancel handling of current event if it matches id... if (this.id != null && this.id.equals(memberId)) { this.id = null; } }
public boolean visit(DistributionAdvisor advisor, final Profile profile, int profileIndex, int numProfiles, Void aggregate) { assert profile instanceof BucketProfile; final BucketProfile bucketProfile = (BucketProfile)profile; return !bucketProfile.isHosting || departedMember.equals(bucketProfile .getDistributedMember()); } };
/** * 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); }
public void memberDeparted(InternalDistributedMember theId, boolean crashed) { // if (logger.fineEnabled()) // logger.fine("waitForElder: <" + theId + "> has left"); if (desiredElder.equals(theId)) { notifyElderChangeWaiters(); } } public void memberSuspect(InternalDistributedMember id,
public void memberDeparted(InternalDistributedMember id, boolean crashed) { if(id.equals(target)) { abort(); } }
/** * 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); }
public void memberDeparted(InternalDistributedMember theId, boolean crashed) { if (desiredElder.equals(theId)) { notifyElderChangeWaiters(); } } public void memberSuspect(InternalDistributedMember id,
/** Get the {@link Profile} for the given member including self. */ public GfxdProfile getProfile(InternalDistributedMember member) { Profile profile = super.getProfile(member); if (profile != null || (profile = getMyProfile()).getDistributedMember().equals(member)) { return (GfxdProfile)profile; } return 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()); }
@Override public void memberDeparted(InternalDistributedMember id, boolean crashed) { GfxdConnectionWrapper wrapper; for (Long connId : this.idToConnMap.keySet()) { if (GemFireXDUtils.getDistributedMemberFromUUID(connId).equals(id)) { if ((wrapper = removeWrapper(connId)) != null) { wrapper.close(); } } } }
@Override protected boolean operateOnPartitionedRegion(DistributionManager dm, PartitionedRegion pr, long startTime) throws CacheException, QueryException, ForceReattemptException, InterruptedException { RegionEventImpl event = new RegionEventImpl(pr,Operation.REGION_INVALIDATE, this.callbackArg, !dm.getId().equals(getSender()), getSender()); pr.basicInvalidateRegion(event); return true; }
public void memberDeparted(InternalDistributedMember id, boolean crashed) { if (logger.fineEnabled()) { logger.fine("InitializingBucketMembershipObserver for bucket " + this.bucketToMonitor + " member departed " + id); } // Only release the lock iff requesting member has parted if (this.bucketToMonitor.isHosting() && id.equals(requestingMember)) { BucketRegion br = bucketToMonitor.getHostedBucketRegion(); br.releaseSnapshotGIIWriteLock(); } }
public void run() { Cache cache = getCache(); PartitionedRegion region = (PartitionedRegion) cache.getRegion("region1"); //Make sure we're not the primary assertFalse(region.getBucketPrimary(BUCKET_ID).equals(cache.getDistributedSystem().getDistributedMember())); } });