/** * Removes the local node from the distributed registry of nodes providing * the service. After this call, the HATarget can still be queried for * view change, etc. but the local node's instance of the service is no * longer registered with the cluster. * <p> * <strong>NOTE:</strong> Calling this method does not cause * {@link #invocationsAllowed()} to return <code>false</code>. Use * {@link #destroy()} unless your application needs to separately control * the two aspects of shutting down a clustered service. */ public void disable() { try { if (this.partition != null) { log.debug ("Disabled called on HATarget"); this.partition.getDistributedReplicantManager().remove (this.replicantName); } } catch (Exception e) { log.error("failed to disable", e); } }
/** * Unregister's with the partition's {@link DistributedReplicantManager}. */ protected void cleanExistenceInCurrentHAPartition() { if (this.partition != null) { try { DistributedReplicantManager drm = partition.getDistributedReplicantManager(); drm.unregisterListener(this.replicantName, this); drm.remove(this.replicantName); } catch (Exception e) { log.error("failed to clean existence in current ha partition", e); } } }
protected void unregisterDRMListener() throws Exception { DistributedReplicantManager drm = this.partition.getDistributedReplicantManager(); String key = this.getHAServiceKey(); // remove replicant node drm.remove(key); // unregister drm.unregisterListener(key, this); }
/** * Remove the service from active operation. * * @throws Exception */ public void stop() throws Exception { DistributedReplicantManager drm = partition.getDistributedReplicantManager(); drm.unregisterListener(getServiceHAName(), drmListener); drm.remove(getServiceHAName()); coordinator = false; partition.unregisterRPCHandler(getServiceHAName(), rpcTarget); synchronized (liveServers) { liveServers.clear(); } synchronized (unresolvedRemoteDependencies) { unresolvedRemoteDependencies.clear(); } }
@Override public void stopService() { DistributedReplicantManager drm = this.partition.getDistributedReplicantManager(); DistributedState ds = this.partition.getDistributedStateService(); try { this.partition.unregisterRPCHandler(this.RPC_HANDLER_NAME, this); ds.unregisterDSListenerEx(this.RPC_HANDLER_NAME, this); drm.unregisterListener(this.RPC_HANDLER_NAME, this); drm.remove(this.RPC_HANDLER_NAME); this.invalidationSubscription.unregister(); ds.remove(this.RPC_HANDLER_NAME, this.partition.getNodeName(), true); // this.invalMgr = null; // partition = null; this.invalidationSubscription = null; this.RPC_HANDLER_NAME = null; this.localGroups = null; this.bridgedGroups = new Vector<String>(); } catch (Exception e) { this.log.info("Problem while shuting down invalidation cache bridge", e); } }
public void shutdown() throws Exception { DistributedReplicantManager drm = this.partition.getDistributedReplicantManager(); drm.unregisterListener(getServiceHAName(), drmListener); drm.remove(getServiceHAName()); this.partition.unregisterRPCHandler(getServiceHAName(), rpcTarget); this.lockSupport.stop(); this.contentManager = null; this.initialized = false; }