Interface SchemaStorage
public interface SchemaStorage
Schema storage.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
get
(String key, SchemaVersion version) default CompletableFuture<SchemaVersion>
put
(String key, Function<CompletableFuture<List<CompletableFuture<StoredSchema>>>, CompletableFuture<org.apache.commons.lang3.tuple.Pair<byte[], byte[]>>> fn) Put the schema to the schema storage.void
start()
versionFromBytes
(byte[] version)
-
Method Details
-
put
-
put
default CompletableFuture<SchemaVersion> put(String key, Function<CompletableFuture<List<CompletableFuture<StoredSchema>>>, 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
-
getAll
-
delete
-
delete
-
versionFromBytes
-
start
- Throws:
Exception
-
close
- Throws:
Exception
-