Search in sources :

Example 1 with PositionAwareChannel

use of org.neo4j.kernel.impl.transaction.log.PositionAwareChannel in project neo4j by neo4j.

the class BaseCommandReader method unknownCommandType.

protected IOException unknownCommandType(byte commandType, ReadableChannel channel) throws IOException {
    String message = "Unknown command type[" + commandType + "]";
    if (channel instanceof PositionAwareChannel) {
        PositionAwareChannel logChannel = (PositionAwareChannel) channel;
        LogPositionMarker position = new LogPositionMarker();
        logChannel.getCurrentPosition(position);
        message += " near " + position.newPosition();
    }
    return new IOException(message);
}
Also used : PositionAwareChannel(org.neo4j.kernel.impl.transaction.log.PositionAwareChannel) IOException(java.io.IOException) LogPositionMarker(org.neo4j.kernel.impl.transaction.log.LogPositionMarker)

Example 2 with PositionAwareChannel

use of org.neo4j.kernel.impl.transaction.log.PositionAwareChannel in project neo4j by neo4j.

the class LogCommandSerialization method unknownCommandType.

protected static IOException unknownCommandType(byte commandType, ReadableChannel channel) throws IOException {
    String message = "Unknown command type[" + commandType + "]";
    if (channel instanceof PositionAwareChannel) {
        PositionAwareChannel logChannel = (PositionAwareChannel) channel;
        message += " near " + logChannel.getCurrentPosition();
    }
    return new IOException(message);
}
Also used : PositionAwareChannel(org.neo4j.kernel.impl.transaction.log.PositionAwareChannel) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)2 PositionAwareChannel (org.neo4j.kernel.impl.transaction.log.PositionAwareChannel)2 LogPositionMarker (org.neo4j.kernel.impl.transaction.log.LogPositionMarker)1