public class BookkeeperSchemaStorage extends Object implements org.apache.pulsar.common.protocol.schema.SchemaStorage
| Modifier and Type | Method and Description |
|---|---|
static Exception |
bkException(String operation,
int rc,
long ledgerId,
long entryId) |
void |
close() |
CompletableFuture<org.apache.pulsar.common.protocol.schema.SchemaVersion> |
delete(String key) |
CompletableFuture<org.apache.pulsar.common.protocol.schema.SchemaVersion> |
delete(String key,
boolean forcefully) |
CompletableFuture<org.apache.pulsar.common.protocol.schema.StoredSchema> |
get(String key,
org.apache.pulsar.common.protocol.schema.SchemaVersion version) |
CompletableFuture<List<CompletableFuture<org.apache.pulsar.common.protocol.schema.StoredSchema>>> |
getAll(String key) |
List<Long> |
getSchemaLedgerList(String key) |
CompletableFuture<List<Long>> |
getStoreLedgerIdsBySchemaId(String schemaId) |
static <T> CompletableFuture<T> |
ignoreUnrecoverableBKException(CompletableFuture<T> source) |
CompletableFuture<org.apache.pulsar.common.protocol.schema.SchemaVersion> |
put(String key,
byte[] value,
byte[] hash) |
void |
start() |
org.apache.pulsar.common.protocol.schema.SchemaVersion |
versionFromBytes(byte[] version) |
public void start()
throws IOException
start in interface org.apache.pulsar.common.protocol.schema.SchemaStorageIOExceptionpublic CompletableFuture<org.apache.pulsar.common.protocol.schema.SchemaVersion> put(String key, byte[] value, byte[] hash)
put in interface org.apache.pulsar.common.protocol.schema.SchemaStoragepublic CompletableFuture<org.apache.pulsar.common.protocol.schema.StoredSchema> get(String key, org.apache.pulsar.common.protocol.schema.SchemaVersion version)
get in interface org.apache.pulsar.common.protocol.schema.SchemaStoragepublic CompletableFuture<List<CompletableFuture<org.apache.pulsar.common.protocol.schema.StoredSchema>>> getAll(String key)
getAll in interface org.apache.pulsar.common.protocol.schema.SchemaStoragepublic List<Long> getSchemaLedgerList(String key) throws IOException
IOExceptionpublic CompletableFuture<org.apache.pulsar.common.protocol.schema.SchemaVersion> delete(String key, boolean forcefully)
delete in interface org.apache.pulsar.common.protocol.schema.SchemaStoragepublic CompletableFuture<org.apache.pulsar.common.protocol.schema.SchemaVersion> delete(String key)
delete in interface org.apache.pulsar.common.protocol.schema.SchemaStoragepublic org.apache.pulsar.common.protocol.schema.SchemaVersion versionFromBytes(byte[] version)
versionFromBytes in interface org.apache.pulsar.common.protocol.schema.SchemaStoragepublic void close()
throws Exception
close in interface org.apache.pulsar.common.protocol.schema.SchemaStorageExceptionpublic CompletableFuture<List<Long>> getStoreLedgerIdsBySchemaId(String schemaId)
public static Exception bkException(String operation, int rc, long ledgerId, long entryId)
public static <T> CompletableFuture<T> ignoreUnrecoverableBKException(CompletableFuture<T> source)
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.