Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Javadoc for DistributedStorageAdmin #309

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,41 @@
import java.util.Map;
import java.util.Set;

/** An administrative interface for distributed storage implementations. */
/**
* An administrative interface for distributed storage implementations. The user can execute
* administrative operations with it like createNamespace/createTable/getTableMetadata.
*
* <h3>Usage Examples</h3>
*
* Here is a simple example to demonstrate how to use it. (Exception handling is omitted for
* readability.)
*
* <pre>{@code
* StorageFactory factory = new StorageFactory(databaseConfig);
* DistributedStorageAdmin admin = factory.getAdmin();
*
* // Create a namespace
* admin.createNamespace(NAMESPACE);
*
* // Create a table
* TableMetadata tableMetadata = TableMetadata.newBuilder()
* ...
* .build();
* admin.createTable(NAMESPACE, TABLE, tableMetadata);
*
* // Get a table metadata
* tableMetadata = admin.getTableMetadata(NAMESPACE, TABLE);
*
* // Truncate a table
* admin.truncateTable(NAMESPACE, TABLE);
*
* // Drop a table
* admin.dropTable(NAMESPACE, TABLE);
*
* // Drop a namespace
* admin.dropNamespace(NAMESPACE);
* }</pre>
*/
public interface DistributedStorageAdmin {

String INDEX_NAME_PREFIX = "index";
Expand Down