@Override public boolean visitRelationshipCountsCommand( Command.RelationshipCountsCommand command ) { assert countsUpdater != null || mode == TransactionApplicationMode.RECOVERY : "You must call begin first"; haveUpdates = true; if ( countsUpdater != null ) { // CountsUpdater is null if we're in recovery and the counts store already has had this transaction applied. countsUpdater.incrementRelationshipCount( command.startLabelId(), command.typeId(), command.endLabelId(), command.delta() ); } return false; }
@Override public void serialize( WritableChannel channel ) throws IOException { channel.put( NeoCommandType.UPDATE_RELATIONSHIP_COUNTS_COMMAND ); channel.putInt( startLabelId() ) .putInt( typeId() ) .putInt( endLabelId() ) .putLong( delta() ); } }
@Override public boolean visitRelationshipCountsCommand( Command.RelationshipCountsCommand command ) { assert countsUpdater != null || mode == TransactionApplicationMode.RECOVERY : "You must call begin first"; haveUpdates = true; if ( countsUpdater != null ) { // CountsUpdater is null if we're in recovery and the counts store already has had this transaction applied. countsUpdater.incrementRelationshipCount( command.startLabelId(), command.typeId(), command.endLabelId(), command.delta() ); } return false; }
@Override public void serialize( WritableChannel channel ) throws IOException { channel.put( NeoCommandType.UPDATE_RELATIONSHIP_COUNTS_COMMAND ); channel.putInt( startLabelId() ) .putInt( typeId() ) .putInt( endLabelId() ) .putLong( delta() ); } }