private Command visitIndexDeleteCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); DeleteCommand command = new DeleteCommand(); command.init( header.indexNameId, header.entityType ); return command; }
private Command visitIndexCreateCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Map<String,String> config = read2bMap( channel ); CreateCommand command = new CreateCommand(); command.init( header.indexNameId, header.entityType, config ); return command; }
private Command visitIndexAddNodeCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt(); Object value = readIndexValue( header.valueType, channel ); AddNodeCommand command = new AddNodeCommand(); command.init( header.indexNameId, entityId.longValue(), header.keyId, value ); return command; }
private Command visitIndexRemoveCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt(); Object value = readIndexValue( header.valueType, channel ); RemoveCommand command = new RemoveCommand(); command.init( header.indexNameId, header.entityType, entityId.longValue(), header.keyId, value ); return command; }
private Command visitIndexAddRelationshipCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt(); Object value = readIndexValue( header.valueType, channel ); Number startNode = header.startNodeNeedsLong ? channel.getLong() : channel.getInt(); Number endNode = header.endNodeNeedsLong ? channel.getLong() : channel.getInt(); AddRelationshipCommand command = new AddRelationshipCommand(); command.init( header.indexNameId, entityId.longValue(), header.keyId, value, startNode.longValue(), endNode.longValue() ); return command; }
private Command visitIndexDefineCommand( ReadableChannel channel ) throws IOException { readIndexCommandHeader( channel ); MutableObjectIntMap<String> indexNames = readMap( channel ); MutableObjectIntMap<String> keys = readMap( channel ); IndexDefineCommand command = new IndexDefineCommand(); command.init( indexNames, keys ); return command; }
private Command visitIndexDeleteCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); DeleteCommand command = new DeleteCommand(); command.init( header.indexNameId, header.entityType ); return command; }
private Command visitIndexCreateCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Map<String,String> config = read2bMap( channel ); CreateCommand command = new CreateCommand(); command.init( header.indexNameId, header.entityType, config ); return command; }
private Command visitIndexAddNodeCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt(); Object value = readIndexValue( header.valueType, channel ); AddNodeCommand command = new AddNodeCommand(); command.init( header.indexNameId, entityId.longValue(), header.keyId, value ); return command; }
private Command visitIndexRemoveCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt(); Object value = readIndexValue( header.valueType, channel ); RemoveCommand command = new RemoveCommand(); command.init( header.indexNameId, header.entityType, entityId.longValue(), header.keyId, value ); return command; }
private Command visitIndexDefineCommand( ReadableChannel channel ) throws IOException { readIndexCommandHeader( channel ); MutableObjectIntMap<String> indexNames = readMap( channel ); MutableObjectIntMap<String> keys = readMap( channel ); IndexDefineCommand command = new IndexDefineCommand(); command.init( indexNames, keys ); return command; }
private Command visitIndexAddRelationshipCommand( ReadableChannel channel ) throws IOException { IndexCommandHeader header = readIndexCommandHeader( channel ); Number entityId = header.entityIdNeedsLong ? channel.getLong() : channel.getInt(); Object value = readIndexValue( header.valueType, channel ); Number startNode = header.startNodeNeedsLong ? channel.getLong() : channel.getInt(); Number endNode = header.endNodeNeedsLong ? channel.getLong() : channel.getInt(); AddRelationshipCommand command = new AddRelationshipCommand(); command.init( header.indexNameId, entityId.longValue(), header.keyId, value, startNode.longValue(), endNode.longValue() ); return command; }