Package io.pravega.client.admin.impl
Class KeyValueTableManagerImpl
- java.lang.Object
-
- io.pravega.client.admin.impl.KeyValueTableManagerImpl
-
- All Implemented Interfaces:
KeyValueTableManager,java.lang.AutoCloseable
@Beta public class KeyValueTableManagerImpl extends java.lang.Object implements KeyValueTableManager
An implementation ofKeyValueTableManager. Used to bootstrap the client.
-
-
Constructor Summary
Constructors Constructor Description KeyValueTableManagerImpl(@NonNull ClientConfig clientConfig)Creates a new instance of theKeyValueTableManagerclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes theKeyValueTableManager.booleancreateKeyValueTable(@NonNull java.lang.String scopeName, @NonNull java.lang.String keyValueTableName, @NonNull KeyValueTableConfiguration config)Creates a new Key-Value Table.booleandeleteKeyValueTable(@NonNull java.lang.String scopeName, @NonNull java.lang.String keyValueTableName)Deletes the provided Key-Value Table.java.util.Iterator<KeyValueTableInfo>listKeyValueTables(@NonNull java.lang.String scopeName)Gets an iterator for all Key-Value Table in the given scope.
-
-
-
Constructor Detail
-
KeyValueTableManagerImpl
public KeyValueTableManagerImpl(@NonNull @NonNull ClientConfig clientConfig)Creates a new instance of theKeyValueTableManagerclass.- Parameters:
clientConfig- AClientConfigthat can be used to configure the connection to Pravega.
-
-
Method Detail
-
close
public void close()
Description copied from interface:KeyValueTableManagerCloses theKeyValueTableManager.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceKeyValueTableManager- See Also:
AutoCloseable.close()
-
createKeyValueTable
public boolean createKeyValueTable(@NonNull @NonNull java.lang.String scopeName, @NonNull @NonNull java.lang.String keyValueTableName, @NonNull @NonNull KeyValueTableConfiguration config)Description copied from interface:KeyValueTableManagerCreates a new Key-Value Table.Note: This method is idempotent assuming called with the same name and config. This method may block.
- Specified by:
createKeyValueTablein interfaceKeyValueTableManager- Parameters:
scopeName- The name of the scope to create this Key-Value Table in.keyValueTableName- The name of the Key-Value Table to be created.config- The configuration the Key-Value Table should use.- Returns:
- True if the Key-Value Table is created
-
deleteKeyValueTable
public boolean deleteKeyValueTable(@NonNull @NonNull java.lang.String scopeName, @NonNull @NonNull java.lang.String keyValueTableName)Description copied from interface:KeyValueTableManagerDeletes the provided Key-Value Table. No more updates, removals or queries may be performed. Resources used by the Key-Value Table will be freed.- Specified by:
deleteKeyValueTablein interfaceKeyValueTableManager- Parameters:
scopeName- The name of the scope of the Key-Value Table to delete.keyValueTableName- The name of the Key-Value Table to be deleted.- Returns:
- True if Key-Value Table is deleted.
-
listKeyValueTables
public java.util.Iterator<KeyValueTableInfo> listKeyValueTables(@NonNull @NonNull java.lang.String scopeName)
Description copied from interface:KeyValueTableManagerGets an iterator for all Key-Value Table in the given scope.- Specified by:
listKeyValueTablesin interfaceKeyValueTableManager- Parameters:
scopeName- The name of the scope for which to list Key-Value Tables in.- Returns:
- An Iterator of
KeyValueTableInfothat can be used to iterate through all Key-Value Tables in the Scope.
-
-