/** * Actually close this advisor for real. Called by ProxyBucketRegion only. Calling this method * actually closes this advisor whereas {@link #close()} only sets hosting to false. */ protected void closeAdvisor() { boolean wasPrimary; synchronized (this) { if (isClosed()) { return; } wasPrimary = isPrimary(); super.close(); this.requestPrimaryState(CLOSED); this.redundancyTracker.closeBucket(); this.localProfile = null; } if (wasPrimary) { releasePrimaryLock(); } }