Skip to content

Commit

Permalink
perfect KvStorage doc (alibaba#5112)
Browse files Browse the repository at this point in the history
  • Loading branch information
haoyann committed Mar 16, 2021
1 parent d70e9ef commit fd57e08
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enum KvType {
*
* @param keys List byte[]
* @return Map byte[], byte[]
* @throws KvStorageException RocksStorageException
* @throws KvStorageException KvStorageException
*/
Map<byte[], byte[]> batchGet(List<byte[]> keys) throws KvStorageException;

Expand All @@ -69,34 +69,34 @@ enum KvType {
*
* @param key byte[]
* @param value byte[]
* @throws KvStorageException RocksStorageException
* @throws KvStorageException KvStorageException
*/
void put(byte[] key, byte[] value) throws KvStorageException;

/**
* batch write.
*
* @param key List byte[]
* @param keys List byte[]
* @param values List byte[]
* @throws KvStorageException RocksStorageException
* @throws KvStorageException KvStorageException
*/
void batchPut(List<byte[]> key, List<byte[]> values) throws KvStorageException;
void batchPut(List<byte[]> keys, List<byte[]> values) throws KvStorageException;

/**
* delete with key.
*
* @param key byte[]
* @throws KvStorageException RocksStorageException
* @throws KvStorageException KvStorageException
*/
void delete(byte[] key) throws KvStorageException;

/**
* batch delete with keys.
*
* @param key List byte[]
* @throws KvStorageException RocksStorageException
* @param keys List byte[]
* @throws KvStorageException KvStorageException
*/
void batchDelete(List<byte[]> key) throws KvStorageException;
void batchDelete(List<byte[]> keys) throws KvStorageException;

/**
* do snapshot.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public void delete(byte[] key) throws KvStorageException {
}

@Override
public void batchDelete(List<byte[]> key) throws KvStorageException {
for (byte[] each : key) {
public void batchDelete(List<byte[]> keys) throws KvStorageException {
for (byte[] each : keys) {
delete(each);
}
}
Expand Down

0 comments on commit fd57e08

Please sign in to comment.