Interface SchemaStorage
-
public interface SchemaStorageSchema storage.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()java.util.concurrent.CompletableFuture<SchemaVersion>delete(java.lang.String key)java.util.concurrent.CompletableFuture<SchemaVersion>delete(java.lang.String key, boolean forcefully)java.util.concurrent.CompletableFuture<StoredSchema>get(java.lang.String key, SchemaVersion version)java.util.concurrent.CompletableFuture<java.util.List<java.util.concurrent.CompletableFuture<StoredSchema>>>getAll(java.lang.String key)java.util.concurrent.CompletableFuture<SchemaVersion>put(java.lang.String key, byte[] value, byte[] hash)default java.util.concurrent.CompletableFuture<SchemaVersion>put(java.lang.String key, java.util.function.Function<java.util.concurrent.CompletableFuture<java.util.List<java.util.concurrent.CompletableFuture<StoredSchema>>>,java.util.concurrent.CompletableFuture<org.apache.commons.lang3.tuple.Pair<byte[],byte[]>>> fn)Put the schema to the schema storage.voidstart()SchemaVersionversionFromBytes(byte[] version)
-
-
-
Method Detail
-
put
java.util.concurrent.CompletableFuture<SchemaVersion> put(java.lang.String key, byte[] value, byte[] hash)
-
put
default java.util.concurrent.CompletableFuture<SchemaVersion> put(java.lang.String key, java.util.function.Function<java.util.concurrent.CompletableFuture<java.util.List<java.util.concurrent.CompletableFuture<StoredSchema>>>,java.util.concurrent.CompletableFuture<org.apache.commons.lang3.tuple.Pair<byte[],byte[]>>> fn)
Put the schema to the schema storage.- Parameters:
key- The schema IDfn- The function to calculate the value and hash that need to put to the schema storage The input of the function is all the existing schemas that used to do the schemas compatibility check- Returns:
- The schema version of the stored schema
-
get
java.util.concurrent.CompletableFuture<StoredSchema> get(java.lang.String key, SchemaVersion version)
-
getAll
java.util.concurrent.CompletableFuture<java.util.List<java.util.concurrent.CompletableFuture<StoredSchema>>> getAll(java.lang.String key)
-
delete
java.util.concurrent.CompletableFuture<SchemaVersion> delete(java.lang.String key, boolean forcefully)
-
delete
java.util.concurrent.CompletableFuture<SchemaVersion> delete(java.lang.String key)
-
versionFromBytes
SchemaVersion versionFromBytes(byte[] version)
-
start
void start() throws java.lang.Exception- Throws:
java.lang.Exception
-
close
void close() throws java.lang.Exception- Throws:
java.lang.Exception
-
-