@Override public void init() { read(); }
public void init( int indexNameId, byte entityType, Map<String, String> config ) { super.init( NeoCommandType.INDEX_CREATE_COMMAND, indexNameId, entityType, 0L, (byte)0, null ); this.config = config; }
@Override public void removeNode( String indexName, long id, String keyOrNull, Object valueOrNull ) { RemoveCommand command = new RemoveCommand(); command.init( definitions().getOrAssignIndexNameId( indexName ), IndexEntityType.Node.id(), id, definitions().getOrAssignKeyId( keyOrNull ), valueOrNull ); addCommand( indexName, command ); }
@Override public void deleteIndex( IndexEntityType entityType, String indexName ) { DeleteCommand command = new DeleteCommand(); command.init( definitions().getOrAssignIndexNameId( indexName ), entityType.id() ); addCommand( indexName, command, true ); }
private static AddNodeCommand addNodeToIndex( IndexDefineCommand definitions, String indexName ) { AddNodeCommand command = new AddNodeCommand(); command.init( definitions.getOrAssignIndexNameId( indexName ), 0L, (byte) 0, null ); return command; }
@Override public void createIndex( IndexEntityType entityType, String indexName, Map<String, String> config ) { CreateCommand command = new CreateCommand(); command.init( definitions().getOrAssignIndexNameId( indexName ), entityType.id(), config ); addCommand( indexName, command ); }
private static Command removeNode( int index, long id, int key, Object value ) { IndexCommand.RemoveCommand command = new IndexCommand.RemoveCommand(); command.init( index, IndexEntityType.Node.id(), id, key, value ); return command; }
private IndexDefineCommand initIndexDefineCommand( int nbrOfEntries ) { IndexDefineCommand command = new IndexDefineCommand(); MutableObjectIntMap<String> indexNames = initMap( nbrOfEntries ); MutableObjectIntMap<String> keys = initMap( nbrOfEntries ); command.init( indexNames, keys ); return command; }
private static AddRelationshipCommand addRelationshipToIndex( IndexDefineCommand definitions, String indexName ) { AddRelationshipCommand command = new AddRelationshipCommand(); command.init( definitions.getOrAssignIndexNameId( indexName ), 0L, (byte) 0, null, 1, 2 ); return command; }
private static Command addNode( int index, long id, int key, Object value ) { IndexCommand.AddNodeCommand command = new IndexCommand.AddNodeCommand(); command.init( index, id, key, value ); return command; }
public String[] getAllRelationshipIndexNames() { return indexStore.getNames( Relationship.class ); } }
@Override public Lifecycle newInstance( KernelContext context, Dependencies dependencies ) { IndexProviders indexProviders = dependencies.getIndexProviders(); return new Extension( indexProviders ); }
@Override public byte endNodeNeedsLong() { return needsLong( endNode ); }
private boolean serialize( InMemoryClosableChannel channel, IndexDefineCommand command ) throws IOException { try { command.serialize( channel ); } catch ( AssertionError e ) { return true; } return false; }
@Override public void remove( long entity ) { mutate(); }
@Override public void removeRelationship( String indexName, long id, String keyOrNull, Object valueOrNull ) { RemoveCommand command = new RemoveCommand(); command.init( definitions().getOrAssignIndexNameId( indexName ), IndexEntityType.Relationship.id(), id, definitions().getOrAssignKeyId( keyOrNull ), valueOrNull ); addCommand( indexName, command ); }
private static AddNodeCommand addNodeToIndex( IndexDefineCommand definitions, String indexName, long nodeId ) { AddNodeCommand command = new AddNodeCommand(); command.init( definitions.getOrAssignIndexNameId( indexName ), nodeId, (byte) 0, "some value" ); return command; }
private static Command removeRelationship( int index, long id, int key, Object value ) { IndexCommand.RemoveCommand command = new IndexCommand.RemoveCommand(); command.init( index, IndexEntityType.Relationship.id(), id, key, value ); return command; }