Class ClientFactory

java.lang.Object
com.linkedin.venice.fastclient.factory.ClientFactory

public class ClientFactory extends Object
  • Constructor Details

    • ClientFactory

      public ClientFactory()
  • Method Details

    • getAndStartGenericStoreClient

      public static <K, V> AvroGenericStoreClient<K,V> getAndStartGenericStoreClient(ClientConfig clientConfig)
    • getGenericStoreClient

      public static <K, V> AvroGenericStoreClient<K,V> getGenericStoreClient(ClientConfig clientConfig)
      Builds the Fast Client wrapper chain without calling AvroGenericStoreClient.start(). Callers that need to register a StoreVersionSwitchListener or StoreConfigChangeListener before the first metadata refresh fires should use this entry point, register on the returned client, then call start().

      register*Listener only delivers transitions observed after the listener exists in the registry — a listener registered after start() returns will not see the initial (-1 -> currentVersion) transition committed by the first refresh. This factory plus start() from the caller is the supported way to observe that initial transition.

    • getAndStartSpecificStoreClient

      public static <K, V extends org.apache.avro.specific.SpecificRecord> AvroSpecificStoreClient<K,V> getAndStartSpecificStoreClient(ClientConfig clientConfig)
    • getAndStartGenericStoreClient

      public static <K, V> AvroGenericStoreClient<K,V> getAndStartGenericStoreClient(StoreMetadata storeMetadata, ClientConfig clientConfig)
      TODO: once we decide to completely remove the helix based implementation, we won't need to pass the param: in these factory methods. So far, it is for the testing purpose.
    • getAndStartSpecificStoreClient

      public static <K, V extends org.apache.avro.specific.SpecificRecord> AvroSpecificStoreClient<K,V> getAndStartSpecificStoreClient(StoreMetadata storeMetadata, ClientConfig clientConfig)