Unnamed: 0
int64 0
6.7k
| func
stringlengths 12
89.6k
| target
bool 2
classes | project
stringlengths 45
151
|
|---|---|---|---|
6,000
|
public interface Monitor<R>
{
public void updatedCurrentPeakSize( int currentPeakSize );
public void updatedTargetSize( int targetSize );
public void created( R resource );
public void acquired( R resource );
public void disposed( R resource );
public class Adapter<R> implements Monitor<R>
{
@Override
public void updatedCurrentPeakSize( int currentPeakSize )
{
}
@Override
public void updatedTargetSize( int targetSize )
{
}
@Override
public void created( R resource )
{
}
@Override
public void acquired( R resource )
{
}
@Override
public void disposed( R resource )
{
}
}
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_ResourcePool.java
|
6,001
|
public interface ResourceReleaser
{
public void release();
public static final ResourceReleaser NO_OP = new ResourceReleaser()
{
public void release()
{
// What it says on the box
}
};
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_ResourceReleaser.java
|
6,002
|
public interface Serializer
{
void write( ChannelBuffer buffer ) throws IOException;
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_Serializer.java
|
6,003
|
public interface Configuration
{
long getOldChannelThreshold();
int getMaxConcurrentTransactions();
int getChunkSize();
HostnamePort getServerAddress();
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_Server.java
|
6,004
|
public interface ServerInterface
{
void shutdown();
void awaitStarted();
}
| false
|
enterprise_com_src_test_java_org_neo4j_com_ServerInterface.java
|
6,005
|
public interface TxHandler
{
void accept( Triplet<String, Long, TxExtractor> tx, XaDataSource dataSource );
void done();
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_ServerUtil.java
|
6,006
|
public interface TargetCaller<T, R>
{
Response<R> call( T requestTarget, RequestContext context, ChannelBuffer input, ChannelBuffer target ) throws Exception;
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_TargetCaller.java
|
6,007
|
public interface TxChecksumVerifier
{
public static final TxChecksumVerifier ALWAYS_MATCH = new TxChecksumVerifier()
{
@Override
public void assertMatch( long txId, int masterId, long checksum )
{
}
};
public void assertMatch( long txId, int masterId, long checksum );
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_TxChecksumVerifier.java
|
6,008
|
public interface RequestMonitor
{
void beginRequest( Map<String, String> requestContext );
void endRequest( Throwable t );
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_monitor_RequestMonitor.java
|
6,009
|
public interface StoreCopyRequester
{
Response<?> copyStore(StoreWriter writer);
void done();
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_storecopy_RemoteStoreCopier.java
|
6,010
|
public interface StoreWriter
{
// "hasData" is an effect of the block format not supporting a zero length block
// whereas a neostore file may actually be 0 bytes we'll have to keep track
// of that special case.
int write( String path, ReadableByteChannel data, ByteBuffer temporaryBuffer, boolean hasData )
throws IOException;
void done();
}
| false
|
enterprise_com_src_main_java_org_neo4j_com_storecopy_StoreWriter.java
|
6,011
|
public interface Dependencies
{
XaDataSourceManager getXaDataSourceManager();
}
| false
|
enterprise_com_src_test_java_org_neo4j_com_storecopy_ThirdPartyDSStoreCopyIT.java
|
6,012
|
public enum Result
{
FAILURE( false ), SUCCESS( true );
private boolean successful;
private Result( boolean successful )
{
this.successful = successful;
}
public boolean isSuccessful()
{
return this.successful;
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_ConsistencyCheckService.java
|
6,013
|
public enum RecordType
{
NEO_STORE, SCHEMA,
NODE,
PROPERTY,
PROPERTY_KEY,
PROPERTY_KEY_NAME,
STRING_PROPERTY,
ARRAY_PROPERTY,
RELATIONSHIP,
RELATIONSHIP_TYPE,
RELATIONSHIP_TYPE_NAME,
LABEL,
LABEL_NAME,
NODE_DYNAMIC_LABEL,
// Below are non-native records
LABEL_SCAN_DOCUMENT,
INDEX
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_RecordType.java
|
6,014
|
public interface CheckDecorator
{
RecordCheck<NeoStoreRecord, ConsistencyReport.NeoStoreConsistencyReport> decorateNeoStoreChecker(
PrimitiveRecordCheck<NeoStoreRecord, ConsistencyReport.NeoStoreConsistencyReport> checker );
RecordCheck<NodeRecord, ConsistencyReport.NodeConsistencyReport> decorateNodeChecker(
PrimitiveRecordCheck<NodeRecord, ConsistencyReport.NodeConsistencyReport> checker );
RecordCheck<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> decorateRelationshipChecker(
PrimitiveRecordCheck<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> checker );
RecordCheck<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> decoratePropertyChecker(
RecordCheck<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> checker );
RecordCheck<PropertyKeyTokenRecord, ConsistencyReport.PropertyKeyTokenConsistencyReport> decoratePropertyKeyTokenChecker(
RecordCheck<PropertyKeyTokenRecord, ConsistencyReport.PropertyKeyTokenConsistencyReport> checker );
RecordCheck<RelationshipTypeTokenRecord, ConsistencyReport.RelationshipTypeConsistencyReport> decorateRelationshipTypeTokenChecker(
RecordCheck<RelationshipTypeTokenRecord, ConsistencyReport.RelationshipTypeConsistencyReport> checker );
RecordCheck<LabelTokenRecord, ConsistencyReport.LabelTokenConsistencyReport> decorateLabelTokenChecker(
RecordCheck<LabelTokenRecord, ConsistencyReport.LabelTokenConsistencyReport> checker );
RecordCheck<NodeRecord, ConsistencyReport.LabelsMatchReport> decorateLabelMatchChecker(
RecordCheck<NodeRecord, ConsistencyReport.LabelsMatchReport> checker );
static CheckDecorator NONE = new CheckDecorator()
{
@Override
public RecordCheck<NeoStoreRecord, ConsistencyReport.NeoStoreConsistencyReport> decorateNeoStoreChecker(
PrimitiveRecordCheck<NeoStoreRecord, ConsistencyReport.NeoStoreConsistencyReport> checker )
{
return checker;
}
@Override
public RecordCheck<NodeRecord, ConsistencyReport.NodeConsistencyReport> decorateNodeChecker(
PrimitiveRecordCheck<NodeRecord, ConsistencyReport.NodeConsistencyReport> checker )
{
return checker;
}
@Override
public RecordCheck<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> decorateRelationshipChecker(
PrimitiveRecordCheck<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> checker )
{
return checker;
}
@Override
public RecordCheck<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> decoratePropertyChecker(
RecordCheck<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> checker )
{
return checker;
}
@Override
public RecordCheck<PropertyKeyTokenRecord, ConsistencyReport.PropertyKeyTokenConsistencyReport> decoratePropertyKeyTokenChecker(
RecordCheck<PropertyKeyTokenRecord, ConsistencyReport.PropertyKeyTokenConsistencyReport> checker )
{
return checker;
}
@Override
public RecordCheck<RelationshipTypeTokenRecord, ConsistencyReport.RelationshipTypeConsistencyReport> decorateRelationshipTypeTokenChecker(
RecordCheck<RelationshipTypeTokenRecord, ConsistencyReport.RelationshipTypeConsistencyReport> checker )
{
return checker;
}
@Override
public RecordCheck<LabelTokenRecord, ConsistencyReport.LabelTokenConsistencyReport> decorateLabelTokenChecker(
RecordCheck<LabelTokenRecord, ConsistencyReport.LabelTokenConsistencyReport> checker )
{
return checker;
}
@Override
public RecordCheck<NodeRecord, ConsistencyReport.LabelsMatchReport> decorateLabelMatchChecker(
RecordCheck<NodeRecord, ConsistencyReport.LabelsMatchReport> checker )
{
return checker;
}
};
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_CheckDecorator.java
|
6,015
|
public interface CheckerEngine<RECORD extends AbstractBaseRecord, REPORT extends ConsistencyReport>
{
<REFERRED extends AbstractBaseRecord> void comparativeCheck(
RecordReference<REFERRED> other, ComparativeRecordChecker<RECORD, ? super REFERRED, REPORT> checker );
REPORT report();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_CheckerEngine.java
|
6,016
|
public interface ComparativeRecordChecker<RECORD extends AbstractBaseRecord, REFERRED extends AbstractBaseRecord, REPORT extends ConsistencyReport>
{
void checkReference( RECORD record, REFERRED referred, CheckerEngine<RECORD, REPORT> engine, RecordAccess records );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_ComparativeRecordChecker.java
|
6,017
|
public enum DynamicStore
{
SCHEMA( RecordType.SCHEMA )
{
@Override
RecordReference<DynamicRecord> lookup( RecordAccess records, long block )
{
return records.schema( block );
}
@Override
DynamicRecord changed( DiffRecordAccess records, long id )
{
return records.changedSchema( id );
}
},
STRING( RecordType.STRING_PROPERTY )
{
@Override
RecordReference<DynamicRecord> lookup( RecordAccess records, long block )
{
return records.string( block );
}
@Override
DynamicRecord changed( DiffRecordAccess records, long id )
{
return records.changedString( id );
}
},
ARRAY( RecordType.ARRAY_PROPERTY )
{
@Override
RecordReference<DynamicRecord> lookup( RecordAccess records, long block )
{
return records.array( block );
}
@Override
DynamicRecord changed( DiffRecordAccess records, long id )
{
return records.changedArray( id );
}
},
PROPERTY_KEY( RecordType.PROPERTY_KEY_NAME )
{
@Override
RecordReference<DynamicRecord> lookup( RecordAccess records, long block )
{
return records.propertyKeyName( (int) block );
}
@Override
DynamicRecord changed( DiffRecordAccess records, long id )
{
return null; // never needed
}
},
RELATIONSHIP_TYPE( RecordType.RELATIONSHIP_TYPE_NAME )
{
@Override
RecordReference<DynamicRecord> lookup( RecordAccess records, long block )
{
return records.relationshipTypeName( (int) block );
}
@Override
DynamicRecord changed( DiffRecordAccess records, long id )
{
return null; // never needed
}
},
LABEL( RecordType.LABEL_NAME )
{
@Override
RecordReference<DynamicRecord> lookup( RecordAccess records, long block )
{
return records.labelName( (int) block );
}
@Override
DynamicRecord changed( DiffRecordAccess records, long id )
{
return null; // never needed
}
},
NODE_LABEL( RecordType.NODE_DYNAMIC_LABEL )
{
@Override
RecordReference<DynamicRecord> lookup( RecordAccess records, long block )
{
return records.nodeLabels( block );
}
@Override
DynamicRecord changed( DiffRecordAccess records, long id )
{
return null; // never needed (?)
}
};
public final RecordType type;
private DynamicStore( RecordType type )
{
this.type = type;
}
abstract RecordReference<DynamicRecord> lookup(RecordAccess records, long block);
abstract DynamicRecord changed( DiffRecordAccess records, long id );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_DynamicStore.java
|
6,018
|
public interface Validator<RECORD extends AbstractBaseRecord, REPORT extends ConsistencyReport>
{
void onRecordNotInUse( DynamicRecord dynamicRecord, CheckerEngine<RECORD, REPORT> engine );
void onRecordChainCycle( DynamicRecord record, CheckerEngine<RECORD, REPORT> engine );
void onWellFormedChain( long[] labelIds, CheckerEngine<RECORD, REPORT> engine, RecordAccess records );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_LabelChainWalker.java
|
6,019
|
enum NodeField implements
RecordField<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport>,
ComparativeRecordChecker<RelationshipRecord, NodeRecord, ConsistencyReport.RelationshipConsistencyReport>
{
SOURCE
{
@Override
public long valueFrom( RelationshipRecord relationship )
{
return relationship.getFirstNode();
}
@Override
public long prev( RelationshipRecord relationship )
{
return relationship.getFirstPrevRel();
}
@Override
public long next( RelationshipRecord relationship )
{
return relationship.getFirstNextRel();
}
@Override
void illegalNode( ConsistencyReport.RelationshipConsistencyReport report )
{
report.illegalSourceNode();
}
@Override
void nodeNotInUse( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node )
{
report.sourceNodeNotInUse( node );
}
@Override
void noBackReference( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node )
{
report.sourceNodeDoesNotReferenceBack( node );
}
@Override
void noChain( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node )
{
report.sourceNodeHasNoRelationships( node );
}
@Override
void notFirstInChain( ConsistencyReport.NodeConsistencyReport report, RelationshipRecord relationship )
{
report.relationshipNotFirstInSourceChain( relationship );
}
@Override
void notUpdated( ConsistencyReport.RelationshipConsistencyReport report )
{
report.sourceNodeNotUpdated();
}
},
TARGET
{
@Override
public long valueFrom( RelationshipRecord relationship )
{
return relationship.getSecondNode();
}
@Override
public long prev( RelationshipRecord relationship )
{
return relationship.getSecondPrevRel();
}
@Override
public long next( RelationshipRecord relationship )
{
return relationship.getSecondNextRel();
}
@Override
void illegalNode( ConsistencyReport.RelationshipConsistencyReport report )
{
report.illegalTargetNode();
}
@Override
void nodeNotInUse( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node )
{
report.targetNodeNotInUse( node );
}
@Override
void noBackReference( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node )
{
report.targetNodeDoesNotReferenceBack( node );
}
@Override
void noChain( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node )
{
report.targetNodeHasNoRelationships( node );
}
@Override
void notFirstInChain( ConsistencyReport.NodeConsistencyReport report, RelationshipRecord relationship )
{
report.relationshipNotFirstInTargetChain( relationship );
}
@Override
void notUpdated( ConsistencyReport.RelationshipConsistencyReport report )
{
report.targetNodeNotUpdated();
}
};
@Override
public abstract long valueFrom( RelationshipRecord relationship );
public static NodeField select( RelationshipRecord relationship, NodeRecord node )
{
return select( relationship, node.getId() );
}
public static NodeField select( RelationshipRecord relationship, long nodeId )
{
if ( relationship.getFirstNode() == nodeId )
{
return SOURCE;
}
else if ( relationship.getSecondNode() == nodeId )
{
return TARGET;
}
else
{
return null;
}
}
public abstract long prev( RelationshipRecord relationship );
public abstract long next( RelationshipRecord relationship );
@Override
public void checkConsistency( RelationshipRecord relationship,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
RecordAccess records )
{
if ( valueFrom( relationship ) < 0 )
{
illegalNode( engine.report() );
}
else
{
engine.comparativeCheck( records.node( valueFrom( relationship ) ), this );
}
}
@Override
public void checkReference( RelationshipRecord relationship, NodeRecord node,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
RecordAccess records )
{
if ( !node.inUse() )
{
nodeNotInUse( engine.report(), node );
}
else
{
if ( Record.NO_PREV_RELATIONSHIP.is( prev( relationship ) ) )
{
if ( node.getNextRel() != relationship.getId() )
{
noBackReference( engine.report(), node );
}
}
else
{
if ( Record.NO_NEXT_RELATIONSHIP.is( node.getNextRel() ) )
{
noChain( engine.report(), node );
}
}
}
}
@Override
public void checkChange( RelationshipRecord oldRecord, RelationshipRecord newRecord,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
DiffRecordAccess records )
{
if ( Record.NO_PREV_RELATIONSHIP.is( prev( oldRecord ) ) )
{
if ( !newRecord.inUse()
|| valueFrom( oldRecord ) != valueFrom( newRecord )
|| prev( oldRecord ) != prev( newRecord ) )
{
if ( records.changedNode( valueFrom( oldRecord ) ) == null )
{
notUpdated( engine.report() );
}
}
}
}
abstract void notUpdated( ConsistencyReport.RelationshipConsistencyReport report );
abstract void illegalNode( ConsistencyReport.RelationshipConsistencyReport report );
abstract void nodeNotInUse( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node );
abstract void noBackReference( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node );
abstract void noChain( ConsistencyReport.RelationshipConsistencyReport report, NodeRecord node );
abstract void notFirstInChain( ConsistencyReport.NodeConsistencyReport report, RelationshipRecord relationship );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_NodeField.java
|
6,020
|
private enum LabelsField implements RecordField<NodeRecord, ConsistencyReport.NodeConsistencyReport>,
ComparativeRecordChecker<NodeRecord, LabelTokenRecord, ConsistencyReport.NodeConsistencyReport>
{
LABELS
{
@Override
public void checkConsistency( NodeRecord node,
CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine,
RecordAccess records )
{
NodeLabels nodeLabels = NodeLabelsField.parseLabelsField( node );
if ( nodeLabels instanceof DynamicNodeLabels )
{
DynamicNodeLabels dynamicNodeLabels = (DynamicNodeLabels) nodeLabels;
long firstRecordId = dynamicNodeLabels.getFirstDynamicRecordId();
RecordReference<DynamicRecord> firstRecordReference = records.nodeLabels( firstRecordId );
engine.comparativeCheck( firstRecordReference,
new LabelChainWalker<NodeRecord, ConsistencyReport.NodeConsistencyReport>(
new NodeLabelsComparativeRecordChecker() ) );
}
else
{
validateLabelIds( nodeLabels.get( null ), engine, records );
}
}
private void validateLabelIds( long[] labelIds,
CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine,
RecordAccess records )
{
for ( long labelId : labelIds )
{
engine.comparativeCheck( records.label( (int) labelId ), this );
}
sort( labelIds );
for ( int i = 1; i < labelIds.length; i++ )
{
if ( labelIds[i - 1] == labelIds[i] )
{
engine.report().labelDuplicate( labelIds[i] );
}
}
}
@Override
public void checkReference( NodeRecord node, LabelTokenRecord labelTokenRecord,
CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine,
RecordAccess records )
{
if ( !labelTokenRecord.inUse() )
{
engine.report().labelNotInUse( labelTokenRecord );
}
}
@Override
public void checkChange( NodeRecord oldRecord, NodeRecord newRecord,
CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine,
DiffRecordAccess records )
{
// nothing to check: no back references from labels to nodes
}
@Override
public long valueFrom( NodeRecord record )
{
return record.getLabelField();
}
class NodeLabelsComparativeRecordChecker implements
LabelChainWalker.Validator<NodeRecord, ConsistencyReport.NodeConsistencyReport>
{
@Override
public void onRecordNotInUse( DynamicRecord dynamicRecord, CheckerEngine<NodeRecord,
ConsistencyReport.NodeConsistencyReport> engine )
{
engine.report().dynamicLabelRecordNotInUse( dynamicRecord );
}
@Override
public void onRecordChainCycle( DynamicRecord record, CheckerEngine<NodeRecord, ConsistencyReport
.NodeConsistencyReport> engine )
{
engine.report().dynamicRecordChainCycle( record );
}
@Override
public void onWellFormedChain( long[] labelIds, CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine, RecordAccess records )
{
validateLabelIds( labelIds, engine, records );
}
}
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_NodeRecordCheck.java
|
6,021
|
private enum RelationshipField implements RecordField<NodeRecord, ConsistencyReport.NodeConsistencyReport>,
ComparativeRecordChecker<NodeRecord, RelationshipRecord, ConsistencyReport.NodeConsistencyReport>
{
NEXT_REL
{
@Override
public void checkConsistency( NodeRecord node,
CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine,
RecordAccess records )
{
if ( !Record.NO_NEXT_RELATIONSHIP.is( node.getNextRel() ) )
{
engine.comparativeCheck( records.relationship( node.getNextRel() ), this );
}
}
@Override
public void checkReference( NodeRecord node, RelationshipRecord relationship,
CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine,
RecordAccess records )
{
if ( !relationship.inUse() )
{
engine.report().relationshipNotInUse( relationship );
}
else
{
NodeField selectedField = NodeField.select( relationship, node );
if ( selectedField == null )
{
engine.report().relationshipForOtherNode( relationship );
}
else
{
NodeField[] fields;
if ( relationship.getFirstNode() == relationship.getSecondNode() )
{ // this relationship is a loop, report both inconsistencies
fields = NodeField.values();
}
else
{
fields = new NodeField[]{selectedField};
}
for ( NodeField field : fields )
{
if ( !Record.NO_NEXT_RELATIONSHIP.is( field.prev( relationship ) ) )
{
field.notFirstInChain( engine.report(), relationship );
}
}
}
}
}
@Override
public void checkChange( NodeRecord oldRecord, NodeRecord newRecord,
CheckerEngine<NodeRecord, ConsistencyReport.NodeConsistencyReport> engine,
DiffRecordAccess records )
{
if ( !newRecord.inUse() || valueFrom( oldRecord ) != valueFrom( newRecord ) )
{
if ( !Record.NO_NEXT_RELATIONSHIP.is( valueFrom( oldRecord ) )
&& records.changedRelationship( valueFrom( oldRecord ) ) == null )
{
engine.report().relationshipNotUpdated();
}
}
}
@Override
public long valueFrom( NodeRecord record )
{
return record.getNextRel();
}
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_NodeRecordCheck.java
|
6,022
|
enum OwnerChain
implements ComparativeRecordChecker<PropertyRecord, PropertyRecord, ConsistencyReport.PropertyConsistencyReport>
{
OLD
{
@Override
RecordReference<PropertyRecord> property( DiffRecordAccess records, long id )
{
return records.previousProperty( id );
}
@Override
RecordReference<NodeRecord> node( DiffRecordAccess records, long id )
{
return records.previousNode( id );
}
@Override
RecordReference<RelationshipRecord> relationship( DiffRecordAccess records, long id )
{
return records.previousRelationship( id );
}
@Override
RecordReference<NeoStoreRecord> graph( DiffRecordAccess records )
{
return records.previousGraph();
}
@Override
void wrongOwner( ConsistencyReport.PropertyConsistencyReport report )
{
report.changedForWrongOwner();
}
},
NEW
{
@Override
RecordReference<PropertyRecord> property( DiffRecordAccess records, long id )
{
return records.property( id );
}
@Override
RecordReference<NodeRecord> node( DiffRecordAccess records, long id )
{
return records.node( id );
}
@Override
RecordReference<RelationshipRecord> relationship( DiffRecordAccess records, long id )
{
return records.relationship( id );
}
@Override
RecordReference<NeoStoreRecord> graph( DiffRecordAccess records )
{
return records.graph();
}
@Override
void wrongOwner( ConsistencyReport.PropertyConsistencyReport report )
{
report.ownerDoesNotReferenceBack();
}
};
private final ComparativeRecordChecker<PropertyRecord, PrimitiveRecord, ConsistencyReport.PropertyConsistencyReport>
OWNER_CHECK =
new ComparativeRecordChecker<PropertyRecord, PrimitiveRecord, ConsistencyReport.PropertyConsistencyReport>()
{
@Override
public void checkReference( PropertyRecord record, PrimitiveRecord owner,
CheckerEngine<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> engine,
RecordAccess records )
{
if ( !owner.inUse() || Record.NO_NEXT_PROPERTY.is( owner.getNextProp() ) )
{
wrongOwner( engine.report() );
}
else if ( owner.getNextProp() != record.getId() )
{
engine.comparativeCheck( property( (DiffRecordAccess) records, owner.getNextProp() ),
OwnerChain.this );
}
}
};
@Override
public void checkReference( PropertyRecord record, PropertyRecord property,
CheckerEngine<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> engine,
RecordAccess records )
{
if ( record.getId() != property.getId() )
{
if ( !property.inUse() || Record.NO_NEXT_PROPERTY.is( property.getNextProp() ) )
{
wrongOwner( engine.report() );
}
else if ( property.getNextProp() != record.getId() )
{
engine.comparativeCheck( property( (DiffRecordAccess) records, property.getNextProp() ), this );
}
}
}
void check( PropertyRecord record,
CheckerEngine<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> engine,
DiffRecordAccess records )
{
engine.comparativeCheck( ownerOf( record, records ), OWNER_CHECK );
}
private RecordReference<? extends PrimitiveRecord> ownerOf( PropertyRecord record, DiffRecordAccess records )
{
if ( record.getNodeId() != -1 )
{
return node( records, record.getNodeId() );
}
else if ( record.getRelId() != -1 )
{
return relationship( records, record.getRelId() );
}
else
{
return graph( records );
}
}
abstract RecordReference<PropertyRecord> property( DiffRecordAccess records, long id );
abstract RecordReference<NodeRecord> node( DiffRecordAccess records, long id );
abstract RecordReference<RelationshipRecord> relationship( DiffRecordAccess records, long id );
abstract RecordReference<NeoStoreRecord> graph( DiffRecordAccess records );
abstract void wrongOwner( ConsistencyReport.PropertyConsistencyReport report );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_OwnerChain.java
|
6,023
|
private enum PropertyField implements
RecordField<PropertyRecord, ConsistencyReport.PropertyConsistencyReport>,
ComparativeRecordChecker<PropertyRecord, PropertyRecord, ConsistencyReport.PropertyConsistencyReport>
{
PREV( Record.NO_PREVIOUS_PROPERTY )
{
@Override
public long valueFrom( PropertyRecord record )
{
return record.getPrevProp();
}
@Override
long otherReference( PropertyRecord record )
{
return record.getNextProp();
}
@Override
void notInUse( ConsistencyReport.PropertyConsistencyReport report, PropertyRecord property )
{
report.prevNotInUse( property );
}
@Override
void noBackReference( ConsistencyReport.PropertyConsistencyReport report, PropertyRecord property )
{
report.previousDoesNotReferenceBack( property );
}
@Override
void reportNotUpdated( ConsistencyReport.PropertyConsistencyReport report )
{
report.prevNotUpdated();
}
},
NEXT( Record.NO_NEXT_PROPERTY )
{
@Override
public long valueFrom( PropertyRecord record )
{
return record.getNextProp();
}
@Override
long otherReference( PropertyRecord record )
{
return record.getPrevProp();
}
@Override
void notInUse( ConsistencyReport.PropertyConsistencyReport report, PropertyRecord property )
{
report.nextNotInUse( property );
}
@Override
void noBackReference( ConsistencyReport.PropertyConsistencyReport report, PropertyRecord property )
{
report.nextDoesNotReferenceBack( property );
}
@Override
void reportNotUpdated( ConsistencyReport.PropertyConsistencyReport report )
{
report.nextNotUpdated();
}
};
private final Record NONE;
private PropertyField( Record none )
{
this.NONE = none;
}
abstract long otherReference( PropertyRecord record );
@Override
public void checkConsistency( PropertyRecord record,
CheckerEngine<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> engine,
RecordAccess records )
{
if ( !NONE.is( valueFrom( record ) ) )
{
engine.comparativeCheck( records.property( valueFrom( record ) ), this );
}
}
@Override
public void checkReference( PropertyRecord record, PropertyRecord referred,
CheckerEngine<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> engine,
RecordAccess records )
{
if ( !referred.inUse() )
{
notInUse( engine.report(), referred );
}
else
{
if ( otherReference( referred ) != record.getId() )
{
noBackReference( engine.report(), referred );
}
}
}
@Override
public void checkChange( PropertyRecord oldRecord, PropertyRecord newRecord,
CheckerEngine<PropertyRecord, ConsistencyReport.PropertyConsistencyReport> engine,
DiffRecordAccess records )
{
if ( !newRecord.inUse() || valueFrom( oldRecord ) != valueFrom( newRecord ) )
{
if ( !NONE.is( valueFrom( oldRecord ) )
&& records.changedProperty( valueFrom( oldRecord ) ) == null )
{
reportNotUpdated( engine.report() );
}
}
}
abstract void reportNotUpdated( ConsistencyReport.PropertyConsistencyReport report );
abstract void notInUse( ConsistencyReport.PropertyConsistencyReport report, PropertyRecord property );
abstract void noBackReference( ConsistencyReport.PropertyConsistencyReport report, PropertyRecord property );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_PropertyRecordCheck.java
|
6,024
|
public interface RecordCheck<RECORD extends AbstractBaseRecord, REPORT extends ConsistencyReport>
{
void check( RECORD record, CheckerEngine<RECORD, REPORT> engine, RecordAccess records );
void checkChange( RECORD oldRecord, RECORD newRecord, CheckerEngine<RECORD, REPORT> engine,
DiffRecordAccess records );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_RecordCheck.java
|
6,025
|
interface RecordField<RECORD extends AbstractBaseRecord, REPORT extends ConsistencyReport>
{
void checkConsistency( RECORD record, CheckerEngine<RECORD, REPORT> engine, RecordAccess records );
long valueFrom( RECORD record );
void checkChange( RECORD oldRecord, RECORD newRecord, CheckerEngine<RECORD, REPORT> engine,
DiffRecordAccess records );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_RecordField.java
|
6,026
|
private enum RelationshipField implements
RecordField<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport>,
ComparativeRecordChecker<RelationshipRecord, RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport>
{
SOURCE_PREV( NodeField.SOURCE, Record.NO_PREV_RELATIONSHIP )
{
@Override
public long valueFrom( RelationshipRecord relationship )
{
return relationship.getFirstPrevRel();
}
@Override
long other( NodeField field, RelationshipRecord relationship )
{
return field.next( relationship );
}
@Override
void otherNode( ConsistencyReport.RelationshipConsistencyReport report, RelationshipRecord relationship )
{
report.sourcePrevReferencesOtherNodes( relationship );
}
@Override
void noBackReference( ConsistencyReport.RelationshipConsistencyReport report,
RelationshipRecord relationship )
{
report.sourcePrevDoesNotReferenceBack( relationship );
}
@Override
void notUpdated( ConsistencyReport.RelationshipConsistencyReport report )
{
report.sourcePrevNotUpdated();
}
},
SOURCE_NEXT( NodeField.SOURCE, Record.NO_NEXT_RELATIONSHIP )
{
@Override
public long valueFrom( RelationshipRecord relationship )
{
return relationship.getFirstNextRel();
}
@Override
long other( NodeField field, RelationshipRecord relationship )
{
return field.prev( relationship );
}
@Override
void otherNode( ConsistencyReport.RelationshipConsistencyReport report, RelationshipRecord relationship )
{
report.sourceNextReferencesOtherNodes( relationship );
}
@Override
void noBackReference( ConsistencyReport.RelationshipConsistencyReport report,
RelationshipRecord relationship )
{
report.sourceNextDoesNotReferenceBack( relationship );
}
@Override
void notUpdated( ConsistencyReport.RelationshipConsistencyReport report )
{
report.sourceNextNotUpdated();
}
},
TARGET_PREV( NodeField.TARGET, Record.NO_PREV_RELATIONSHIP )
{
@Override
public long valueFrom( RelationshipRecord relationship )
{
return relationship.getSecondPrevRel();
}
@Override
long other( NodeField field, RelationshipRecord relationship )
{
return field.next( relationship );
}
@Override
void otherNode( ConsistencyReport.RelationshipConsistencyReport report, RelationshipRecord relationship )
{
report.targetPrevReferencesOtherNodes( relationship );
}
@Override
void noBackReference( ConsistencyReport.RelationshipConsistencyReport report,
RelationshipRecord relationship )
{
report.targetPrevDoesNotReferenceBack( relationship );
}
@Override
void notUpdated( ConsistencyReport.RelationshipConsistencyReport report )
{
report.targetPrevNotUpdated();
}
},
TARGET_NEXT( NodeField.TARGET, Record.NO_NEXT_RELATIONSHIP )
{
@Override
public long valueFrom( RelationshipRecord relationship )
{
return relationship.getSecondNextRel();
}
@Override
long other( NodeField field, RelationshipRecord relationship )
{
return field.prev( relationship );
}
@Override
void otherNode( ConsistencyReport.RelationshipConsistencyReport report, RelationshipRecord relationship )
{
report.targetNextReferencesOtherNodes( relationship );
}
@Override
void noBackReference( ConsistencyReport.RelationshipConsistencyReport report,
RelationshipRecord relationship )
{
report.targetNextDoesNotReferenceBack( relationship );
}
@Override
void notUpdated( ConsistencyReport.RelationshipConsistencyReport report )
{
report.targetNextNotUpdated();
}
};
private final NodeField NODE;
private final Record NONE;
private RelationshipField( NodeField node, Record none )
{
this.NODE = node;
this.NONE = none;
}
@Override
public void checkConsistency( RelationshipRecord relationship,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
RecordAccess records )
{
if ( !NONE.is( valueFrom( relationship ) ) )
{
engine.comparativeCheck( records.relationship( valueFrom( relationship ) ), this );
}
}
@Override
public void checkReference( RelationshipRecord record, RelationshipRecord referred,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
RecordAccess records )
{
NodeField field = NodeField.select( referred, node( record ) );
if ( field == null )
{
otherNode( engine.report(), referred );
}
else
{
if ( other( field, referred ) != record.getId() )
{
noBackReference( engine.report(), referred );
}
}
}
@Override
public void checkChange( RelationshipRecord oldRecord, RelationshipRecord newRecord,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
DiffRecordAccess records )
{
if ( !newRecord.inUse() || valueFrom( oldRecord ) != valueFrom( newRecord ) )
{
if ( !NONE.is( valueFrom( oldRecord ) )
&& records.changedRelationship( valueFrom( oldRecord ) ) == null )
{
notUpdated( engine.report() );
}
}
}
abstract void notUpdated( ConsistencyReport.RelationshipConsistencyReport report );
abstract long other( NodeField field, RelationshipRecord relationship );
abstract void otherNode( ConsistencyReport.RelationshipConsistencyReport report,
RelationshipRecord relationship );
abstract void noBackReference( ConsistencyReport.RelationshipConsistencyReport report,
RelationshipRecord relationship );
private long node( RelationshipRecord relationship )
{
return NODE.valueFrom( relationship );
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_RelationshipRecordCheck.java
|
6,027
|
private enum RelationshipTypeField implements
RecordField<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport>,
ComparativeRecordChecker<RelationshipRecord, RelationshipTypeTokenRecord, ConsistencyReport.RelationshipConsistencyReport>
{
RELATIONSHIP_TYPE;
@Override
public void checkConsistency( RelationshipRecord record,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
RecordAccess records )
{
if ( record.getType() < 0 )
{
engine.report().illegalRelationshipType();
}
else
{
engine.comparativeCheck( records.relationshipType( record.getType() ), this );
}
}
@Override
public long valueFrom( RelationshipRecord record )
{
return record.getType();
}
@Override
public void checkChange( RelationshipRecord oldRecord, RelationshipRecord newRecord,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
DiffRecordAccess records )
{
// nothing to check
}
@Override
public void checkReference( RelationshipRecord record, RelationshipTypeTokenRecord referred,
CheckerEngine<RelationshipRecord, ConsistencyReport.RelationshipConsistencyReport> engine,
RecordAccess records )
{
if ( !referred.inUse() )
{
engine.report().relationshipTypeNotInUse( referred );
}
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_RelationshipRecordCheck.java
|
6,028
|
enum Phase
{
/**
* Verify rules can be de-serialized, have valid forward references, and build up internal state
* for checking in back references in later phases (obligations)
*/
CHECK_RULES,
/** Verify obligations, that is correct back references */
CHECK_OBLIGATIONS
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_SchemaRecordCheck.java
|
6,029
|
public enum MultiPassStore
{
NODES
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getNodeStore();
}
},
RELATIONSHIPS
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getRelationshipStore();
}
},
PROPERTIES
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getPropertyStore();
}
},
STRINGS
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getNodeStore();
}
},
ARRAYS
{
@Override
RecordStore getRecordStore( StoreAccess storeAccess )
{
return storeAccess.getNodeStore();
}
};
public static boolean recordInCurrentPass( long id, int iPass, long recordsPerPass )
{
return id >= iPass * recordsPerPass && id < (iPass + 1) * recordsPerPass;
}
public List<DiffRecordAccess> multiPassFilters( long memoryPerPass, StoreAccess storeAccess,
DiffRecordAccess recordAccess, MultiPassStore[] stores )
{
ArrayList<DiffRecordAccess> filteringStores = new ArrayList<DiffRecordAccess>();
RecordStore recordStore = getRecordStore( storeAccess );
long recordsPerPass = memoryPerPass / recordStore.getRecordSize();
long highId = recordStore.getHighId();
for ( int iPass = 0; iPass * recordsPerPass <= highId; iPass++ )
{
filteringStores.add( new FilteringRecordAccess( recordAccess, iPass, recordsPerPass, this, stores ) );
}
return filteringStores;
}
abstract RecordStore getRecordStore( StoreAccess storeAccess );
static class Factory
{
private final CheckDecorator decorator;
private final DiffRecordAccess recordAccess;
private final long totalMappedMemory;
private final StoreAccess storeAccess;
private final InconsistencyReport report;
Factory( CheckDecorator decorator, long totalMappedMemory,
StoreAccess storeAccess, DiffRecordAccess recordAccess, InconsistencyReport report )
{
this.decorator = decorator;
this.totalMappedMemory = totalMappedMemory;
this.storeAccess = storeAccess;
this.recordAccess = recordAccess;
this.report = report;
}
ConsistencyReporter[] reporters( TaskExecutionOrder order, MultiPassStore... stores )
{
if ( order == TaskExecutionOrder.MULTI_PASS )
{
return reporters( stores );
}
else
{
return new ConsistencyReporter[]{new ConsistencyReporter( recordAccess, report )};
}
}
ConsistencyReporter[] reporters( MultiPassStore... stores )
{
List<ConsistencyReporter> result = new ArrayList<>();
for ( MultiPassStore store : stores )
{
List<DiffRecordAccess> filters = store.multiPassFilters( totalMappedMemory, storeAccess,
recordAccess, stores );
for ( DiffRecordAccess filter : filters )
{
result.add( new ConsistencyReporter( filter, report ) );
}
}
return result.toArray( new ConsistencyReporter[result.size()] );
}
StoreProcessor[] processors( MultiPassStore... stores )
{
List<StoreProcessor> result = new ArrayList<>();
for ( ConsistencyReporter reporter : reporters( stores ) )
{
result.add( new StoreProcessor( decorator, reporter ) );
}
return result.toArray( new StoreProcessor[result.size()] );
}
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_MultiPassStore.java
|
6,030
|
interface Engine extends CheckerEngine<LabelScanDocument, ConsistencyReport.LabelScanConsistencyReport>
{
}
| false
|
enterprise_consistency-check_src_test_java_org_neo4j_consistency_checking_full_NodeInUseWithCorrectLabelsCheckTest.java
|
6,031
|
interface Owner
{
void checkOrphanage();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_Owner.java
|
6,032
|
public interface RecordProcessor<RECORD>
{
void process( RECORD record );
void close();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_RecordProcessor.java
|
6,033
|
public interface StoppableRunnable extends Runnable
{
void stopScanning();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_StoppableRunnable.java
|
6,034
|
public enum TaskExecutionOrder
{
MULTI_THREADED
{
@Override
void execute( List<StoppableRunnable> tasks, Completion completion )
throws ConsistencyCheckIncompleteException
{
ExecutorService executor = Executors.newFixedThreadPool( Runtime.getRuntime().availableProcessors() );
for ( StoppableRunnable task : tasks )
{
executor.submit( task );
}
try
{
completion.await( 7, TimeUnit.DAYS );
}
catch ( Exception e )
{
tasks.get( 0 ).stopScanning();
throw new ConsistencyCheckIncompleteException( e );
}
finally
{
executor.shutdown();
try
{
executor.awaitTermination( 10, TimeUnit.SECONDS );
}
catch ( InterruptedException e )
{
// don't care
}
}
}
},
SINGLE_THREADED
{
@Override
void execute( List<StoppableRunnable> tasks, Completion completion )
throws ConsistencyCheckIncompleteException
{
try
{
for ( StoppableRunnable task : tasks )
{
task.run();
}
completion.await( 0, TimeUnit.SECONDS );
}
catch ( Exception e )
{
throw new ConsistencyCheckIncompleteException( e );
}
}
},
MULTI_PASS
{
@Override
void execute( List<StoppableRunnable> tasks, Completion completion )
throws ConsistencyCheckIncompleteException
{
try
{
for ( StoppableRunnable task : tasks )
{
task.run();
}
completion.await( 0, TimeUnit.SECONDS );
}
catch ( Exception e )
{
throw new ConsistencyCheckIncompleteException( e );
}
}
};
abstract void execute( List<StoppableRunnable> tasks, Completion completion )
throws ConsistencyCheckIncompleteException;
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_full_TaskExecutionOrder.java
|
6,035
|
public enum CheckerMode
{
FULL
{
@Override
DiffCheck createChecker( StringLogger logger )
{
return new FullDiffCheck( logger );
}
},
DIFF
{
@Override
DiffCheck createChecker( StringLogger logger )
{
return new IncrementalDiffCheck( logger );
}
};
abstract DiffCheck createChecker( StringLogger logger );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_checking_incremental_intercept_InconsistencyLoggingTransactionInterceptorProvider.java
|
6,036
|
public enum RelationshipChainDirection
{
NEXT( RelationshipChainField.FIRST_NEXT, RelationshipChainField.SECOND_NEXT ),
PREV( RelationshipChainField.FIRST_PREV, RelationshipChainField.SECOND_PREV );
private final RelationshipChainField first;
private final RelationshipChainField second;
RelationshipChainDirection( RelationshipChainField first, RelationshipChainField second )
{
this.first = first;
this.second = second;
}
public RelationshipChainField fieldFor( long nodeId, RelationshipRecord rel )
{
if (rel.getFirstNode() == nodeId)
{
return first;
}
else if (rel.getSecondNode() == nodeId)
{
return second;
}
throw new IllegalArgumentException( format( "%s does not reference node %d", rel, nodeId ) );
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_repair_RelationshipChainDirection.java
|
6,037
|
enum TestRelationshipType implements RelationshipType
{
CONNECTED
}
| false
|
enterprise_consistency-check_src_test_java_org_neo4j_consistency_repair_RelationshipChainExplorerTest.java
|
6,038
|
@SuppressWarnings( "boxing" )
public enum RelationshipChainField
{
FIRST_NEXT( Record.NO_NEXT_RELATIONSHIP )
{
@Override
public long relOf( RelationshipRecord rel )
{
return rel.getFirstNextRel();
}
},
FIRST_PREV( Record.NO_PREV_RELATIONSHIP )
{
@Override
public long relOf( RelationshipRecord rel )
{
return rel.getFirstPrevRel();
}
},
SECOND_NEXT( Record.NO_NEXT_RELATIONSHIP )
{
@Override
public long relOf( RelationshipRecord rel )
{
return rel.getSecondNextRel();
}
},
SECOND_PREV( Record.NO_PREV_RELATIONSHIP )
{
@Override
public long relOf( RelationshipRecord rel )
{
return rel.getSecondPrevRel();
}
};
public final long none;
RelationshipChainField( Record none )
{
this.none = none.intValue();
}
public abstract long relOf( RelationshipRecord rel );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_repair_RelationshipChainField.java
|
6,039
|
public enum RelationshipNodeField
{
FIRST
{
@Override
public long get( RelationshipRecord rel )
{
return rel.getFirstNode();
}
},
SECOND
{
@Override
public long get( RelationshipRecord rel )
{
return rel.getSecondNode();
}
};
public abstract long get( RelationshipRecord rel );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_repair_RelationshipNodeField.java
|
6,040
|
public interface ConsistencyReport
{
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@interface Warning
{
}
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
@interface IncrementalOnly
{
}
public interface Reporter
{
void forSchema( DynamicRecord schema,
RecordCheck<DynamicRecord, SchemaConsistencyReport> checker );
void forSchemaChange( DynamicRecord oldSchema, DynamicRecord newSchema,
RecordCheck<DynamicRecord, SchemaConsistencyReport> checker );
void forNode( NodeRecord node,
RecordCheck<NodeRecord, NodeConsistencyReport> checker );
void forNodeChange( NodeRecord oldNode, NodeRecord newNode,
RecordCheck<NodeRecord, NodeConsistencyReport> checker );
void forRelationship( RelationshipRecord relationship,
RecordCheck<RelationshipRecord, RelationshipConsistencyReport> checker );
void forRelationshipChange( RelationshipRecord oldRelationship, RelationshipRecord newRelationship,
RecordCheck<RelationshipRecord, RelationshipConsistencyReport> checker );
void forProperty( PropertyRecord property,
RecordCheck<PropertyRecord, PropertyConsistencyReport> checker );
void forPropertyChange( PropertyRecord oldProperty, PropertyRecord newProperty,
RecordCheck<PropertyRecord, PropertyConsistencyReport> checker );
void forRelationshipTypeName( RelationshipTypeTokenRecord relationshipType,
RecordCheck<RelationshipTypeTokenRecord, RelationshipTypeConsistencyReport> checker );
void forRelationshipTypeNameChange( RelationshipTypeTokenRecord oldType, RelationshipTypeTokenRecord newType,
RecordCheck<RelationshipTypeTokenRecord, RelationshipTypeConsistencyReport> checker );
void forLabelName( LabelTokenRecord label,
RecordCheck<LabelTokenRecord, LabelTokenConsistencyReport> checker );
void forLabelNameChange( LabelTokenRecord oldLabel, LabelTokenRecord newLabel,
RecordCheck<LabelTokenRecord, LabelTokenConsistencyReport> checker );
void forPropertyKey( PropertyKeyTokenRecord key,
RecordCheck<PropertyKeyTokenRecord, PropertyKeyTokenConsistencyReport> checker );
void forPropertyKeyChange( PropertyKeyTokenRecord oldKey, PropertyKeyTokenRecord newKey,
RecordCheck<PropertyKeyTokenRecord, PropertyKeyTokenConsistencyReport> checker );
void forDynamicBlock( RecordType type, DynamicRecord record,
RecordCheck<DynamicRecord, DynamicConsistencyReport> checker );
void forDynamicBlockChange( RecordType type, DynamicRecord oldRecord, DynamicRecord newRecord,
RecordCheck<DynamicRecord, DynamicConsistencyReport> checker );
void forDynamicLabelBlock( RecordType type, DynamicRecord record,
RecordCheck<DynamicRecord, DynamicLabelConsistencyReport> checker );
void forDynamicLabelBlockChange( RecordType type, DynamicRecord oldRecord, DynamicRecord newRecord,
RecordCheck<DynamicRecord, DynamicLabelConsistencyReport> checker );
void forNodeLabelScan( LabelScanDocument document,
RecordCheck<LabelScanDocument, ConsistencyReport.LabelScanConsistencyReport> checker );
void forIndexEntry( IndexEntry entry,
RecordCheck<IndexEntry, ConsistencyReport.IndexConsistencyReport> checker );
void forNodeLabelMatch( NodeRecord nodeRecord, RecordCheck<NodeRecord, LabelsMatchReport> nodeLabelCheck );
}
interface PrimitiveConsistencyReport extends ConsistencyReport
{
/** The referenced property record is not in use. */
@Documented
void propertyNotInUse( PropertyRecord property );
/** The referenced property record is not the first in its property chain. */
@Documented
void propertyNotFirstInChain( PropertyRecord property );
/** The referenced property is owned by another Node. */
@Documented
void multipleOwners( NodeRecord node );
/** The referenced property is owned by another Relationship. */
@Documented
void multipleOwners( RelationshipRecord relationship );
/** The referenced property is owned by the neo store (graph global property). */
@Documented
void multipleOwners( NeoStoreRecord neoStore );
/** The first property record reference has changed, but the previous first property record has not been updated. */
@Documented
@IncrementalOnly
void propertyNotUpdated();
}
interface NeoStoreConsistencyReport extends PrimitiveConsistencyReport
{
}
interface SchemaConsistencyReport extends ConsistencyReport
{
/** The label token record referenced from the schema is not in use. */
@Documented
void labelNotInUse( LabelTokenRecord label );
/** The property key token record is not in use. */
@Documented
void propertyKeyNotInUse( PropertyKeyTokenRecord propertyKey );
/** The uniqueness constraint does not reference back to the given record */
@Documented
void uniquenessConstraintNotReferencingBack( DynamicRecord ruleRecord );
/** The constraint index does not reference back to the given record */
@Documented
void constraintIndexRuleNotReferencingBack( DynamicRecord ruleRecord );
/** This record is required to reference some other record of the given kind but no such obligation was found */
@Documented
void missingObligation( SchemaRule.Kind kind );
/**
* This record requires some other record to reference back to it but there already was such a
* conflicting obligation created by the record given as a parameter
*/
@Documented
void duplicateObligation( DynamicRecord record );
/**
* This record contains an index rule which has the same content as the index rule contained in the
* record given as parameter
*/
@Documented
void duplicateRuleContent( DynamicRecord record );
/** The schema rule contained in the DynamicRecord chain is malformed (not deserializable) */
@Documented
void malformedSchemaRule();
/** The schema rule contained in the DynamicRecord chain is of an unrecognized Kind */
@Documented
void unsupportedSchemaRuleKind( SchemaRule.Kind kind );
}
interface NodeConsistencyReport extends PrimitiveConsistencyReport
{
/** The referenced relationship record is not in use. */
@Documented
void relationshipNotInUse( RelationshipRecord referenced );
/** The referenced relationship record is a relationship between two other nodes. */
@Documented
void relationshipForOtherNode( RelationshipRecord relationship );
/** The referenced relationship record is not the first in the relationship chain where this node is source. */
@Documented
void relationshipNotFirstInSourceChain( RelationshipRecord relationship );
/** The referenced relationship record is not the first in the relationship chain where this node is target. */
@Documented
void relationshipNotFirstInTargetChain( RelationshipRecord relationship );
/** The first relationship record reference has changed, but the previous first relationship record has not been updates. */
@Documented
@IncrementalOnly
void relationshipNotUpdated();
/** The label token record referenced from a node record is not in use. */
@Documented
void labelNotInUse( LabelTokenRecord label );
/** The label token record is referenced twice from the same node. */
@Documented
void labelDuplicate( long labelId );
/** The dynamic label record is not in use. */
@Documented
void dynamicLabelRecordNotInUse( DynamicRecord record );
/** This record points to a next record that was already part of this dynamic record chain. */
@Documented
void dynamicRecordChainCycle( DynamicRecord nextRecord );
/** This node was not found in the expected index. */
@Documented
void notIndexed( IndexRule index, Object propertyValue );
/** There is another node in the unique index with the same property value. */
@Documented
void uniqueIndexNotUnique( IndexRule index, Object propertyValue, long duplicateNodeId );
}
interface RelationshipConsistencyReport
extends PrimitiveConsistencyReport
{
/** The relationship type field has an illegal value. */
@Documented
void illegalRelationshipType();
/** The relationship type record is not in use. */
@Documented
void relationshipTypeNotInUse( RelationshipTypeTokenRecord relationshipType );
/** The source node field has an illegal value. */
@Documented
void illegalSourceNode();
/** The target node field has an illegal value. */
@Documented
void illegalTargetNode();
/** The source node is not in use. */
@Documented
void sourceNodeNotInUse( NodeRecord node );
/** The target node is not in use. */
@Documented
void targetNodeNotInUse( NodeRecord node );
/** This record should be the first in the source chain, but the source node does not reference this record. */
@Documented
void sourceNodeDoesNotReferenceBack( NodeRecord node );
/** This record should be the first in the target chain, but the target node does not reference this record. */
@Documented
void targetNodeDoesNotReferenceBack( NodeRecord node );
/** The source node does not have a relationship chain. */
@Documented
void sourceNodeHasNoRelationships( NodeRecord source );
/** The target node does not have a relationship chain. */
@Documented
void targetNodeHasNoRelationships( NodeRecord source );
/** The previous record in the source chain is a relationship between two other nodes. */
@Documented
void sourcePrevReferencesOtherNodes( RelationshipRecord relationship );
/** The next record in the source chain is a relationship between two other nodes. */
@Documented
void sourceNextReferencesOtherNodes( RelationshipRecord relationship );
/** The previous record in the target chain is a relationship between two other nodes. */
@Documented
void targetPrevReferencesOtherNodes( RelationshipRecord relationship );
/** The next record in the target chain is a relationship between two other nodes. */
@Documented
void targetNextReferencesOtherNodes( RelationshipRecord relationship );
/** The previous record in the source chain does not have this record as its next record. */
@Documented
void sourcePrevDoesNotReferenceBack( RelationshipRecord relationship );
/** The next record in the source chain does not have this record as its previous record. */
@Documented
void sourceNextDoesNotReferenceBack( RelationshipRecord relationship );
/** The previous record in the target chain does not have this record as its next record. */
@Documented
void targetPrevDoesNotReferenceBack( RelationshipRecord relationship );
/** The next record in the target chain does not have this record as its previous record. */
@Documented
void targetNextDoesNotReferenceBack( RelationshipRecord relationship );
/** The previous source relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void sourcePrevNotUpdated();
/** The next source relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void sourceNextNotUpdated();
/** The previous target relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void targetPrevNotUpdated();
/** The next target relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void targetNextNotUpdated();
/**
* This relationship was first in the chain for the source node, and isn't first anymore,
* but the source node was not updated.
*/
@Documented
@IncrementalOnly
void sourceNodeNotUpdated();
/**
* This relationship was first in the chain for the target node, and isn't first anymore,
* but the target node was not updated.
*/
@Documented
@IncrementalOnly
void targetNodeNotUpdated();
}
interface PropertyConsistencyReport extends ConsistencyReport
{
/** The property key as an invalid value. */
@Documented
void invalidPropertyKey( PropertyBlock block );
/** The key for this property is not in use. */
@Documented
void keyNotInUse( PropertyBlock block, PropertyKeyTokenRecord key );
/** The previous property record is not in use. */
@Documented
void prevNotInUse( PropertyRecord property );
/** The next property record is not in use. */
@Documented
void nextNotInUse( PropertyRecord property );
/** The previous property record does not have this record as its next record. */
@Documented
void previousDoesNotReferenceBack( PropertyRecord property );
/** The next property record does not have this record as its previous record. */
@Documented
void nextDoesNotReferenceBack( PropertyRecord property );
/** The type of this property is invalid. */
@Documented
void invalidPropertyType( PropertyBlock block );
/** The string block is not in use. */
@Documented
void stringNotInUse( PropertyBlock block, DynamicRecord value );
/** The array block is not in use. */
@Documented
void arrayNotInUse( PropertyBlock block, DynamicRecord value );
/** The string block is empty. */
@Documented
void stringEmpty( PropertyBlock block, DynamicRecord value );
/** The array block is empty. */
@Documented
void arrayEmpty( PropertyBlock block, DynamicRecord value );
/** The property value is invalid. */
@Documented
void invalidPropertyValue( PropertyBlock block );
/** This record is first in a property chain, but no Node or Relationship records reference this record. */
@Documented
void orphanPropertyChain();
/** The previous reference has changed, but the referenced record has not been updated. */
@Documented
@IncrementalOnly
void prevNotUpdated();
/** The next reference has changed, but the referenced record has not been updated. */
@Documented
@IncrementalOnly
void nextNotUpdated();
/** The string property is not referenced anymore, but the corresponding block has not been deleted. */
@Documented
@IncrementalOnly
void stringUnreferencedButNotDeleted( PropertyBlock block );
/** The array property is not referenced anymore, but the corresponding block as not been deleted. */
@Documented
@IncrementalOnly
void arrayUnreferencedButNotDeleted( PropertyBlock block );
/**
* This property was declared to be changed for a node or relationship, but that node or relationship does not
* contain this property in its property chain.
*/
@Documented
@IncrementalOnly
void ownerDoesNotReferenceBack();
/**
* This property was declared to be changed for a node or relationship, but that node or relationship did not
* contain this property in its property chain prior to the change. The property is referenced by another owner.
*/
@Documented
@IncrementalOnly
void changedForWrongOwner();
/** The string record referred from this property is also referred from a another property. */
@Documented
void stringMultipleOwners( PropertyRecord otherOwner );
/** The array record referred from this property is also referred from a another property. */
@Documented
void arrayMultipleOwners( PropertyRecord otherOwner );
/** The string record referred from this property is also referred from a another string record. */
@Documented
void stringMultipleOwners( DynamicRecord dynamic );
/** The array record referred from this property is also referred from a another array record. */
@Documented
void arrayMultipleOwners( DynamicRecord dynamic );
}
interface NameConsistencyReport extends ConsistencyReport
{
/** The name block is not in use. */
@Documented
void nameBlockNotInUse( DynamicRecord record );
/** The name is empty. */
@Documented
@Warning
void emptyName( DynamicRecord name );
/** The string record referred from this name record is also referred from a another string record. */
@Documented
void nameMultipleOwners( DynamicRecord otherOwner );
}
interface RelationshipTypeConsistencyReport extends NameConsistencyReport
{
/** The string record referred from this relationship type is also referred from a another relationship type. */
@Documented
void nameMultipleOwners( RelationshipTypeTokenRecord otherOwner );
}
interface LabelTokenConsistencyReport extends NameConsistencyReport
{
/** The string record referred from this label name is also referred from a another label name. */
@Documented
void nameMultipleOwners( LabelTokenRecord otherOwner );
}
interface PropertyKeyTokenConsistencyReport extends NameConsistencyReport
{
/** The string record referred from this key is also referred from a another key. */
@Documented
void nameMultipleOwners( PropertyKeyTokenRecord otherOwner );
}
interface DynamicConsistencyReport extends ConsistencyReport
{
/** The next block is not in use. */
@Documented
void nextNotInUse( DynamicRecord next );
/** The record is not full, but references a next block. */
@Documented
@Warning
void recordNotFullReferencesNext();
/** The length of the block is invalid. */
@Documented
void invalidLength();
/** The block is empty. */
@Documented
@Warning
void emptyBlock();
/** The next block is empty. */
@Documented
@Warning
void emptyNextBlock( DynamicRecord next );
/** The next block references this (the same) record. */
@Documented
void selfReferentialNext();
/** The next block reference was changed, but the previously referenced block was not updated. */
@Documented
@IncrementalOnly
void nextNotUpdated();
/** The next block of this record is also referenced by another dynamic record. */
@Documented
void nextMultipleOwners( DynamicRecord otherOwner );
/** The next block of this record is also referenced by a property record. */
@Documented
void nextMultipleOwners( PropertyRecord otherOwner );
/** The next block of this record is also referenced by a relationship type. */
@Documented
void nextMultipleOwners( RelationshipTypeTokenRecord otherOwner );
/** The next block of this record is also referenced by a property key. */
@Documented
void nextMultipleOwners( PropertyKeyTokenRecord otherOwner );
/** This record not referenced from any other dynamic block, or from any property or name record. */
@Documented
void orphanDynamicRecord();
}
interface DynamicLabelConsistencyReport extends ConsistencyReport
{
/** This label record is not referenced by its owning node record or that record is not in use. */
@Documented
void orphanDynamicLabelRecordDueToInvalidOwner( NodeRecord owningNodeRecord );
/** This label record does not have an owning node record. */
@Documented
void orphanDynamicLabelRecord();
}
interface NodeInUseWithCorrectLabelsReport extends ConsistencyReport
{
void nodeNotInUse( NodeRecord referredNodeRecord );
void nodeDoesNotHaveExpectedLabel( NodeRecord referredNodeRecord, long expectedLabelId );
}
interface LabelScanConsistencyReport extends NodeInUseWithCorrectLabelsReport
{
/** This label scan document refers to a node record that is not in use. */
@Override
@Documented
void nodeNotInUse( NodeRecord referredNodeRecord );
/** This label scan document refers to a node that does not have the expected label. */
@Override
@Documented
void nodeDoesNotHaveExpectedLabel( NodeRecord referredNodeRecord, long expectedLabelId );
}
interface IndexConsistencyReport extends NodeInUseWithCorrectLabelsReport
{
/** This index entry refers to a node record that is not in use. */
@Override
@Documented
void nodeNotInUse( NodeRecord referredNodeRecord );
/** This index entry refers to a node that does not have the expected label. */
@Override
@Documented
void nodeDoesNotHaveExpectedLabel( NodeRecord referredNodeRecord, long expectedLabelId );
}
interface LabelsMatchReport extends ConsistencyReport
{
/** This node record has a label that is not found in the label scan store entry for this node */
@Documented
void nodeLabelNotInIndex( NodeRecord referredNodeRecord, long missingLabelId );
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,041
|
interface DynamicConsistencyReport extends ConsistencyReport
{
/** The next block is not in use. */
@Documented
void nextNotInUse( DynamicRecord next );
/** The record is not full, but references a next block. */
@Documented
@Warning
void recordNotFullReferencesNext();
/** The length of the block is invalid. */
@Documented
void invalidLength();
/** The block is empty. */
@Documented
@Warning
void emptyBlock();
/** The next block is empty. */
@Documented
@Warning
void emptyNextBlock( DynamicRecord next );
/** The next block references this (the same) record. */
@Documented
void selfReferentialNext();
/** The next block reference was changed, but the previously referenced block was not updated. */
@Documented
@IncrementalOnly
void nextNotUpdated();
/** The next block of this record is also referenced by another dynamic record. */
@Documented
void nextMultipleOwners( DynamicRecord otherOwner );
/** The next block of this record is also referenced by a property record. */
@Documented
void nextMultipleOwners( PropertyRecord otherOwner );
/** The next block of this record is also referenced by a relationship type. */
@Documented
void nextMultipleOwners( RelationshipTypeTokenRecord otherOwner );
/** The next block of this record is also referenced by a property key. */
@Documented
void nextMultipleOwners( PropertyKeyTokenRecord otherOwner );
/** This record not referenced from any other dynamic block, or from any property or name record. */
@Documented
void orphanDynamicRecord();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,042
|
interface DynamicLabelConsistencyReport extends ConsistencyReport
{
/** This label record is not referenced by its owning node record or that record is not in use. */
@Documented
void orphanDynamicLabelRecordDueToInvalidOwner( NodeRecord owningNodeRecord );
/** This label record does not have an owning node record. */
@Documented
void orphanDynamicLabelRecord();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,043
|
@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
@interface IncrementalOnly
{
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,044
|
interface IndexConsistencyReport extends NodeInUseWithCorrectLabelsReport
{
/** This index entry refers to a node record that is not in use. */
@Override
@Documented
void nodeNotInUse( NodeRecord referredNodeRecord );
/** This index entry refers to a node that does not have the expected label. */
@Override
@Documented
void nodeDoesNotHaveExpectedLabel( NodeRecord referredNodeRecord, long expectedLabelId );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,045
|
interface LabelScanConsistencyReport extends NodeInUseWithCorrectLabelsReport
{
/** This label scan document refers to a node record that is not in use. */
@Override
@Documented
void nodeNotInUse( NodeRecord referredNodeRecord );
/** This label scan document refers to a node that does not have the expected label. */
@Override
@Documented
void nodeDoesNotHaveExpectedLabel( NodeRecord referredNodeRecord, long expectedLabelId );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,046
|
interface LabelTokenConsistencyReport extends NameConsistencyReport
{
/** The string record referred from this label name is also referred from a another label name. */
@Documented
void nameMultipleOwners( LabelTokenRecord otherOwner );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,047
|
interface LabelsMatchReport extends ConsistencyReport
{
/** This node record has a label that is not found in the label scan store entry for this node */
@Documented
void nodeLabelNotInIndex( NodeRecord referredNodeRecord, long missingLabelId );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,048
|
interface NameConsistencyReport extends ConsistencyReport
{
/** The name block is not in use. */
@Documented
void nameBlockNotInUse( DynamicRecord record );
/** The name is empty. */
@Documented
@Warning
void emptyName( DynamicRecord name );
/** The string record referred from this name record is also referred from a another string record. */
@Documented
void nameMultipleOwners( DynamicRecord otherOwner );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,049
|
interface NeoStoreConsistencyReport extends PrimitiveConsistencyReport
{
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,050
|
interface NodeConsistencyReport extends PrimitiveConsistencyReport
{
/** The referenced relationship record is not in use. */
@Documented
void relationshipNotInUse( RelationshipRecord referenced );
/** The referenced relationship record is a relationship between two other nodes. */
@Documented
void relationshipForOtherNode( RelationshipRecord relationship );
/** The referenced relationship record is not the first in the relationship chain where this node is source. */
@Documented
void relationshipNotFirstInSourceChain( RelationshipRecord relationship );
/** The referenced relationship record is not the first in the relationship chain where this node is target. */
@Documented
void relationshipNotFirstInTargetChain( RelationshipRecord relationship );
/** The first relationship record reference has changed, but the previous first relationship record has not been updates. */
@Documented
@IncrementalOnly
void relationshipNotUpdated();
/** The label token record referenced from a node record is not in use. */
@Documented
void labelNotInUse( LabelTokenRecord label );
/** The label token record is referenced twice from the same node. */
@Documented
void labelDuplicate( long labelId );
/** The dynamic label record is not in use. */
@Documented
void dynamicLabelRecordNotInUse( DynamicRecord record );
/** This record points to a next record that was already part of this dynamic record chain. */
@Documented
void dynamicRecordChainCycle( DynamicRecord nextRecord );
/** This node was not found in the expected index. */
@Documented
void notIndexed( IndexRule index, Object propertyValue );
/** There is another node in the unique index with the same property value. */
@Documented
void uniqueIndexNotUnique( IndexRule index, Object propertyValue, long duplicateNodeId );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,051
|
interface NodeInUseWithCorrectLabelsReport extends ConsistencyReport
{
void nodeNotInUse( NodeRecord referredNodeRecord );
void nodeDoesNotHaveExpectedLabel( NodeRecord referredNodeRecord, long expectedLabelId );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,052
|
interface PrimitiveConsistencyReport extends ConsistencyReport
{
/** The referenced property record is not in use. */
@Documented
void propertyNotInUse( PropertyRecord property );
/** The referenced property record is not the first in its property chain. */
@Documented
void propertyNotFirstInChain( PropertyRecord property );
/** The referenced property is owned by another Node. */
@Documented
void multipleOwners( NodeRecord node );
/** The referenced property is owned by another Relationship. */
@Documented
void multipleOwners( RelationshipRecord relationship );
/** The referenced property is owned by the neo store (graph global property). */
@Documented
void multipleOwners( NeoStoreRecord neoStore );
/** The first property record reference has changed, but the previous first property record has not been updated. */
@Documented
@IncrementalOnly
void propertyNotUpdated();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,053
|
interface PropertyConsistencyReport extends ConsistencyReport
{
/** The property key as an invalid value. */
@Documented
void invalidPropertyKey( PropertyBlock block );
/** The key for this property is not in use. */
@Documented
void keyNotInUse( PropertyBlock block, PropertyKeyTokenRecord key );
/** The previous property record is not in use. */
@Documented
void prevNotInUse( PropertyRecord property );
/** The next property record is not in use. */
@Documented
void nextNotInUse( PropertyRecord property );
/** The previous property record does not have this record as its next record. */
@Documented
void previousDoesNotReferenceBack( PropertyRecord property );
/** The next property record does not have this record as its previous record. */
@Documented
void nextDoesNotReferenceBack( PropertyRecord property );
/** The type of this property is invalid. */
@Documented
void invalidPropertyType( PropertyBlock block );
/** The string block is not in use. */
@Documented
void stringNotInUse( PropertyBlock block, DynamicRecord value );
/** The array block is not in use. */
@Documented
void arrayNotInUse( PropertyBlock block, DynamicRecord value );
/** The string block is empty. */
@Documented
void stringEmpty( PropertyBlock block, DynamicRecord value );
/** The array block is empty. */
@Documented
void arrayEmpty( PropertyBlock block, DynamicRecord value );
/** The property value is invalid. */
@Documented
void invalidPropertyValue( PropertyBlock block );
/** This record is first in a property chain, but no Node or Relationship records reference this record. */
@Documented
void orphanPropertyChain();
/** The previous reference has changed, but the referenced record has not been updated. */
@Documented
@IncrementalOnly
void prevNotUpdated();
/** The next reference has changed, but the referenced record has not been updated. */
@Documented
@IncrementalOnly
void nextNotUpdated();
/** The string property is not referenced anymore, but the corresponding block has not been deleted. */
@Documented
@IncrementalOnly
void stringUnreferencedButNotDeleted( PropertyBlock block );
/** The array property is not referenced anymore, but the corresponding block as not been deleted. */
@Documented
@IncrementalOnly
void arrayUnreferencedButNotDeleted( PropertyBlock block );
/**
* This property was declared to be changed for a node or relationship, but that node or relationship does not
* contain this property in its property chain.
*/
@Documented
@IncrementalOnly
void ownerDoesNotReferenceBack();
/**
* This property was declared to be changed for a node or relationship, but that node or relationship did not
* contain this property in its property chain prior to the change. The property is referenced by another owner.
*/
@Documented
@IncrementalOnly
void changedForWrongOwner();
/** The string record referred from this property is also referred from a another property. */
@Documented
void stringMultipleOwners( PropertyRecord otherOwner );
/** The array record referred from this property is also referred from a another property. */
@Documented
void arrayMultipleOwners( PropertyRecord otherOwner );
/** The string record referred from this property is also referred from a another string record. */
@Documented
void stringMultipleOwners( DynamicRecord dynamic );
/** The array record referred from this property is also referred from a another array record. */
@Documented
void arrayMultipleOwners( DynamicRecord dynamic );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,054
|
interface PropertyKeyTokenConsistencyReport extends NameConsistencyReport
{
/** The string record referred from this key is also referred from a another key. */
@Documented
void nameMultipleOwners( PropertyKeyTokenRecord otherOwner );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,055
|
interface RelationshipConsistencyReport
extends PrimitiveConsistencyReport
{
/** The relationship type field has an illegal value. */
@Documented
void illegalRelationshipType();
/** The relationship type record is not in use. */
@Documented
void relationshipTypeNotInUse( RelationshipTypeTokenRecord relationshipType );
/** The source node field has an illegal value. */
@Documented
void illegalSourceNode();
/** The target node field has an illegal value. */
@Documented
void illegalTargetNode();
/** The source node is not in use. */
@Documented
void sourceNodeNotInUse( NodeRecord node );
/** The target node is not in use. */
@Documented
void targetNodeNotInUse( NodeRecord node );
/** This record should be the first in the source chain, but the source node does not reference this record. */
@Documented
void sourceNodeDoesNotReferenceBack( NodeRecord node );
/** This record should be the first in the target chain, but the target node does not reference this record. */
@Documented
void targetNodeDoesNotReferenceBack( NodeRecord node );
/** The source node does not have a relationship chain. */
@Documented
void sourceNodeHasNoRelationships( NodeRecord source );
/** The target node does not have a relationship chain. */
@Documented
void targetNodeHasNoRelationships( NodeRecord source );
/** The previous record in the source chain is a relationship between two other nodes. */
@Documented
void sourcePrevReferencesOtherNodes( RelationshipRecord relationship );
/** The next record in the source chain is a relationship between two other nodes. */
@Documented
void sourceNextReferencesOtherNodes( RelationshipRecord relationship );
/** The previous record in the target chain is a relationship between two other nodes. */
@Documented
void targetPrevReferencesOtherNodes( RelationshipRecord relationship );
/** The next record in the target chain is a relationship between two other nodes. */
@Documented
void targetNextReferencesOtherNodes( RelationshipRecord relationship );
/** The previous record in the source chain does not have this record as its next record. */
@Documented
void sourcePrevDoesNotReferenceBack( RelationshipRecord relationship );
/** The next record in the source chain does not have this record as its previous record. */
@Documented
void sourceNextDoesNotReferenceBack( RelationshipRecord relationship );
/** The previous record in the target chain does not have this record as its next record. */
@Documented
void targetPrevDoesNotReferenceBack( RelationshipRecord relationship );
/** The next record in the target chain does not have this record as its previous record. */
@Documented
void targetNextDoesNotReferenceBack( RelationshipRecord relationship );
/** The previous source relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void sourcePrevNotUpdated();
/** The next source relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void sourceNextNotUpdated();
/** The previous target relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void targetPrevNotUpdated();
/** The next target relationship reference has changed, but the previously referenced record has not been updated. */
@Documented
@IncrementalOnly
void targetNextNotUpdated();
/**
* This relationship was first in the chain for the source node, and isn't first anymore,
* but the source node was not updated.
*/
@Documented
@IncrementalOnly
void sourceNodeNotUpdated();
/**
* This relationship was first in the chain for the target node, and isn't first anymore,
* but the target node was not updated.
*/
@Documented
@IncrementalOnly
void targetNodeNotUpdated();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,056
|
interface RelationshipTypeConsistencyReport extends NameConsistencyReport
{
/** The string record referred from this relationship type is also referred from a another relationship type. */
@Documented
void nameMultipleOwners( RelationshipTypeTokenRecord otherOwner );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,057
|
public interface Reporter
{
void forSchema( DynamicRecord schema,
RecordCheck<DynamicRecord, SchemaConsistencyReport> checker );
void forSchemaChange( DynamicRecord oldSchema, DynamicRecord newSchema,
RecordCheck<DynamicRecord, SchemaConsistencyReport> checker );
void forNode( NodeRecord node,
RecordCheck<NodeRecord, NodeConsistencyReport> checker );
void forNodeChange( NodeRecord oldNode, NodeRecord newNode,
RecordCheck<NodeRecord, NodeConsistencyReport> checker );
void forRelationship( RelationshipRecord relationship,
RecordCheck<RelationshipRecord, RelationshipConsistencyReport> checker );
void forRelationshipChange( RelationshipRecord oldRelationship, RelationshipRecord newRelationship,
RecordCheck<RelationshipRecord, RelationshipConsistencyReport> checker );
void forProperty( PropertyRecord property,
RecordCheck<PropertyRecord, PropertyConsistencyReport> checker );
void forPropertyChange( PropertyRecord oldProperty, PropertyRecord newProperty,
RecordCheck<PropertyRecord, PropertyConsistencyReport> checker );
void forRelationshipTypeName( RelationshipTypeTokenRecord relationshipType,
RecordCheck<RelationshipTypeTokenRecord, RelationshipTypeConsistencyReport> checker );
void forRelationshipTypeNameChange( RelationshipTypeTokenRecord oldType, RelationshipTypeTokenRecord newType,
RecordCheck<RelationshipTypeTokenRecord, RelationshipTypeConsistencyReport> checker );
void forLabelName( LabelTokenRecord label,
RecordCheck<LabelTokenRecord, LabelTokenConsistencyReport> checker );
void forLabelNameChange( LabelTokenRecord oldLabel, LabelTokenRecord newLabel,
RecordCheck<LabelTokenRecord, LabelTokenConsistencyReport> checker );
void forPropertyKey( PropertyKeyTokenRecord key,
RecordCheck<PropertyKeyTokenRecord, PropertyKeyTokenConsistencyReport> checker );
void forPropertyKeyChange( PropertyKeyTokenRecord oldKey, PropertyKeyTokenRecord newKey,
RecordCheck<PropertyKeyTokenRecord, PropertyKeyTokenConsistencyReport> checker );
void forDynamicBlock( RecordType type, DynamicRecord record,
RecordCheck<DynamicRecord, DynamicConsistencyReport> checker );
void forDynamicBlockChange( RecordType type, DynamicRecord oldRecord, DynamicRecord newRecord,
RecordCheck<DynamicRecord, DynamicConsistencyReport> checker );
void forDynamicLabelBlock( RecordType type, DynamicRecord record,
RecordCheck<DynamicRecord, DynamicLabelConsistencyReport> checker );
void forDynamicLabelBlockChange( RecordType type, DynamicRecord oldRecord, DynamicRecord newRecord,
RecordCheck<DynamicRecord, DynamicLabelConsistencyReport> checker );
void forNodeLabelScan( LabelScanDocument document,
RecordCheck<LabelScanDocument, ConsistencyReport.LabelScanConsistencyReport> checker );
void forIndexEntry( IndexEntry entry,
RecordCheck<IndexEntry, ConsistencyReport.IndexConsistencyReport> checker );
void forNodeLabelMatch( NodeRecord nodeRecord, RecordCheck<NodeRecord, LabelsMatchReport> nodeLabelCheck );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,058
|
interface SchemaConsistencyReport extends ConsistencyReport
{
/** The label token record referenced from the schema is not in use. */
@Documented
void labelNotInUse( LabelTokenRecord label );
/** The property key token record is not in use. */
@Documented
void propertyKeyNotInUse( PropertyKeyTokenRecord propertyKey );
/** The uniqueness constraint does not reference back to the given record */
@Documented
void uniquenessConstraintNotReferencingBack( DynamicRecord ruleRecord );
/** The constraint index does not reference back to the given record */
@Documented
void constraintIndexRuleNotReferencingBack( DynamicRecord ruleRecord );
/** This record is required to reference some other record of the given kind but no such obligation was found */
@Documented
void missingObligation( SchemaRule.Kind kind );
/**
* This record requires some other record to reference back to it but there already was such a
* conflicting obligation created by the record given as a parameter
*/
@Documented
void duplicateObligation( DynamicRecord record );
/**
* This record contains an index rule which has the same content as the index rule contained in the
* record given as parameter
*/
@Documented
void duplicateRuleContent( DynamicRecord record );
/** The schema rule contained in the DynamicRecord chain is malformed (not deserializable) */
@Documented
void malformedSchemaRule();
/** The schema rule contained in the DynamicRecord chain is of an unrecognized Kind */
@Documented
void unsupportedSchemaRuleKind( SchemaRule.Kind kind );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,059
|
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@interface Warning
{
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_ConsistencyReport.java
|
6,060
|
public interface InconsistencyLogger
{
void error( RecordType recordType, AbstractBaseRecord record, String message, Object[] args );
void error( RecordType recordType, AbstractBaseRecord oldRecord, AbstractBaseRecord newRecord, String message,
Object[] args );
void warning( RecordType recordType, AbstractBaseRecord record, String message, Object[] args );
void warning( RecordType recordType, AbstractBaseRecord oldRecord, AbstractBaseRecord newRecord, String message,
Object[] args );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_report_InconsistencyLogger.java
|
6,061
|
public interface DiffRecordAccess extends RecordAccess
{
RecordReference<NodeRecord> previousNode( long id );
RecordReference<RelationshipRecord> previousRelationship( long id );
RecordReference<PropertyRecord> previousProperty( long id );
RecordReference<NeoStoreRecord> previousGraph();
DynamicRecord changedSchema( long id );
NodeRecord changedNode( long id );
RelationshipRecord changedRelationship( long id );
PropertyRecord changedProperty( long id );
DynamicRecord changedString( long id );
DynamicRecord changedArray( long id );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_DiffRecordAccess.java
|
6,062
|
enum Mode
{
SKIP, FILTER
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_FilteringRecordAccess.java
|
6,063
|
public interface RecordAccess
{
RecordReference<DynamicRecord> schema( final long id );
RecordReference<NodeRecord> node( final long id );
RecordReference<RelationshipRecord> relationship( final long id );
RecordReference<PropertyRecord> property( final long id );
RecordReference<RelationshipTypeTokenRecord> relationshipType( final int id );
RecordReference<PropertyKeyTokenRecord> propertyKey( final int id );
RecordReference<DynamicRecord> string( final long id );
RecordReference<DynamicRecord> array( final long id );
RecordReference<DynamicRecord> relationshipTypeName( final int id );
RecordReference<DynamicRecord> nodeLabels( final long id );
RecordReference<LabelTokenRecord> label( final int id );
RecordReference<DynamicRecord> labelName( final int id );
RecordReference<DynamicRecord> propertyKeyName( final int id );
RecordReference<NeoStoreRecord> graph();
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_RecordAccess.java
|
6,064
|
private enum Version
{
PREV
{
@Override
<R extends AbstractBaseRecord> R get( Delta<R> delta )
{
return delta.oldRecord == null ? delta.newRecord : delta.oldRecord;
}
},
LATEST
{
@Override
<R extends AbstractBaseRecord> R get( Delta<R> delta )
{
return delta.newRecord;
}
},
NEW
{
@Override
<R extends AbstractBaseRecord> R get( Delta<R> delta )
{
return delta.oldRecord == null ? null : delta.newRecord;
}
};
abstract <R extends AbstractBaseRecord> R get( Delta<R> delta );
}
| false
|
enterprise_consistency-check_src_test_java_org_neo4j_consistency_store_RecordAccessStub.java
|
6,065
|
public interface RecordReference<RECORD extends AbstractBaseRecord>
{
void dispatch( PendingReferenceCheck<RECORD> reporter );
class SkippingReference<RECORD extends AbstractBaseRecord> implements RecordReference<RECORD>
{
@SuppressWarnings("unchecked")
public static <RECORD extends AbstractBaseRecord> SkippingReference<RECORD> skipReference()
{
return INSTANCE;
}
@Override
public void dispatch( PendingReferenceCheck<RECORD> reporter )
{
reporter.skip();
}
@Override
public String toString()
{
return "SkipReference";
}
private static final SkippingReference INSTANCE = new SkippingReference();
private SkippingReference()
{
// singleton
}
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_RecordReference.java
|
6,066
|
public interface PageReplacementStrategy
{
<PAYLOAD, PAGE extends Page<PAYLOAD>> PAYLOAD acquire( PAGE page, Storage<PAYLOAD, PAGE> storage )
throws PageLoadFailureException;
<PAYLOAD> void forceEvict( Page<PAYLOAD> page );
public interface Storage<PAYLOAD, PAGE extends Page<PAYLOAD>>
{
PAYLOAD load( PAGE page ) throws PageLoadFailureException;
}
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_paging_PageReplacementStrategy.java
|
6,067
|
public interface Storage<PAYLOAD, PAGE extends Page<PAYLOAD>>
{
PAYLOAD load( PAGE page ) throws PageLoadFailureException;
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_paging_PageReplacementStrategy.java
|
6,068
|
enum TemporalUtility
{
UNKNOWN,
SHORT_TERM,
LONG_TERM,
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_paging_TemporalUtility.java
|
6,069
|
public interface TemporalUtilityCounter
{
void increment( TemporalUtility utility );
void decrement( TemporalUtility utility );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_paging_TemporalUtilityCounter.java
|
6,070
|
public interface MappingStatisticsListener
{
void onStatistics( File storeFileName, int acquiredPages, int mappedPages, long samplePeriod );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_windowpool_MappingStatisticsListener.java
|
6,071
|
public enum WindowPoolImplementation
{
MOST_FREQUENTLY_USED
{
@Override
public WindowPoolFactory windowPoolFactory( Config config, StringLogger logger )
{
return new DefaultWindowPoolFactory();
}
},
SCAN_RESISTANT
{
@Override
public WindowPoolFactory windowPoolFactory( Config config, StringLogger logger )
{
return new ScanResistantWindowPoolFactory( config, logger );
}
};
public abstract WindowPoolFactory windowPoolFactory( Config config, StringLogger logger );
}
| false
|
enterprise_consistency-check_src_main_java_org_neo4j_consistency_store_windowpool_WindowPoolImplementation.java
|
6,072
|
public interface SubGraph
{
Iterable<Node> getNodes();
Iterable<Relationship> getRelationships();
boolean contains( Relationship relationship );
Iterable<IndexDefinition> getIndexes();
Iterable<ConstraintDefinition> getConstraints();
}
| false
|
community_cypher_cypher_src_main_java_org_neo4j_cypher_export_SubGraph.java
|
6,073
|
public interface PlanDescription
{
/**
* @return descriptive name for this kind of execution step
*/
public String getName();
/**
* Retrieve argument map for the associated execution step
*
* Valid arguments are all Java primitive values, Strings, Arrays of those, and Maps from Strings to
* valid arguments. Results are guaranteed to be trees (i.e. there are no cyclic dependencies among values)
*
* @return a map containing arguments that describe this execution step in more detail
*/
public Map<String, Object> getArguments();
/**
* Starting from this PlanDescription, retrieve children by successive calls to getChild() and
* return the final PlanDescription thus found
*
* @return PlanDescription of the final child retrieved
* @throws NoSuchElementException if no child could be retrieved
*/
public PlanDescription cd(String... names) throws NoSuchElementException;
/**
* @return first child PlanDescription found by searching all children that have the given name
* @throws java.util.NoSuchElementException if no matching child is found
*/
public PlanDescription getChild(String name) throws NoSuchElementException;
/**
* @return list of previous (child) execution step descriptions
*/
public List<PlanDescription> getChildren();
/**
* @return true, if ProfilerStatistics are available for this execution step
*/
public boolean hasProfilerStatistics();
/**
* @return profiler statistics for this execution step iff available
* @throws ProfilerStatisticsNotReadyException iff profiler statistics are not available
*/
public ProfilerStatistics getProfilerStatistics() throws ProfilerStatisticsNotReadyException;
}
| false
|
community_cypher_cypher-commons_src_main_java_org_neo4j_cypher_javacompat_PlanDescription.java
|
6,074
|
public interface ProfilerStatistics
{
/**
* @return PlanDescription for which these ProfilerStatistics have been collected
*/
PlanDescription getPlanDescription();
/**
* @return number of rows processed by the associated execution step
*/
long getRows();
/**
* @return number of database hits (potential disk accesses) caused by executing the associated execution step
*/
long getDbHits();
}
| false
|
community_cypher_cypher-commons_src_main_java_org_neo4j_cypher_javacompat_ProfilerStatistics.java
|
6,075
|
public interface Environment
{
void openBrowser( String url ) throws IOException, URISyntaxException;
void editFile( File file ) throws IOException;
void openDirectory( File directory ) throws IOException;
}
| false
|
packaging_neo4j-desktop_src_main_java_org_neo4j_desktop_config_Environment.java
|
6,076
|
public interface Installation
{
String NEO4J_PROPERTIES_FILENAME = "neo4j.properties";
String NEO4J_VMOPTIONS_FILENAME = "neo4j-community.vmoptions";
String NEO4J_SERVER_PROPERTIES_FILENAME = "neo4j-server.properties";
String DEFAULT_DATABASE_CONFIG_RESOURCE_NAME = "/org/neo4j/desktop/config/neo4j-default.properties";
String DEFAULT_SERVER_CONFIG_RESOURCE_NAME = "/org/neo4j/desktop/config/neo4j-server-default.properties";
String DEFAULT_VMOPTIONS_TEMPLATE_RESOURCE_NAME = "/org/neo4j/desktop/config/vmoptions.template";
String INSTALL_PROPERTIES_FILENAME = "install.properties";
/**
* Get a facade for interacting with the environment, such as opening file editors and browsing URLs.
*/
Environment getEnvironment();
/**
* Get the directory wherein the database will put its store files.
*/
File getDatabaseDirectory();
/**
* Get the directory where the configuration properties files are located.
*/
File getConfigurationDirectory();
/**
* Get the abstract path name that points to the neo4j-community.vmoptions file.
*/
File getVmOptionsFile();
/**
* Get the abstract path name that points to the neo4j-server.properties file.
*/
File getServerConfigurationsFile();
/**
* Initialize the installation, such that we make sure that the various configuration files
* exist where we expect them to.
*/
void initialize() throws Exception;
/**
* Get the abstract path name that points to the neo4j.properties database configuration file.
*/
File getDatabaseConfigurationFile();
/**
* Get the contents for a default neo4j-server.properties file.
*/
InputStream getDefaultServerConfiguration();
/**
* Get the contents for a default neo4j.properties file.
*/
InputStream getDefaultDatabaseConfiguration();
/**
* Get the contents for a default neo4j-community.vmoptions file.
*/
InputStream getDefaultVmOptions();
/**
* Get the directory where jar-files with plugins and extensions are located.
*/
File getPluginsDirectory();
/**
* Get the directory into which Neo4j Desktop has been installed.
*/
File getInstallationDirectory() throws URISyntaxException;
/**
* Get the directory where the neo4j-desktop.jar file has been installed into.
*/
File getInstallationBinDirectory() throws URISyntaxException;
}
| false
|
packaging_neo4j-desktop_src_main_java_org_neo4j_desktop_config_Installation.java
|
6,077
|
public enum OperatingSystemFamily
{
WINDOWS,
MAC_OS,
UNIX;
public static OperatingSystemFamily detect()
{
String osName = System.getProperty( "os.name" );
// Works according to: http://www.osgi.org/Specifications/Reference
if ( osName.startsWith( "Windows" ) )
{
return WINDOWS;
}
if ( osName.startsWith( "Mac OS" ) )
{
return MAC_OS;
}
return UNIX;
}
}
| false
|
packaging_neo4j-desktop_src_main_java_org_neo4j_desktop_config_OperatingSystemFamily.java
|
6,078
|
public enum DatabaseStatus
{
STOPPED,
STARTING,
STARTED,
STOPPING;
public static final Color STOPPED_COLOR = new Color( 1.0f, 0.5f, 0.5f );
public static final Color CHANGING_COLOR = new Color( 1.0f, 1.0f, 0.5f );
public static final Color STARTED_COLOR = new Color( 0.5f, 1.0f, 0.5f );
public Component display( DesktopModel model )
{
switch ( this )
{
case STOPPED:
return createTextStatusDisplay( STOPPED_COLOR, "Choose a graph database directory, " +
"then start the server" );
case STARTING:
return createTextStatusDisplay( CHANGING_COLOR, ellipsis( "In just a few seconds, Neo4j will be ready" ) );
case STARTED:
return createStartedStatusDisplay( model );
case STOPPING:
return createTextStatusDisplay( CHANGING_COLOR, ellipsis( "Neo4j is shutting down" ) );
default:
throw new IllegalStateException();
}
}
private static JPanel createTextStatusDisplay( Color color, String text )
{
return createStatusDisplay( color, new JLabel( text ) );
}
private static JPanel createStartedStatusDisplay( DesktopModel model )
{
final JLabel link = new JLabel( "http://localhost:7474/" );
model.register( new DesktopModelListener() {
@Override
public void desktopModelChanged(DesktopModel model) {
link.setText("http://localhost:" + model.getServerPort() + "/");
}
});
link.setFont( Components.underlined( link.getFont() ) );
link.addMouseListener( new OpenBrowserMouseListener( link, model ) );
return createStatusDisplay( STARTED_COLOR, new JLabel( "Neo4j is ready. Browse to " ), link );
}
private static JPanel createStatusDisplay( Color color, Component... components )
{
return withBackground( color, withLayout( new FlowLayout(), createPanel( components ) ) );
}
}
| false
|
packaging_neo4j-desktop_src_main_java_org_neo4j_desktop_ui_DatabaseStatus.java
|
6,079
|
public interface DesktopModelListener {
public void desktopModelChanged(DesktopModel model);
}
| false
|
packaging_neo4j-desktop_src_main_java_org_neo4j_desktop_ui_DesktopModelListener.java
|
6,080
|
public interface Actions
{
void clickCloseButton();
void clickSysTray();
void closeForReal();
}
| false
|
packaging_neo4j-desktop_src_main_java_org_neo4j_desktop_ui_SysTray.java
|
6,081
|
enum BlockType
{
TITLE
{
@Override
boolean isA( List<String> block )
{
int size = block.size();
return size > 0 && ( ( block.get( 0 )
.startsWith( "=" ) && !block.get( 0 )
.startsWith( "==" ) ) || size > 1 && block.get( 1 )
.startsWith( "=" ) );
}
@Override
String process( Block block, State state )
{
String title = block.lines.get( 0 )
.replace( "=", "" )
.trim();
String id = "cypherdoc-" + title.toLowerCase().replace( ' ', '-' );
return "[[" + id + "]]" + CypherDoc.EOL + "= " + title + " ="
+ CypherDoc.EOL;
}
},
HIDE
{
@Override
String process( Block block, State state )
{
return OutputHelper.passthroughMarker( "hide-query", "span", "simpara" );
}
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "hide" );
}
},
SETUP
{
@Override
String process( Block block, State state )
{
return OutputHelper.passthroughMarker( "setup-query", "span", "simpara" );
}
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "setup" );
}
},
OUTPUT
{
@Override
String process( Block block, State state )
{
return OutputHelper.passthroughMarker( "query-output", "span", "simpara" );
}
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "output" );
}
},
TABLE
{
@Override
String process( Block block, State state )
{
return AsciidocHelper.createQueryResultSnippet( state.latestResult.text );
}
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "table" );
}
},
TEST
{
@Override
String process( Block block, State state )
{
List<String> tests = block.lines.subList( 1, block.lines.size() - 1 );
String result = state.latestResult.text;
List<String> failures = new ArrayList<String>();
for ( String test : tests )
{
if ( !result.contains( test ) )
{
failures.add( test );
}
}
if ( !failures.isEmpty() )
{
throw new TestFailureException( state.latestResult, failures );
}
return "";
}
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "//" );
}
},
QUERY
{
@Override
boolean isA( List<String> block )
{
String first = block.get( 0 );
if ( first.charAt( 0 ) != '[' )
{
return false;
}
if ( first.contains( "source" ) && first.contains( "cypher" ) )
{
return true;
}
if ( block.size() > 4 && first.startsWith( "[[" ) )
{
String second = block.get( 1 );
if ( second.contains( "source" ) && second.contains( "cypher" ) )
{
return true;
}
}
return false;
}
@Override
String process( Block block, State state )
{
List<String> queryLines = new ArrayList<String>();
boolean queryStarted = false;
for ( String line : block.lines )
{
if ( !queryStarted )
{
if ( line.startsWith( CODE_BLOCK ) )
{
queryStarted = true;
}
}
else
{
if ( line.startsWith( CODE_BLOCK ) )
{
break;
}
else
{
queryLines.add( line );
}
}
}
String query = StringUtils.join( queryLines, CypherDoc.EOL );
try (Transaction tx = state.database.beginTx())
{
state.latestResult = new Result( query, state.engine.profile( query ) );
tx.success();
}
String prettifiedQuery = state.engine.prettify( query );
StringBuilder output = new StringBuilder( 512 );
output.append( AsciidocHelper.createCypherSnippetFromPreformattedQuery( prettifiedQuery ) )
.append( CypherDoc.EOL )
.append( CypherDoc.EOL );
return output.toString();
}
},
GRAPH
{
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "graph" );
}
@Override
String process( Block block, State state )
{
String first = block.lines.get( 0 );
String id = "";
if ( first.length() > 8 )
{
id = first.substring( first.indexOf( "graph" ) + 5 ).trim();
if ( id.indexOf( ':' ) != -1 )
{
id = first.substring( first.indexOf( ':' ) + 1 ).trim();
}
}
GraphvizWriter writer = new GraphvizWriter(
AsciiDocSimpleStyle.withAutomaticRelationshipTypeColors() );
ByteArrayOutputStream out = new ByteArrayOutputStream();
try (Transaction tx = state.database.beginTx())
{
writer.emit( out, Walker.fullGraph( state.database ) );
tx.success();
}
catch ( IOException e )
{
e.printStackTrace();
}
StringBuilder output = new StringBuilder( 512 );
try
{
String dot = out.toString( "UTF-8" );
output.append( "[\"dot\", \"cypherdoc-" )
.append( id )
.append( '-' )
.append( Integer.toHexString( dot.hashCode() ) )
.append( ".svg\", \"neoviz\"]\n----\n" )
.append( dot )
.append( "----\n" );
}
catch ( UnsupportedEncodingException e )
{
e.printStackTrace();
}
return output.toString();
}
},
CONSOLE
{
@Override
boolean isA( List<String> block )
{
return isACommentWith( block, "console" );
}
@Override
String process( Block block, State state )
{
return OutputHelper.passthroughMarker( "cypherdoc-console", "p", "simpara" );
}
},
TEXT
{
@Override
boolean isA( List<String> block )
{
return true;
}
@Override
String process( Block block, State state )
{
return StringUtils.join( block.lines, CypherDoc.EOL ) + CypherDoc.EOL;
}
};
private static final String CODE_BLOCK = "----";
abstract boolean isA( List<String> block );
abstract String process( Block block, State state );
private static boolean isACommentWith( List<String> block, String command )
{
String first = block.get( 0 );
return first.startsWith( "//" + command ) || first.startsWith( "// " + command );
}
}
| false
|
manual_cypherdoc_src_main_java_org_neo4j_doc_cypherdoc_BlockType.java
|
6,082
|
private static enum RelTypes implements RelationshipType
{
KNOWS
}
| false
|
community_embedded-examples_src_main_java_org_neo4j_examples_EmbeddedNeo4j.java
|
6,083
|
public enum RelTypes implements RelationshipType
{
NEO_NODE,
KNOWS,
CODED_BY
}
| false
|
community_embedded-examples_src_main_java_org_neo4j_examples_Matrix.java
|
6,084
|
private static enum RelTypes implements RelationshipType
{
USERS_REFERENCE, USER, KNOWS,
}
| false
|
community_embedded-examples_src_main_java_org_neo4j_examples_Neo4jShell.java
|
6,085
|
public enum RelTypes implements RelationshipType
{
NEO_NODE,
KNOWS,
CODED_BY
}
| false
|
community_embedded-examples_src_main_java_org_neo4j_examples_NewMatrix.java
|
6,086
|
private static enum ExampleTypes implements RelationshipType
{
MY_TYPE
}
| false
|
community_embedded-examples_src_test_java_org_neo4j_examples_PathFindingDocTest.java
|
6,087
|
public enum RoleRels implements RelationshipType
{
ROOT,
PART_OF,
MEMBER_OF
}
| false
|
community_embedded-examples_src_test_java_org_neo4j_examples_Roles.java
|
6,088
|
public enum RoleRels implements RelationshipType
{
ROOT,
PART_OF,
MEMBER_OF
}
| false
|
community_embedded-examples_src_test_java_org_neo4j_examples_RolesDocTest.java
|
6,089
|
private enum Rels implements RelationshipType
{
LIKES, KNOWS
}
| false
|
community_embedded-examples_src_main_java_org_neo4j_examples_TraversalExample.java
|
6,090
|
public enum RelTypes implements RelationshipType
{
REF_PERSONS,
A_PERSON,
STATUS,
NEXT,
FRIEND
}
| false
|
community_embedded-examples_src_main_java_org_neo4j_examples_socnet_RelTypes.java
|
6,091
|
public enum Edition {
community, advanced, enterprise;
}
| false
|
community_udc_src_main_java_org_neo4j_ext_udc_Edition.java
|
6,092
|
public enum Edition {
community, advanced, enterprise;
}
| false
|
community_udc_src_main_java_org_neo4j_ext_udc_impl_Edition.java
|
6,093
|
private static interface Condition<T>
{
boolean isTrue( T value );
}
| false
|
community_udc-integration_src_test_java_org_neo4j_ext_udc_impl_UdcExtensionImplTest.java
|
6,094
|
public interface UdcInformationCollector
{
Map<String, String> getUdcParams();
String getStoreId();
boolean getCrashPing();
}
| false
|
community_udc_src_main_java_org_neo4j_ext_udc_impl_UdcInformationCollector.java
|
6,095
|
public interface Dependencies
{
Config getConfig();
XaDataSourceManager getXaDataSourceManager();
KernelData getKernelData();
}
| false
|
community_udc_src_main_java_org_neo4j_ext_udc_impl_UdcKernelExtensionFactory.java
|
6,096
|
public interface CostAccumulator<T>
{
/**
* This is the accumulating method. This should return the results of
* "adding" two path costs with each other.
*
* @param c1 One of the costs.
* @param c2 The other cost.
* @return The resulting cost.
*/
T addCosts( T c1, T c2 );
}
| false
|
community_graph-algo_src_main_java_org_neo4j_graphalgo_CostAccumulator.java
|
6,097
|
public interface CostEvaluator<T>
{
/**
* This is the general method for looking up costs for relationships. This
* can do anything, like looking up a property or running some small
* calculation.
*
* @param relationship
* @param direction The direction in which the relationship is being
* evaluated, either {@link Direction#INCOMING} or
* {@link Direction#OUTGOING}.
* @return The cost for this edge/relationship
*/
T getCost( Relationship relationship, Direction direction );
}
| false
|
community_graph-algo_src_main_java_org_neo4j_graphalgo_CostEvaluator.java
|
6,098
|
public interface EstimateEvaluator<T>
{
/**
* Estimate the weight of the remaining path from one node to another.
*
* @param node the node to estimate the weight from.
* @param goal the node to estimate the weight to.
* @return an estimation of the weight of the path from the first node to
* the second.
*/
T getCost( Node node, Node goal );
}
| false
|
community_graph-algo_src_main_java_org_neo4j_graphalgo_EstimateEvaluator.java
|
6,099
|
public interface MaxCostEvaluator<T>
{
/**
* Evaluates whether the maximum cost has been exceeded.
*
* @param currentCost the cost to be checked
* @return true if the maximum Cost is less that currentCost
*/
public boolean maxCostExceeded( T currentCost );
}
| false
|
community_graph-algo_src_main_java_org_neo4j_graphalgo_MaxCostEvaluator.java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.