congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Client.getNodes
Code IndexAdd Tabnine to your IDE (free)

How to use
getNodes
method
in
com.icodici.universa.node2.network.Client

Best Java code snippets using com.icodici.universa.node2.network.Client.getNodes (Showing top 5 results out of 315)

origin: UniversaBlockchain/universa

final int checkConsensus = getNodes().size() / 3;
origin: UniversaBlockchain/universa

ArrayList<Future<?>> futures = new ArrayList<>();
AtomicInteger okNodes = new AtomicInteger(0);
final List<Client.NodeRecord> nodes = client.getNodes();
for (int nn = 0; nn < client.size(); nn++) {
  final int nodeNumber = nn;
origin: UniversaBlockchain/universa

final int NODES_COUNT = client.getNodes().size();
origin: UniversaBlockchain/universa

  @Test
  public void nodeVersion() throws Exception {
    System.out.println("nodeClient.getNodeNumber(): " + nodeClient.getNodeNumber());
    System.out.println("nodeClient.getSession(): " + nodeClient.getSession());
    System.out.println("nodeClient.ping(): " + nodeClient.ping());
    System.out.println("nodeClient.getState(random): " + nodeClient.getState(HashId.createRandom()));
    System.out.println("nodeClient.getNodes().size(): " + nodeClient.getNodes().size());
    System.out.println("nodeClient.getVersion(): " + nodeClient.getVersion());
    System.out.println("nodeClient.getPositiveConsensus(): " + nodeClient.getPositiveConsensus());
    System.out.println("nodeClient.getUrl(): " + nodeClient.getUrl());
//        PublicKey publicKey = new PublicKey(Bytes.fromHex("1E 08 1C 01 00 01 C4 00 01 C5 24 96 7D 75 B6 D3 01 AC 46 7F 64 85 56 43 B6 F7 02 B5 4A 8F FE C7 0D DE 85 4F 53 7A F4 D7 9D 85 BB AD A9 7F 1F 4C 8D CD 5C 99 09 D1 61 29 1E 67 35 80 E7 44 58 41 35 37 16 55 C2 E6 22 0D EF 0F 8B 9B A4 C6 3D 0C 56 7B EB 98 18 C8 0A 2C 26 C0 9B 23 17 3D 6B A9 BF 37 81 E5 21 0C B7 29 50 E6 69 75 DA 2C 05 42 46 A6 A8 E8 85 13 62 96 31 8C FF 50 68 56 F3 BF C4 2C F7 24 9A 9A 1A 9D 95 1A F0 E1 82 00 25 1F 14 60 0B 01 95 74 1B EA D0 FF CC 62 5B 78 64 18 79 8E 14 FD 24 7A 36 5A 09 91 8F 3B F5 C6 55 AC BE DA AD 15 D9 CC 3A 08 76 AB F8 3F 45 F4 5A 26 5D 80 38 6C 02 27 95 8D F3 38 B1 DD 1B C7 5D 51 3C E1 1D 05 8E 2A 6C E8 17 D7 88 5B AE D4 F6 B7 7D A8 84 74 E1 4F 65 B3 DC 06 2D 07 21 AA 51 BF 93 11 C7 7D 1E 09 B3 CE A6 C1 83 60 50 A5 B8 F5 F4 11 A6 98 A0 F9 2B 2B 8D").getData());
//        PublicKey publicKey = new PublicKey(Bytes.fromBase64("HggcAQABxAABxSSWfXW20wGsRn9khVZDtvcCtUqP/scN3oVPU3r0152Fu62pfx9Mjc1cmQnRYSkeZzWA50RYQTU3FlXC5iIN7w+Lm6TGPQxWe+uYGMgKLCbAmyMXPWupvzeB5SEMtylQ5ml12iwFQkamqOiFE2KWMYz/UGhW87/ELPckmpoanZUa8OGCACUfFGALAZV0G+rQ/8xiW3hkGHmOFP0kejZaCZGPO/XGVay+2q0V2cw6CHar+D9F9FomXYA4bAInlY3zOLHdG8ddUTzhHQWOKmzoF9eIW67U9rd9qIR04U9ls9wGLQchqlG/kxHHfR4Js86mwYNgUKW49fQRppig+SsrjQ==").getData());
//        System.out.println("transactionUnitsIssuerKey address: " + publicKey.getShortAddress());
//        System.out.println("transactionUnitsIssuerKey base64: " + publicKey.packToBase64String());
  }

origin: UniversaBlockchain/universa

public static synchronized ClientNetwork getClientNetwork() throws IOException {
  if (clientNetwork == null) {
    reporter.verbose("ClientNetwork not exist, create one");
    BasicHttpClientSession s = null;
    reporter.verbose("ClientNetwork nodeUrl: " + nodeUrl);
    if(nodeUrl != null) {
      clientNetwork = new ClientNetwork(nodeUrl, null, true);
    } else {
      clientNetwork = new ClientNetwork(null, true);
    }
    if (clientNetwork.client == null)
      throw new IOException("failed to connect to to the universa network");
    if(nodeNumber != -1) {
      List<Client.NodeRecord> nodes = clientNetwork.client.getNodes();
      clientNetwork.client = clientNetwork.client.getClient(nodeNumber-1);
      clientNetwork.client.setNodes(nodes);
    }
    if(!options.has("no-cache")) {
      s = getSession(clientNetwork.getNodeNumber());
    }
    reporter.verbose("Session for " + clientNetwork.getNodeNumber() + " is exist: " + (s != null));
    if(s != null) reporter.verbose("Session id is " + s.getSessionId());
    clientNetwork.start(s);
  }
  if(clientNetwork != null)
    session = clientNetwork.getSession();
  return clientNetwork;
}
com.icodici.universa.node2.networkClientgetNodes

Javadoc

Get list of nodes in

Popular methods of Client

  • getState
  • <init>
    Create new client protocol session. It loads network configuration and creates client protocol sessi
  • getClient
  • ping
  • register
    Register contract on the network without payment. May require special client key / network configura
  • command
    Execude custom command on the node
  • getNodeNumber
    Get number of node cliet connection is established with
  • getVersion
    Get network version
  • registerParcelWithState
    Register contract on the network with parcel (includes payment) and wait for some of the final ItemS
  • getParcelProcessingState
    Get processing state of given parcel
  • getSession
    Get session of http client connected to node with given number
  • getStats
    Get extended statistics of the node including by-day payments in "U". Accessible to node owners (wit
  • getSession,
  • getStats,
  • queryContract,
  • resyncItem,
  • setVerboseLevel,
  • size,
  • followerGetRate,
  • getBody,
  • getContract

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • BoxLayout (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Table (org.hibernate.mapping)
    A relational table
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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