1
REST操作を使用せずにユーレカサーバーから登録されたインスタンスを削除する方法はありますか?すべてのアプリケーションを含むデータ構造はどれですか?ユーレカサーバーから登録されたインスタンスをプログラムで削除する
(私はそれらをユーレカサーバでコードを書くことを削除したいと思うことは明らかです)。
おかげで、
ナノ
REST操作を使用せずにユーレカサーバーから登録されたインスタンスを削除する方法はありますか?すべてのアプリケーションを含むデータ構造はどれですか?ユーレカサーバーから登録されたインスタンスをプログラムで削除する
(私はそれらをユーレカサーバでコードを書くことを削除したいと思うことは明らかです)。
おかげで、
ナノ
はあなたが後にしている機能は、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.
*/
これは、あなたがユーレカサーバー自体からこれを達成する方法です。