private boolean continueVolunteering() { synchronized (BucketAdvisor.this) { // false if caller is not the volunteeringThread if (!Thread.currentThread().equals(this.volunteeringThread)) { return false; } if (!isVolunteering() && !isBecomingPrimary()) { return false; } // false if primaryMember is not null if (!isAggressive() && basicGetPrimaryMember() != null) { return false; } // false if this member is already primary if (isPrimary()) { return false; } // false if closed if (isClosed()) { return false; } // false if no longer hosting if (!isHosting()) { return false; } // must be true... need to continue volunteering return true; } }
continue; } else if (isBecomingPrimary()) {
try { synchronized (this) { if (isHosting() && (isVolunteering() || isBecomingPrimary())) { Bucket br = this.regionAdvisor.getBucket(getBucket().getId()); if (br != null && br instanceof BucketRegion) {