Package io.permazen.core
Class SchemaBundle.Encoded
java.lang.Object
io.permazen.core.SchemaBundle.Encoded
- Enclosing class:
- SchemaBundle
-
Constructor Summary
ConstructorDescriptionEncoded
(SchemaBundle.Encoded original) Copy constructor.Encoded
(NavigableMap<Integer, byte[]> schemaBytes, NavigableMap<Integer, byte[]> storageIdBytes) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
NavigableMap<Integer,
byte[]> Get the encoded schema table.NavigableMap<Integer,
byte[]> Get the encoded storage ID table.int
hashCode()
static SchemaBundle.Encoded
Read encodedSchemaBundle
data from the given key/value store.toString()
void
Rewrite the schema and storage ID tables in the given key/value store with the contents of this instance.
-
Constructor Details
-
Encoded
Copy constructor.This performs a deep copy of the
byte[]
arrays in the original.- Parameters:
original
- instance to copy- Throws:
IllegalArgumentException
- iforiginal
is null
-
Method Details
-
getSchemaBytes
Get the encoded schema table.- Returns:
- encoded table mapping schema index to
SchemaModel
-
getStorageIdBytes
Get the encoded storage ID table.- Returns:
- encoded table mapping storage ID to
SchemaId
-
readFrom
Read encodedSchemaBundle
data from the given key/value store.- Parameters:
kv
- key/value store- Throws:
IllegalArgumentException
- ifkv
is nullInconsistentDatabaseException
- if data is invalid
-
writeTo
Rewrite the schema and storage ID tables in the given key/value store with the contents of this instance.- Parameters:
kv
- key/value store- Throws:
IllegalArgumentException
- ifkv
is null
-
hashCode
public int hashCode() -
equals
-
toString
-