答えて

1

はあなたが後にしている機能は、Netflixのユーレカクラス(PeerAwareInstanceRegistryImpl、およびAbstractInstanceRegistry)の単なる延長そのものである、InstanceRegistry経由で入手可能です。

具体的には、AbstractInstanceRegistry#cancel(String,String,boolean)メソッドはレジストリからアプリケーションを削除する必要があります。

このメソッドのJavadocの状態:

/** 
* Cancels the registration of an instance. 
* 
* <p> 
* This is normally invoked by a client when it shuts down informing the 
* server to remove the instance from traffic. 
* </p> 
* 
* @param appName the application name of the application. 
* @param id the unique identifier of the instance. 
* @param isReplication true if this is a replication event from other nodes, false 
*      otherwise. 
* @return true if the instance was removed from the {@link AbstractInstanceRegistry} successfully, false otherwise. 
*/ 

これは、あなたがユーレカサーバー自体からこれを達成する方法です。

関連する問題