org.jsimpledb.kv.raft.msg.PingResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsimpledb-kv-raft Show documentation
Show all versions of jsimpledb-kv-raft Show documentation
JSimpleDB distributed, linearizable ACID compliant key/value store implementation based on the Raft consensus algorithm.
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.kv.raft.msg;
import java.nio.ByteBuffer;
import org.jsimpledb.kv.raft.Timestamp;
/**
* Response to a {@link PingRequest}.
*/
public class PingResponse extends AbstractPingMessage {
// Constructors
/**
* Constructor.
*
* @param clusterId cluster ID
* @param senderId identity of sender
* @param recipientId identity of recipient
* @param term sender's current term
* @param timestamp request timestamp from the {@link PingRequest}
*/
public PingResponse(int clusterId, String senderId, String recipientId, long term, Timestamp timestamp) {
super(Message.PING_RESPONSE_TYPE, clusterId, senderId, recipientId, term, timestamp);
this.checkArguments();
}
PingResponse(ByteBuffer buf, int version) {
super(Message.PING_RESPONSE_TYPE, buf, version);
this.checkArguments();
}
// Message
@Override
public void visit(MessageSwitch handler) {
handler.casePingResponse(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy