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 theKeyValueTableManager
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes theKeyValueTableManager
.boolean
createKeyValueTable(@NonNull java.lang.String scopeName, @NonNull java.lang.String keyValueTableName, @NonNull KeyValueTableConfiguration config)
Creates a new Key-Value Table.boolean
deleteKeyValueTable(@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 theKeyValueTableManager
class.- Parameters:
clientConfig
- AClientConfig
that can be used to configure the connection to Pravega.
-
-
Method Detail
-
close
public void close()
Description copied from interface:KeyValueTableManager
Closes theKeyValueTableManager
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in 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:KeyValueTableManager
Creates a new Key-Value Table.Note: This method is idempotent assuming called with the same name and config. This method may block.
- Specified by:
createKeyValueTable
in 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:KeyValueTableManager
Deletes 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:
deleteKeyValueTable
in 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:KeyValueTableManager
Gets an iterator for all Key-Value Table in the given scope.- Specified by:
listKeyValueTables
in interfaceKeyValueTableManager
- Parameters:
scopeName
- The name of the scope for which to list Key-Value Tables in.- Returns:
- An Iterator of
KeyValueTableInfo
that can be used to iterate through all Key-Value Tables in the Scope.
-
-