Package io.pravega.client.admin
Interface KeyValueTableManager
-
- All Superinterfaces:
java.lang.AutoCloseable
@Beta public interface KeyValueTableManager extends java.lang.AutoCloseable
Used to create, delete and manage Key-Value Tables.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes theKeyValueTableManager
.static KeyValueTableManager
create(ClientConfig config)
Creates a new instance ofKeyValueTableManager
.static KeyValueTableManager
create(java.net.URI controller)
Creates a new instance ofKeyValueTableManager
.boolean
createKeyValueTable(java.lang.String scopeName, java.lang.String keyValueTableName, KeyValueTableConfiguration config)
Creates a new Key-Value Table.boolean
deleteKeyValueTable(java.lang.String scopeName, java.lang.String keyValueTableName)
Deletes the provided Key-Value Table.java.util.Iterator<KeyValueTableInfo>
listKeyValueTables(java.lang.String scopeName)
Gets an iterator for all Key-Value Table in the given scope.
-
-
-
Method Detail
-
create
static KeyValueTableManager create(java.net.URI controller)
Creates a new instance ofKeyValueTableManager
.- Parameters:
controller
- The Controller URI.- Returns:
- An Instance of
KeyValueTableManager
implementation.
-
create
static KeyValueTableManager create(ClientConfig config)
Creates a new instance ofKeyValueTableManager
.- Parameters:
config
- Configuration for the client connection to Pravega.- Returns:
- An Instance of
KeyValueTableManager
implementation.
-
createKeyValueTable
boolean createKeyValueTable(java.lang.String scopeName, java.lang.String keyValueTableName, KeyValueTableConfiguration config)
Creates a new Key-Value Table.Note: This method is idempotent assuming called with the same name and config. This method may block.
- 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
boolean deleteKeyValueTable(java.lang.String scopeName, java.lang.String keyValueTableName)
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.- 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
java.util.Iterator<KeyValueTableInfo> listKeyValueTables(java.lang.String scopeName)
Gets an iterator for all Key-Value Table in the given scope.- 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.
-
close
void close()
Closes theKeyValueTableManager
.- Specified by:
close
in interfacejava.lang.AutoCloseable
- See Also:
AutoCloseable.close()
-
-