Search in sources :

Example 1 with ProtocolVersion

use of org.neo4j.com.ProtocolVersion in project neo4j by neo4j.

the class MasterClientResolver method handle.

@Override
public void handle(ComException exception) {
    exception.traceComException(log, "MasterClientResolver.handle");
    if (exception instanceof IllegalProtocolVersionException) {
        log.info("Handling " + exception + ", will pick new master client");
        IllegalProtocolVersionException illegalProtocolVersion = (IllegalProtocolVersionException) exception;
        ProtocolVersion requiredProtocolVersion = new ProtocolVersion(illegalProtocolVersion.getReceived(), ProtocolVersion.INTERNAL_PROTOCOL_VERSION);
        getFor(requiredProtocolVersion);
    } else if (exception instanceof InvalidEpochException) {
        log.info("Handling " + exception + ", will go to PENDING and ask for election");
        invalidEpochHandler.handle();
    } else {
        log.debug("Ignoring " + exception + ".");
    }
}
Also used : IllegalProtocolVersionException(org.neo4j.com.IllegalProtocolVersionException) InvalidEpochException(org.neo4j.kernel.ha.com.master.InvalidEpochException) ProtocolVersion(org.neo4j.com.ProtocolVersion)

Aggregations

IllegalProtocolVersionException (org.neo4j.com.IllegalProtocolVersionException)1 ProtocolVersion (org.neo4j.com.ProtocolVersion)1 InvalidEpochException (org.neo4j.kernel.ha.com.master.InvalidEpochException)1