org.tron.p2p.connection.business.detect.NodeStat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libp2p Show documentation
Show all versions of libp2p Show documentation
libp2p is a p2p network SDK implemented in java language.
The newest version!
package org.tron.p2p.connection.business.detect;
import lombok.Data;
import org.tron.p2p.connection.message.detect.StatusMessage;
import org.tron.p2p.discover.Node;
import java.net.InetSocketAddress;
@Data
public class NodeStat {
private int totalCount;
private long lastDetectTime;
private long lastSuccessDetectTime;
private StatusMessage statusMessage;
private Node node;
private InetSocketAddress socketAddress;
public NodeStat(Node node) {
this.node = node;
this.socketAddress = node.getPreferInetSocketAddress();
}
public boolean finishDetect() {
return this.lastDetectTime == this.lastSuccessDetectTime;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy