Tabnine Logo
RaftPeer.getRaftPeerProto
Code IndexAdd Tabnine to your IDE (free)

How to use
getRaftPeerProto
method
in
org.apache.ratis.protocol.RaftPeer

Best Java code snippets using org.apache.ratis.protocol.RaftPeer.getRaftPeerProto (Showing top 4 results out of 315)

origin: apache/incubator-ratis

static CommitInfoProto toCommitInfoProto(RaftPeer peer, long commitIndex) {
 return CommitInfoProto.newBuilder()
   .setServer(peer.getRaftPeerProto())
   .setCommitIndex(commitIndex)
   .build();
}
origin: apache/incubator-ratis

 static ServerRpcProto toServerRpcProto(RaftPeer peer, long delay) {
  if (peer == null) {
   // if no peer information return empty
   return ServerRpcProto.getDefaultInstance();
  }
  return ServerRpcProto.newBuilder()
    .setId(peer.getRaftPeerProto())
    .setLastRpcElapsedTimeMs(delay)
    .build();
 }
}
origin: apache/incubator-ratis

public RoleInfoProto getRoleInfoProto() {
 RaftPeerRole currentRole = role.getCurrentRole();
 RoleInfoProto.Builder roleInfo = RoleInfoProto.newBuilder()
   .setSelf(getPeer().getRaftPeerProto())
   .setRole(currentRole)
   .setRoleElapsedTimeMs(role.getRoleElapsedTimeMs());
origin: apache/incubator-ratis

final RaftPeer suggestedLeader = nle.getSuggestedLeader();
if (suggestedLeader != null) {
 nleBuilder.setSuggestedLeader(suggestedLeader.getRaftPeerProto());
org.apache.ratis.protocolRaftPeergetRaftPeerProto

Popular methods of RaftPeer

  • getId
  • getAddress
  • <init>
    Construct a peer with the given id and address.
  • emptyArray

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now