io.permazen.jsck.SimpleFieldIndex Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of permazen-jsck Show documentation
Show all versions of permazen-jsck Show documentation
Permazen analog to UNIX fsck(8) command for checking the consistency of, and repairing any corruption in, a Permazen key/value database
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package io.permazen.jsck;
import io.permazen.core.ObjId;
import io.permazen.schema.SimpleSchemaField;
import io.permazen.util.ByteReader;
class SimpleFieldIndex extends SimpleIndex {
SimpleFieldIndex(JsckInfo info, int schemaVersion, SimpleSchemaField field) {
super(info, schemaVersion, field);
}
@Override
protected void validateIndexEntrySuffix(JsckInfo info, ByteReader reader, byte[] indexValue, ObjId id) {
// No additional info
this.validateEOF(reader);
// Validate field value in object
if (info.getConfig().isRepair())
this.validateSimpleObjectField(info, id, this.storageId, this.type, indexValue);
}
// Object
@Override
public String toString() {
return "index on simple field #" + this.storageId + " having " + this.type;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy