|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.kernel.impl.nioneo.store.RecordStore.Processor
org.neo4j.backup.check.ConsistencyCheck
public abstract class ConsistencyCheck
Finds inconsistency in a Neo4j store.
Warning: will not find "dangling" records, i.e. records that are correct but
not referenced.
Warning: will only find multiple references to the same property chain or
dynamic record chain for incremental checks (if the stores
are diff stores). Also, this checking is very
incomplete.
| Constructor Summary | |
|---|---|
ConsistencyCheck(StoreAccess stores)
Creates a standard checker. |
|
ConsistencyCheck(StoreAccess stores,
boolean checkPropertyOwners)
Creates a standard checker or a checker that validates property owners. |
|
| Method Summary | ||
|---|---|---|
void |
checkResult()
Check if any inconsistencies was found by the checker. |
|
Iterator<RecordStore<?>> |
iterator()
|
|
static void |
main(String... args)
Run a full consistency check on the specified store. |
|
void |
processArray(RecordStore<DynamicRecord> store,
DynamicRecord array)
|
|
void |
processNode(RecordStore<NodeRecord> store,
NodeRecord node)
|
|
void |
processProperty(RecordStore<PropertyRecord> store,
PropertyRecord property)
|
|
void |
processPropertyIndex(RecordStore<PropertyIndexRecord> store,
PropertyIndexRecord index)
|
|
void |
processRelationship(RecordStore<RelationshipRecord> store,
RelationshipRecord rel)
|
|
void |
processRelationshipType(RecordStore<RelationshipTypeRecord> store,
RelationshipTypeRecord type)
|
|
void |
processString(RecordStore<DynamicRecord> store,
DynamicRecord string)
|
|
protected abstract
|
report(RecordStore<R> recordStore,
R record,
InconsistencyType inconsistency)
Report an internal inconsistency in a single record. |
|
protected abstract
|
report(RecordStore<R1> recordStore,
R1 record,
RecordStore<? extends R2> referredStore,
R2 referred,
InconsistencyType inconsistency)
Report an inconsistency between two records. |
|
void |
run()
|
|
static void |
run(StoreAccess stores,
boolean propowner)
|
|
| Methods inherited from class org.neo4j.kernel.impl.nioneo.store.RecordStore.Processor |
|---|
applyById, applyFiltered, applyFiltered, processDynamic, processRecord, progressInit, scan, scanById |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConsistencyCheck(StoreAccess stores)
stores - the stores to check.
public ConsistencyCheck(StoreAccess stores,
boolean checkPropertyOwners)
stores - the stores to check.checkPropertyOwners - if true ownership validation will
be performed.| Method Detail |
|---|
public static void main(String... args)
args - The arguments to the checker, the first is taken as the path
to the store to check.
public static void run(StoreAccess stores,
boolean propowner)
public Iterator<RecordStore<?>> iterator()
iterator in interface Iterable<RecordStore<?>>public void run()
run in interface Runnable
public void checkResult()
throws AssertionError
AssertionError summarizing the number of inconsistencies will be
thrown.
AssertionError - if any inconsistencies were found.
public void processNode(RecordStore<NodeRecord> store,
NodeRecord node)
processNode in class RecordStore.Processor
public void processRelationship(RecordStore<RelationshipRecord> store,
RelationshipRecord rel)
processRelationship in class RecordStore.Processor
public void processProperty(RecordStore<PropertyRecord> store,
PropertyRecord property)
processProperty in class RecordStore.Processor
public void processString(RecordStore<DynamicRecord> store,
DynamicRecord string)
processString in class RecordStore.Processor
public void processArray(RecordStore<DynamicRecord> store,
DynamicRecord array)
processArray in class RecordStore.Processor
public void processRelationshipType(RecordStore<RelationshipTypeRecord> store,
RelationshipTypeRecord type)
processRelationshipType in class RecordStore.Processor
public void processPropertyIndex(RecordStore<PropertyIndexRecord> store,
PropertyIndexRecord index)
processPropertyIndex in class RecordStore.Processor
protected abstract <R1 extends AbstractBaseRecord,R2 extends AbstractBaseRecord> void report(RecordStore<R1> recordStore,
R1 record,
RecordStore<? extends R2> referredStore,
R2 referred,
InconsistencyType inconsistency)
recordStore - the store containing the record found to be inconsistent.record - the record found to be inconsistent.referredStore - the store containing the record the inconsistent record references.referred - the record the inconsistent record references.inconsistency - a description of the inconsistency.
protected abstract <R extends AbstractBaseRecord> void report(RecordStore<R> recordStore,
R record,
InconsistencyType inconsistency)
recordStore - the store the inconsistent record is stored in.record - the inconsistent record.inconsistency - a description of the inconsistency.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||