Package io.pravega.client
Interface KeyValueTableFactory
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface KeyValueTableFactory extends java.lang.AutoCloseable
Creates instances ofKeyValueTable
.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes theKeyValueTableFactory
.<KeyT,ValueT>
KeyValueTable<KeyT,ValueT>forKeyValueTable(@NonNull java.lang.String keyValueTableName, @NonNull Serializer<KeyT> keySerializer, @NonNull Serializer<ValueT> valueSerializer, @NonNull KeyValueTableClientConfiguration clientConfiguration)
Creates a newKeyValueTable
that provides access to a Pravega Key-Value Table.static KeyValueTableFactory
withScope(java.lang.String scope, ClientConfig config)
Creates a new instance ofKeyValueTableFactory
.
-
-
-
Method Detail
-
withScope
static KeyValueTableFactory withScope(java.lang.String scope, ClientConfig config)
Creates a new instance ofKeyValueTableFactory
.- Parameters:
scope
- The Key-Value Table scope.config
- Configuration for the client.- Returns:
- Instance of
KeyValueTableFactory
implementation.
-
forKeyValueTable
<KeyT,ValueT> KeyValueTable<KeyT,ValueT> forKeyValueTable(@NonNull @NonNull java.lang.String keyValueTableName, @NonNull @NonNull Serializer<KeyT> keySerializer, @NonNull @NonNull Serializer<ValueT> valueSerializer, @NonNull @NonNull KeyValueTableClientConfiguration clientConfiguration)
Creates a newKeyValueTable
that provides access to a Pravega Key-Value Table.- Type Parameters:
KeyT
- Key Type.ValueT
- Value Type.- Parameters:
keyValueTableName
- Name of theKeyValueTable
.keySerializer
- ASerializer
forKeyValueTable
Keys. Refer to theKeyValueTable
Javadoc for constraints relating to the size of the serialization.valueSerializer
- ASerializer
forKeyValueTable
Values. Refer to theKeyValueTable
Javadoc for constraints relating to the size of the serialization.clientConfiguration
- AKeyValueTableClientConfiguration
to use for configuring theKeyValueTable
client.- Returns:
- A
KeyValueTable
that provides access to the requested Key-Value Table.
-
close
void close()
Closes theKeyValueTableFactory
. This will close any connections created through it.- Specified by:
close
in interfacejava.lang.AutoCloseable
- See Also:
AutoCloseable.close()
-
-