Package io.milvus.common.interceptor
Class IdentifierInterceptor
- java.lang.Object
-
- io.milvus.common.interceptor.IdentifierInterceptor
-
- All Implemented Interfaces:
io.grpc.ClientInterceptor
public class IdentifierInterceptor extends Object implements io.grpc.ClientInterceptor
A gRPC client interceptor that injects the server-assigned connection identifier into every outgoing RPC request's metadata.The identifier is obtained from
ConnectResponse.getIdentifier()during the initial Connect RPC, and is used by the server (especially kite-coordinator) to associate subsequent requests with the connection-level state (e.g. cluster_id binding for resource group routing).This aligns Java SDK behavior with pymilvus, which implements the same mechanism via
header_adder_interceptor.
-
-
Constructor Summary
Constructors Constructor Description IdentifierInterceptor(long identifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <ReqT,RespT>
io.grpc.ClientCall<ReqT,RespT>interceptCall(io.grpc.MethodDescriptor<ReqT,RespT> method, io.grpc.CallOptions callOptions, io.grpc.Channel next)
-