test_class.declarator: BLOCK_HEIGHT_GENESIS = 0
test_class.modifier: private static final
test_class.original_string: private static final int BLOCK_HEIGHT_GENESIS = 0;
test_class.type: int
test_class.var_name: BLOCK_HEIGHT_GENESIS
test_class.declarator: connectedPeers
test_class.modifier: private
test_class.original_string: private BlockingQueue<Peer> connectedPeers;
test_class.type: BlockingQueue<Peer>
test_class.var_name: connectedPeers
test_class.declarator: disconnectedPeers
test_class.modifier: private
test_class.original_string: private BlockingQueue<Peer> disconnectedPeers;
test_class.type: BlockingQueue<Peer>
test_class.var_name: disconnectedPeers
test_class.declarator: connectedListener = new PeerConnectedEventListener() {
          @Override
          public void onPeerConnected(Peer peer, int peerCount) {
              connectedPeers.add(peer);
          }
      }
test_class.modifier: private
test_class.original_string: private PeerConnectedEventListener connectedListener = new PeerConnectedEventListener() {
          @Override
          public void onPeerConnected(Peer peer, int peerCount) {
              connectedPeers.add(peer);
          }
      };
test_class.type: PeerConnectedEventListener
test_class.var_name: connectedListener
test_class.declarator: disconnectedListener = new PeerDisconnectedEventListener() {
          @Override
          public void onPeerDisconnected(Peer peer, int peerCount) {
              disconnectedPeers.add(peer);
          }
      }
test_class.modifier: private
test_class.original_string: private PeerDisconnectedEventListener disconnectedListener = new PeerDisconnectedEventListener() {
          @Override
          public void onPeerDisconnected(Peer peer, int peerCount) {
              disconnectedPeers.add(peer);
          }
      };
test_class.type: PeerDisconnectedEventListener
test_class.var_name: disconnectedListener
test_class.declarator: preMessageReceivedListener
test_class.modifier: private
test_class.original_string: private PreMessageReceivedEventListener preMessageReceivedListener;
test_class.type: PreMessageReceivedEventListener
test_class.var_name: preMessageReceivedListener
test_class.declarator: peerToMessageCount
test_class.modifier: private
test_class.original_string: private Map<Peer, AtomicInteger> peerToMessageCount;
test_class.type: Map<Peer, AtomicInteger>
test_class.var_name: peerToMessageCount
test_class.file: core/src/test/java/org/ulordj/core/PeerGroupTest.java
test_class.identifier: PeerGroupTest
test_class.superclass: extends TestWithPeerGroup
test_case.body: @Test
      public void waitForPeersOfVersion() throws Exception {
          final int baseVer = peerGroup.getMinRequiredProtocolVersion() + 3000;
          final int newVer = baseVer + 1000;
  
          ListenableFuture<List<Peer>> future = peerGroup.waitForPeersOfVersion(2, newVer);
  
          VersionMessage ver1 = new VersionMessage(UNITTEST, 10);
          ver1.clientVersion = baseVer;
          ver1.localServices = VersionMessage.NODE_NETWORK;
          VersionMessage ver2 = new VersionMessage(UNITTEST, 10);
          ver2.clientVersion = newVer;
          ver2.localServices = VersionMessage.NODE_NETWORK;
          peerGroup.start();
          assertFalse(future.isDone());
          connectPeer(1, ver1);
          assertFalse(future.isDone());
          connectPeer(2, ver2);
          assertFalse(future.isDone());
          assertTrue(peerGroup.waitForPeersOfVersion(1, newVer).isDone());   // Immediate completion.
          connectPeer(3, ver2);
          future.get();
          assertTrue(future.isDone());
      }
test_case.class_method_signature: PeerGroupTest.waitForPeersOfVersion()
test_case.full_signature: @Test public void waitForPeersOfVersion()
test_case.identifier: waitForPeersOfVersion
test_case.invocations: getMinRequiredProtocolVersion waitForPeersOfVersion start assertFalse isDone connectPeer assertFalse isDone connectPeer assertFalse isDone assertTrue isDone waitForPeersOfVersion connectPeer get assertTrue isDone
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void waitForPeersOfVersion()
focal_class.declarator: log = LoggerFactory.getLogger(PeerGroup.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(PeerGroup.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: requiredServices = 0
focal_class.modifier: private
focal_class.original_string: private long requiredServices = 0;
focal_class.type: long
focal_class.var_name: requiredServices
focal_class.declarator: DEFAULT_CONNECTIONS = 12
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_CONNECTIONS = 12;
focal_class.type: int
focal_class.var_name: DEFAULT_CONNECTIONS
focal_class.declarator: vMaxPeersToDiscoverCount = 100
focal_class.modifier: private volatile
focal_class.original_string: private volatile int vMaxPeersToDiscoverCount = 100;
focal_class.type: int
focal_class.var_name: vMaxPeersToDiscoverCount
focal_class.declarator: DEFAULT_PEER_DISCOVERY_TIMEOUT_MILLIS = 5000
focal_class.modifier: private static final
focal_class.original_string: private static final long DEFAULT_PEER_DISCOVERY_TIMEOUT_MILLIS = 5000;
focal_class.type: long
focal_class.var_name: DEFAULT_PEER_DISCOVERY_TIMEOUT_MILLIS
focal_class.declarator: vPeerDiscoveryTimeoutMillis = DEFAULT_PEER_DISCOVERY_TIMEOUT_MILLIS
focal_class.modifier: private volatile
focal_class.original_string: private volatile long vPeerDiscoveryTimeoutMillis = DEFAULT_PEER_DISCOVERY_TIMEOUT_MILLIS;
focal_class.type: long
focal_class.var_name: vPeerDiscoveryTimeoutMillis
focal_class.declarator: lock = Threading.lock("peergroup")
focal_class.modifier: protected final
focal_class.original_string: protected final ReentrantLock lock = Threading.lock("peergroup");
focal_class.type: ReentrantLock
focal_class.var_name: lock
focal_class.declarator: params
focal_class.modifier: protected final
focal_class.original_string: protected final NetworkParameters params;
focal_class.type: NetworkParameters
focal_class.var_name: params
focal_class.declarator: chain
focal_class.modifier: @Nullable protected final
focal_class.original_string: @Nullable protected final AbstractBlockChain chain;
focal_class.type: AbstractBlockChain
focal_class.var_name: chain
focal_class.declarator: executor
focal_class.modifier: protected final
focal_class.original_string: protected final ListeningScheduledExecutorService executor;
focal_class.type: ListeningScheduledExecutorService
focal_class.var_name: executor
focal_class.declarator: vRunning
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean vRunning;
focal_class.type: boolean
focal_class.var_name: vRunning
focal_class.declarator: vUsedUp
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean vUsedUp;
focal_class.type: boolean
focal_class.var_name: vUsedUp
focal_class.declarator: inactives
focal_class.modifier: @GuardedBy("lock") private final
focal_class.original_string: @GuardedBy("lock") private final PriorityQueue<PeerAddress> inactives;
focal_class.type: PriorityQueue<PeerAddress>
focal_class.var_name: inactives
focal_class.declarator: backoffMap
focal_class.modifier: @GuardedBy("lock") private final
focal_class.original_string: @GuardedBy("lock") private final Map<PeerAddress, ExponentialBackoff> backoffMap;
focal_class.type: Map<PeerAddress, ExponentialBackoff>
focal_class.var_name: backoffMap
focal_class.declarator: peers
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<Peer> peers;
focal_class.type: CopyOnWriteArrayList<Peer>
focal_class.var_name: peers
focal_class.declarator: pendingPeers
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<Peer> pendingPeers;
focal_class.type: CopyOnWriteArrayList<Peer>
focal_class.var_name: pendingPeers
focal_class.declarator: channels
focal_class.modifier: private final
focal_class.original_string: private final ClientConnectionManager channels;
focal_class.type: ClientConnectionManager
focal_class.var_name: channels
focal_class.declarator: downloadPeer
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private Peer downloadPeer;
focal_class.type: Peer
focal_class.var_name: downloadPeer
focal_class.declarator: downloadListener
focal_class.modifier: @Nullable @GuardedBy("lock") private
focal_class.original_string: @Nullable @GuardedBy("lock") private PeerDataEventListener downloadListener;
focal_class.type: PeerDataEventListener
focal_class.var_name: downloadListener
focal_class.declarator: peersBlocksDownloadedEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<ListenerRegistration<BlocksDownloadedEventListener>> peersBlocksDownloadedEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<BlocksDownloadedEventListener>>
focal_class.var_name: peersBlocksDownloadedEventListeners
focal_class.declarator: peersChainDownloadStartedEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<ListenerRegistration<ChainDownloadStartedEventListener>> peersChainDownloadStartedEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<ChainDownloadStartedEventListener>>
focal_class.var_name: peersChainDownloadStartedEventListeners
focal_class.declarator: peerConnectedEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: protected final
focal_class.original_string: protected final CopyOnWriteArrayList<ListenerRegistration<PeerConnectedEventListener>> peerConnectedEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<PeerConnectedEventListener>>
focal_class.var_name: peerConnectedEventListeners
focal_class.declarator: peerDiscoveredEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: protected final
focal_class.original_string: protected final CopyOnWriteArrayList<ListenerRegistration<PeerDiscoveredEventListener>> peerDiscoveredEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<PeerDiscoveredEventListener>>
focal_class.var_name: peerDiscoveredEventListeners
focal_class.declarator: peerDisconnectedEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: protected final
focal_class.original_string: protected final CopyOnWriteArrayList<ListenerRegistration<PeerDisconnectedEventListener>> peerDisconnectedEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<PeerDisconnectedEventListener>>
focal_class.var_name: peerDisconnectedEventListeners
focal_class.declarator: peerGetDataEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<ListenerRegistration<GetDataEventListener>> peerGetDataEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<GetDataEventListener>>
focal_class.var_name: peerGetDataEventListeners
focal_class.declarator: peersPreMessageReceivedEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<ListenerRegistration<PreMessageReceivedEventListener>> peersPreMessageReceivedEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<PreMessageReceivedEventListener>>
focal_class.var_name: peersPreMessageReceivedEventListeners
focal_class.declarator: peersTransactionBroadastEventListeners
          = new CopyOnWriteArrayList<>()
focal_class.modifier: protected final
focal_class.original_string: protected final CopyOnWriteArrayList<ListenerRegistration<OnTransactionBroadcastListener>> peersTransactionBroadastEventListeners
          = new CopyOnWriteArrayList<>();
focal_class.type: CopyOnWriteArrayList<ListenerRegistration<OnTransactionBroadcastListener>>
focal_class.var_name: peersTransactionBroadastEventListeners
focal_class.declarator: peerDiscoverers
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArraySet<PeerDiscovery> peerDiscoverers;
focal_class.type: CopyOnWriteArraySet<PeerDiscovery>
focal_class.var_name: peerDiscoverers
focal_class.declarator: versionMessage
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private VersionMessage versionMessage;
focal_class.type: VersionMessage
focal_class.var_name: versionMessage
focal_class.declarator: downloadTxDependencyDepth
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private int downloadTxDependencyDepth;
focal_class.type: int
focal_class.var_name: downloadTxDependencyDepth
focal_class.declarator: maxConnections
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private int maxConnections;
focal_class.type: int
focal_class.var_name: maxConnections
focal_class.declarator: vMinRequiredProtocolVersion
focal_class.modifier: private volatile
focal_class.original_string: private volatile int vMinRequiredProtocolVersion;
focal_class.type: int
focal_class.var_name: vMinRequiredProtocolVersion
focal_class.declarator: DEFAULT_PING_INTERVAL_MSEC = 2000
focal_class.modifier: public static final
focal_class.original_string: public static final long DEFAULT_PING_INTERVAL_MSEC = 2000;
focal_class.type: long
focal_class.var_name: DEFAULT_PING_INTERVAL_MSEC
focal_class.declarator: pingIntervalMsec = DEFAULT_PING_INTERVAL_MSEC
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private long pingIntervalMsec = DEFAULT_PING_INTERVAL_MSEC;
focal_class.type: long
focal_class.var_name: pingIntervalMsec
focal_class.declarator: useLocalhostPeerWhenPossible = true
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private boolean useLocalhostPeerWhenPossible = true;
focal_class.type: boolean
focal_class.var_name: useLocalhostPeerWhenPossible
focal_class.declarator: ipv6Unreachable = false
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private boolean ipv6Unreachable = false;
focal_class.type: boolean
focal_class.var_name: ipv6Unreachable
focal_class.declarator: fastCatchupTimeSecs
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private long fastCatchupTimeSecs;
focal_class.type: long
focal_class.var_name: fastCatchupTimeSecs
focal_class.declarator: wallets
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<Wallet> wallets;
focal_class.type: CopyOnWriteArrayList<Wallet>
focal_class.var_name: wallets
focal_class.declarator: peerFilterProviders
focal_class.modifier: private final
focal_class.original_string: private final CopyOnWriteArrayList<PeerFilterProvider> peerFilterProviders;
focal_class.type: CopyOnWriteArrayList<PeerFilterProvider>
focal_class.var_name: peerFilterProviders
focal_class.declarator: peerListener = new PeerListener()
focal_class.modifier: private final
focal_class.original_string: private final PeerListener peerListener = new PeerListener();
focal_class.type: PeerListener
focal_class.var_name: peerListener
focal_class.declarator: minBroadcastConnections = 0
focal_class.modifier: private
focal_class.original_string: private int minBroadcastConnections = 0;
focal_class.type: int
focal_class.var_name: minBroadcastConnections
focal_class.declarator: walletScriptEventListener = new ScriptsChangeEventListener() {
          @Override public void onScriptsChanged(Wallet wallet, List<Script> scripts, boolean isAddingScripts) {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
          }
      }
focal_class.modifier: private final
focal_class.original_string: private final ScriptsChangeEventListener walletScriptEventListener = new ScriptsChangeEventListener() {
          @Override public void onScriptsChanged(Wallet wallet, List<Script> scripts, boolean isAddingScripts) {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
          }
      };
focal_class.type: ScriptsChangeEventListener
focal_class.var_name: walletScriptEventListener
focal_class.declarator: walletKeyEventListener = new KeyChainEventListener() {
          @Override public void onKeysAdded(List<ECKey> keys) {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
          }
      }
focal_class.modifier: private final
focal_class.original_string: private final KeyChainEventListener walletKeyEventListener = new KeyChainEventListener() {
          @Override public void onKeysAdded(List<ECKey> keys) {
              recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
          }
      };
focal_class.type: KeyChainEventListener
focal_class.var_name: walletKeyEventListener
focal_class.declarator: walletCoinsReceivedEventListener = new WalletCoinsReceivedEventListener() {
          @Override
          public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance) {
              // We received a relevant transaction. We MAY need to recalculate and resend the Bloom filter, but only
              // if we have received a transaction that includes a relevant P2PK output.
              //
              // The reason is that P2PK outputs, when spent, will not repeat any data we can predict in their
              // inputs. So a remote peer will update the Bloom filter for us when such an output is seen matching the
              // existing filter, so that it includes the tx hash in which the P2PK output was observed. Thus
              // the spending transaction will always match (due to the outpoint structure).
              //
              // Unfortunately, whilst this is required for correct sync of the chain in blocks, there are two edge cases.
              //
              // (1) If a wallet receives a relevant, confirmed p2pubkey output that was not broadcast across the network,
              // for example in a coinbase transaction, then the node that's serving us the chain will update its filter
              // but the rest will not. If another transaction then spends it, the other nodes won't match/relay it.
              //
              // (2) If we receive a p2pubkey output broadcast across the network, all currently connected nodes will see
              // it and update their filter themselves, but any newly connected nodes will receive the last filter we
              // calculated, which would not include this transaction.
              //
              // For this reason we check if the transaction contained any relevant pay to pubkeys and force a recalc
              // and possibly retransmit if so. The recalculation process will end up including the tx hash into the
              // filter. In case (1), we need to retransmit the filter to the connected peers. In case (2), we don't
              // and shouldn't, we should just recalculate and cache the new filter for next time.
              for (TransactionOutput output : tx.getOutputs()) {
                  if (ScriptPattern.isPayToPubKey(output.getScriptPubKey()) && output.isMine(wallet)) {
                      if (tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING)
                          recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
                      else
                          recalculateFastCatchupAndFilter(FilterRecalculateMode.DONT_SEND);
                      return;
                  }
              }
          }
      }
focal_class.modifier: private final
focal_class.original_string: private final WalletCoinsReceivedEventListener walletCoinsReceivedEventListener = new WalletCoinsReceivedEventListener() {
          @Override
          public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance) {
              // We received a relevant transaction. We MAY need to recalculate and resend the Bloom filter, but only
              // if we have received a transaction that includes a relevant P2PK output.
              //
              // The reason is that P2PK outputs, when spent, will not repeat any data we can predict in their
              // inputs. So a remote peer will update the Bloom filter for us when such an output is seen matching the
              // existing filter, so that it includes the tx hash in which the P2PK output was observed. Thus
              // the spending transaction will always match (due to the outpoint structure).
              //
              // Unfortunately, whilst this is required for correct sync of the chain in blocks, there are two edge cases.
              //
              // (1) If a wallet receives a relevant, confirmed p2pubkey output that was not broadcast across the network,
              // for example in a coinbase transaction, then the node that's serving us the chain will update its filter
              // but the rest will not. If another transaction then spends it, the other nodes won't match/relay it.
              //
              // (2) If we receive a p2pubkey output broadcast across the network, all currently connected nodes will see
              // it and update their filter themselves, but any newly connected nodes will receive the last filter we
              // calculated, which would not include this transaction.
              //
              // For this reason we check if the transaction contained any relevant pay to pubkeys and force a recalc
              // and possibly retransmit if so. The recalculation process will end up including the tx hash into the
              // filter. In case (1), we need to retransmit the filter to the connected peers. In case (2), we don't
              // and shouldn't, we should just recalculate and cache the new filter for next time.
              for (TransactionOutput output : tx.getOutputs()) {
                  if (ScriptPattern.isPayToPubKey(output.getScriptPubKey()) && output.isMine(wallet)) {
                      if (tx.getConfidence().getConfidenceType() == TransactionConfidence.ConfidenceType.BUILDING)
                          recalculateFastCatchupAndFilter(FilterRecalculateMode.SEND_IF_CHANGED);
                      else
                          recalculateFastCatchupAndFilter(FilterRecalculateMode.DONT_SEND);
                      return;
                  }
              }
          }
      };
focal_class.type: WalletCoinsReceivedEventListener
focal_class.var_name: walletCoinsReceivedEventListener
focal_class.declarator: peerBackoffParams = new ExponentialBackoff.Params(1000, 1.5f, 10 * 60 * 1000)
focal_class.modifier: private final
focal_class.original_string: private final ExponentialBackoff.Params peerBackoffParams = new ExponentialBackoff.Params(1000, 1.5f, 10 * 60 * 1000);
focal_class.type: ExponentialBackoff.Params
focal_class.var_name: peerBackoffParams
focal_class.declarator: groupBackoff = new ExponentialBackoff(new ExponentialBackoff.Params(1000, 1.5f, 10 * 1000))
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private ExponentialBackoff groupBackoff = new ExponentialBackoff(new ExponentialBackoff.Params(1000, 1.5f, 10 * 1000));
focal_class.type: ExponentialBackoff
focal_class.var_name: groupBackoff
focal_class.declarator: runningBroadcasts
focal_class.modifier: private final
focal_class.original_string: private final Set<TransactionBroadcast> runningBroadcasts;
focal_class.type: Set<TransactionBroadcast>
focal_class.var_name: runningBroadcasts
focal_class.declarator: startupListener = new PeerStartupListener()
focal_class.modifier: private final
focal_class.original_string: private final PeerStartupListener startupListener = new PeerStartupListener();
focal_class.type: PeerStartupListener
focal_class.var_name: startupListener
focal_class.declarator: DEFAULT_BLOOM_FILTER_FP_RATE = 0.00001
focal_class.modifier: public static final
focal_class.original_string: public static final double DEFAULT_BLOOM_FILTER_FP_RATE = 0.00001;
focal_class.type: double
focal_class.var_name: DEFAULT_BLOOM_FILTER_FP_RATE
focal_class.declarator: MAX_FP_RATE_INCREASE = 10.0f
focal_class.modifier: public static final
focal_class.original_string: public static final double MAX_FP_RATE_INCREASE = 10.0f;
focal_class.type: double
focal_class.var_name: MAX_FP_RATE_INCREASE
focal_class.declarator: bloomFilterMerger
focal_class.modifier: private final
focal_class.original_string: private final FilterMerger bloomFilterMerger;
focal_class.type: FilterMerger
focal_class.var_name: bloomFilterMerger
focal_class.declarator: DEFAULT_CONNECT_TIMEOUT_MILLIS = 5000
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 5000;
focal_class.type: int
focal_class.var_name: DEFAULT_CONNECT_TIMEOUT_MILLIS
focal_class.declarator: vConnectTimeoutMillis = DEFAULT_CONNECT_TIMEOUT_MILLIS
focal_class.modifier: private volatile
focal_class.original_string: private volatile int vConnectTimeoutMillis = DEFAULT_CONNECT_TIMEOUT_MILLIS;
focal_class.type: int
focal_class.var_name: vConnectTimeoutMillis
focal_class.declarator: vBloomFilteringEnabled = true
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean vBloomFilteringEnabled = true;
focal_class.type: boolean
focal_class.var_name: vBloomFilteringEnabled
focal_class.declarator: executorStartupLatch = new CountDownLatch(1)
focal_class.modifier: private
focal_class.original_string: private CountDownLatch executorStartupLatch = new CountDownLatch(1);
focal_class.type: CountDownLatch
focal_class.var_name: executorStartupLatch
focal_class.declarator: triggerConnectionsJob = new Runnable() {
          private boolean firstRun = true;
          private final static long MIN_PEER_DISCOVERY_INTERVAL = 1000L;
  
          @Override
          public void run() {
              try {
                  go();
              } catch (Throwable e) {
                  log.error("Exception when trying to build connections", e);  // The executor swallows exceptions :(
              }
          }
  
          public void go() {
              if (!vRunning) return;
  
              boolean doDiscovery = false;
              long now = Utils.currentTimeMillis();
              lock.lock();
              try {
                  // First run: try and use a local node if there is one, for the additional security it can provide.
                  // But, not on Android as there are none for this platform: it could only be a malicious app trying
                  // to hijack our traffic.
                  if (!Utils.isAndroidRuntime() && useLocalhostPeerWhenPossible && maybeCheckForLocalhostPeer() && firstRun) {
                      log.info("Localhost peer detected, trying to use it instead of P2P discovery");
                      maxConnections = 0;
                      connectToLocalHost();
                      return;
                  }
  
                  boolean havePeerWeCanTry = !inactives.isEmpty() && backoffMap.get(inactives.peek()).getRetryTime() <= now;
                  doDiscovery = !havePeerWeCanTry;
              } finally {
                  firstRun = false;
                  lock.unlock();
              }
  
              // Don't hold the lock across discovery as this process can be very slow.
              boolean discoverySuccess = false;
              if (doDiscovery) {
                  try {
                      discoverySuccess = discoverPeers() > 0;
                  } catch (PeerDiscoveryException e) {
                      log.error("Peer discovery failure", e);
                  }
              }
  
              long retryTime;
              PeerAddress addrToTry;
              lock.lock();
              try {
                  if (doDiscovery) {
                      // Require that we have enough connections, to consider this
                      // a success, or we just constantly test for new peers
                      if (discoverySuccess && countConnectedAndPendingPeers() >= getMaxConnections()) {
                          groupBackoff.trackSuccess();
                      } else {
                          groupBackoff.trackFailure();
                      }
                  }
                  // Inactives is sorted by backoffMap time.
                  if (inactives.isEmpty()) {
                      if (countConnectedAndPendingPeers() < getMaxConnections()) {
                          long interval = Math.max(groupBackoff.getRetryTime() - now, MIN_PEER_DISCOVERY_INTERVAL);
                          log.info("Peer discovery didn't provide us any more peers, will try again in "
                              + interval + "ms.");
                          executor.schedule(this, interval, TimeUnit.MILLISECONDS);
                      } else {
                          // We have enough peers and discovery provided no more, so just settle down. Most likely we
                          // were given a fixed set of addresses in some test scenario.
                      }
                      return;
                  } else {
                      do {
                          addrToTry = inactives.poll();
                      } while (ipv6Unreachable && addrToTry.getAddr() instanceof Inet6Address);
                      retryTime = backoffMap.get(addrToTry).getRetryTime();
                  }
                  retryTime = Math.max(retryTime, groupBackoff.getRetryTime());
                  if (retryTime > now) {
                      long delay = retryTime - now;
                      log.info("Waiting {} msec before next connect attempt {}", delay, addrToTry == null ? "" : "to " + addrToTry);
                      inactives.add(addrToTry);
                      executor.schedule(this, delay, TimeUnit.MILLISECONDS);
                      return;
                  }
                  connectTo(addrToTry, false, vConnectTimeoutMillis);
              } finally {
                  lock.unlock();
              }
              if (countConnectedAndPendingPeers() < getMaxConnections()) {
                  executor.execute(this);   // Try next peer immediately.
              }
          }
      }
focal_class.modifier: private
focal_class.original_string: private Runnable triggerConnectionsJob = new Runnable() {
          private boolean firstRun = true;
          private final static long MIN_PEER_DISCOVERY_INTERVAL = 1000L;
  
          @Override
          public void run() {
              try {
                  go();
              } catch (Throwable e) {
                  log.error("Exception when trying to build connections", e);  // The executor swallows exceptions :(
              }
          }
  
          public void go() {
              if (!vRunning) return;
  
              boolean doDiscovery = false;
              long now = Utils.currentTimeMillis();
              lock.lock();
              try {
                  // First run: try and use a local node if there is one, for the additional security it can provide.
                  // But, not on Android as there are none for this platform: it could only be a malicious app trying
                  // to hijack our traffic.
                  if (!Utils.isAndroidRuntime() && useLocalhostPeerWhenPossible && maybeCheckForLocalhostPeer() && firstRun) {
                      log.info("Localhost peer detected, trying to use it instead of P2P discovery");
                      maxConnections = 0;
                      connectToLocalHost();
                      return;
                  }
  
                  boolean havePeerWeCanTry = !inactives.isEmpty() && backoffMap.get(inactives.peek()).getRetryTime() <= now;
                  doDiscovery = !havePeerWeCanTry;
              } finally {
                  firstRun = false;
                  lock.unlock();
              }
  
              // Don't hold the lock across discovery as this process can be very slow.
              boolean discoverySuccess = false;
              if (doDiscovery) {
                  try {
                      discoverySuccess = discoverPeers() > 0;
                  } catch (PeerDiscoveryException e) {
                      log.error("Peer discovery failure", e);
                  }
              }
  
              long retryTime;
              PeerAddress addrToTry;
              lock.lock();
              try {
                  if (doDiscovery) {
                      // Require that we have enough connections, to consider this
                      // a success, or we just constantly test for new peers
                      if (discoverySuccess && countConnectedAndPendingPeers() >= getMaxConnections()) {
                          groupBackoff.trackSuccess();
                      } else {
                          groupBackoff.trackFailure();
                      }
                  }
                  // Inactives is sorted by backoffMap time.
                  if (inactives.isEmpty()) {
                      if (countConnectedAndPendingPeers() < getMaxConnections()) {
                          long interval = Math.max(groupBackoff.getRetryTime() - now, MIN_PEER_DISCOVERY_INTERVAL);
                          log.info("Peer discovery didn't provide us any more peers, will try again in "
                              + interval + "ms.");
                          executor.schedule(this, interval, TimeUnit.MILLISECONDS);
                      } else {
                          // We have enough peers and discovery provided no more, so just settle down. Most likely we
                          // were given a fixed set of addresses in some test scenario.
                      }
                      return;
                  } else {
                      do {
                          addrToTry = inactives.poll();
                      } while (ipv6Unreachable && addrToTry.getAddr() instanceof Inet6Address);
                      retryTime = backoffMap.get(addrToTry).getRetryTime();
                  }
                  retryTime = Math.max(retryTime, groupBackoff.getRetryTime());
                  if (retryTime > now) {
                      long delay = retryTime - now;
                      log.info("Waiting {} msec before next connect attempt {}", delay, addrToTry == null ? "" : "to " + addrToTry);
                      inactives.add(addrToTry);
                      executor.schedule(this, delay, TimeUnit.MILLISECONDS);
                      return;
                  }
                  connectTo(addrToTry, false, vConnectTimeoutMillis);
              } finally {
                  lock.unlock();
              }
              if (countConnectedAndPendingPeers() < getMaxConnections()) {
                  executor.execute(this);   // Try next peer immediately.
              }
          }
      };
focal_class.type: Runnable
focal_class.var_name: triggerConnectionsJob
focal_class.declarator: localhostCheckState = LocalhostCheckState.NOT_TRIED
focal_class.modifier: private
focal_class.original_string: private LocalhostCheckState localhostCheckState = LocalhostCheckState.NOT_TRIED;
focal_class.type: LocalhostCheckState
focal_class.var_name: localhostCheckState
focal_class.declarator: inFlightRecalculations = Maps.newHashMap()
focal_class.modifier: private final
focal_class.original_string: private final Map<FilterRecalculateMode, SettableFuture<BloomFilter>> inFlightRecalculations = Maps.newHashMap();
focal_class.type: Map<FilterRecalculateMode, SettableFuture<BloomFilter>>
focal_class.var_name: inFlightRecalculations
focal_class.declarator: vPingTask
focal_class.modifier: @Nullable private volatile
focal_class.original_string: @Nullable private volatile ListenableScheduledFuture<?> vPingTask;
focal_class.type: ListenableScheduledFuture<?>
focal_class.var_name: vPingTask
focal_class.declarator: stallPeriodSeconds = 10
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private int stallPeriodSeconds = 10;
focal_class.type: int
focal_class.var_name: stallPeriodSeconds
focal_class.declarator: stallMinSpeedBytesSec = Block.HEADER_SIZE * 20
focal_class.modifier: @GuardedBy("lock") private
focal_class.original_string: @GuardedBy("lock") private int stallMinSpeedBytesSec = Block.HEADER_SIZE * 20;
focal_class.type: int
focal_class.var_name: stallMinSpeedBytesSec
focal_class.declarator: chainDownloadSpeedCalculator
focal_class.modifier: @Nullable private
focal_class.original_string: @Nullable private ChainDownloadSpeedCalculator chainDownloadSpeedCalculator;
focal_class.type: ChainDownloadSpeedCalculator
focal_class.var_name: chainDownloadSpeedCalculator
focal_class.file: core/src/main/java/org/ulordj/core/PeerGroup.java
focal_class.identifier: PeerGroup
focal_class.interfaces: implements TransactionBroadcaster
focal_class.class_method_signature: PeerGroup.PeerGroup(NetworkParameters params)
focal_class.full_signature: public  PeerGroup(NetworkParameters params)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params)
focal_class.signature:  PeerGroup(NetworkParameters params)
focal_class.class_method_signature: PeerGroup.PeerGroup(Context context)
focal_class.full_signature: public  PeerGroup(Context context)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (Context context)
focal_class.signature:  PeerGroup(Context context)
focal_class.class_method_signature: PeerGroup.PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.full_signature: public  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.signature:  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain)
focal_class.class_method_signature: PeerGroup.PeerGroup(Context context, @Nullable AbstractBlockChain chain)
focal_class.full_signature: public  PeerGroup(Context context, @Nullable AbstractBlockChain chain)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (Context context, @Nullable AbstractBlockChain chain)
focal_class.signature:  PeerGroup(Context context, @Nullable AbstractBlockChain chain)
focal_class.class_method_signature: PeerGroup.PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.full_signature: public  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.identifier: PeerGroup
focal_class.modifiers: public
focal_class.parameters: (NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.signature:  PeerGroup(NetworkParameters params, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.class_method_signature: PeerGroup.PeerGroup(Context context, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.full_signature: private  PeerGroup(Context context, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.identifier: PeerGroup
focal_class.modifiers: private
focal_class.parameters: (Context context, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.signature:  PeerGroup(Context context, @Nullable AbstractBlockChain chain, ClientConnectionManager connectionManager)
focal_class.class_method_signature: PeerGroup.createPrivateExecutor()
focal_class.full_signature: protected ListeningScheduledExecutorService createPrivateExecutor()
focal_class.identifier: createPrivateExecutor
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: ListeningScheduledExecutorService
focal_class.signature: ListeningScheduledExecutorService createPrivateExecutor()
focal_class.class_method_signature: PeerGroup.setPeerDiscoveryTimeoutMillis(long peerDiscoveryTimeoutMillis)
focal_class.full_signature: public void setPeerDiscoveryTimeoutMillis(long peerDiscoveryTimeoutMillis)
focal_class.identifier: setPeerDiscoveryTimeoutMillis
focal_class.modifiers: public
focal_class.parameters: (long peerDiscoveryTimeoutMillis)
focal_class.return: void
focal_class.signature: void setPeerDiscoveryTimeoutMillis(long peerDiscoveryTimeoutMillis)
focal_class.class_method_signature: PeerGroup.setMaxConnections(int maxConnections)
focal_class.full_signature: public void setMaxConnections(int maxConnections)
focal_class.identifier: setMaxConnections
focal_class.modifiers: public
focal_class.parameters: (int maxConnections)
focal_class.return: void
focal_class.signature: void setMaxConnections(int maxConnections)
focal_class.class_method_signature: PeerGroup.setDownloadTxDependencies(int depth)
focal_class.full_signature: public void setDownloadTxDependencies(int depth)
focal_class.identifier: setDownloadTxDependencies
focal_class.modifiers: public
focal_class.parameters: (int depth)
focal_class.return: void
focal_class.signature: void setDownloadTxDependencies(int depth)
focal_class.class_method_signature: PeerGroup.triggerConnections()
focal_class.full_signature: private void triggerConnections()
focal_class.identifier: triggerConnections
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void triggerConnections()
focal_class.class_method_signature: PeerGroup.getMaxConnections()
focal_class.full_signature: public int getMaxConnections()
focal_class.identifier: getMaxConnections
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxConnections()
focal_class.class_method_signature: PeerGroup.handleGetData(GetDataMessage m)
focal_class.full_signature: private List<Message> handleGetData(GetDataMessage m)
focal_class.identifier: handleGetData
focal_class.modifiers: private
focal_class.parameters: (GetDataMessage m)
focal_class.return: List<Message>
focal_class.signature: List<Message> handleGetData(GetDataMessage m)
focal_class.class_method_signature: PeerGroup.setVersionMessage(VersionMessage ver)
focal_class.full_signature: public void setVersionMessage(VersionMessage ver)
focal_class.identifier: setVersionMessage
focal_class.modifiers: public
focal_class.parameters: (VersionMessage ver)
focal_class.return: void
focal_class.signature: void setVersionMessage(VersionMessage ver)
focal_class.class_method_signature: PeerGroup.getVersionMessage()
focal_class.full_signature: public VersionMessage getVersionMessage()
focal_class.identifier: getVersionMessage
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: VersionMessage
focal_class.signature: VersionMessage getVersionMessage()
focal_class.class_method_signature: PeerGroup.setUserAgent(String name, String version, @Nullable String comments)
focal_class.full_signature: public void setUserAgent(String name, String version, @Nullable String comments)
focal_class.identifier: setUserAgent
focal_class.modifiers: public
focal_class.parameters: (String name, String version, @Nullable String comments)
focal_class.return: void
focal_class.signature: void setUserAgent(String name, String version, @Nullable String comments)
focal_class.class_method_signature: PeerGroup.updateVersionMessageRelayTxesBeforeFilter(VersionMessage ver)
focal_class.full_signature: private void updateVersionMessageRelayTxesBeforeFilter(VersionMessage ver)
focal_class.identifier: updateVersionMessageRelayTxesBeforeFilter
focal_class.modifiers: private
focal_class.parameters: (VersionMessage ver)
focal_class.return: void
focal_class.signature: void updateVersionMessageRelayTxesBeforeFilter(VersionMessage ver)
focal_class.class_method_signature: PeerGroup.setUserAgent(String name, String version)
focal_class.full_signature: public void setUserAgent(String name, String version)
focal_class.identifier: setUserAgent
focal_class.modifiers: public
focal_class.parameters: (String name, String version)
focal_class.return: void
focal_class.signature: void setUserAgent(String name, String version)
focal_class.class_method_signature: PeerGroup.addEventListener(AbstractPeerEventListener listener, Executor executor)
focal_class.full_signature: @Deprecated @SuppressWarnings("deprecation") public void addEventListener(AbstractPeerEventListener listener, Executor executor)
focal_class.identifier: addEventListener
focal_class.modifiers: @Deprecated @SuppressWarnings("deprecation") public
focal_class.parameters: (AbstractPeerEventListener listener, Executor executor)
focal_class.return: void
focal_class.signature: void addEventListener(AbstractPeerEventListener listener, Executor executor)
focal_class.class_method_signature: PeerGroup.addEventListener(AbstractPeerEventListener listener)
focal_class.full_signature: @Deprecated @SuppressWarnings("deprecation") public void addEventListener(AbstractPeerEventListener listener)
focal_class.identifier: addEventListener
focal_class.modifiers: @Deprecated @SuppressWarnings("deprecation") public
focal_class.parameters: (AbstractPeerEventListener listener)
focal_class.return: void
focal_class.signature: void addEventListener(AbstractPeerEventListener listener)
focal_class.class_method_signature: PeerGroup.addBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
focal_class.full_signature: public void addBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
focal_class.identifier: addBlocksDownloadedEventListener
focal_class.modifiers: public
focal_class.parameters: (BlocksDownloadedEventListener listener)
focal_class.return: void
focal_class.signature: void addBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
focal_class.class_method_signature: PeerGroup.addBlocksDownloadedEventListener(Executor executor, BlocksDownloadedEventListener listener)
focal_class.full_signature: public void addBlocksDownloadedEventListener(Executor executor, BlocksDownloadedEventListener listener)
focal_class.identifier: addBlocksDownloadedEventListener
focal_class.modifiers: public
focal_class.parameters: (Executor executor, BlocksDownloadedEventListener listener)
focal_class.return: void
focal_class.signature: void addBlocksDownloadedEventListener(Executor executor, BlocksDownloadedEventListener listener)
focal_class.class_method_signature: PeerGroup.addChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
focal_class.full_signature: public void addChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
focal_class.identifier: addChainDownloadStartedEventListener
focal_class.modifiers: public
focal_class.parameters: (ChainDownloadStartedEventListener listener)
focal_class.return: void
focal_class.signature: void addChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
focal_class.class_method_signature: PeerGroup.addChainDownloadStartedEventListener(Executor executor, ChainDownloadStartedEventListener listener)
focal_class.full_signature: public void addChainDownloadStartedEventListener(Executor executor, ChainDownloadStartedEventListener listener)
focal_class.identifier: addChainDownloadStartedEventListener
focal_class.modifiers: public
focal_class.parameters: (Executor executor, ChainDownloadStartedEventListener listener)
focal_class.return: void
focal_class.signature: void addChainDownloadStartedEventListener(Executor executor, ChainDownloadStartedEventListener listener)
focal_class.class_method_signature: PeerGroup.addConnectedEventListener(PeerConnectedEventListener listener)
focal_class.full_signature: public void addConnectedEventListener(PeerConnectedEventListener listener)
focal_class.identifier: addConnectedEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerConnectedEventListener listener)
focal_class.return: void
focal_class.signature: void addConnectedEventListener(PeerConnectedEventListener listener)
focal_class.class_method_signature: PeerGroup.addConnectedEventListener(Executor executor, PeerConnectedEventListener listener)
focal_class.full_signature: public void addConnectedEventListener(Executor executor, PeerConnectedEventListener listener)
focal_class.identifier: addConnectedEventListener
focal_class.modifiers: public
focal_class.parameters: (Executor executor, PeerConnectedEventListener listener)
focal_class.return: void
focal_class.signature: void addConnectedEventListener(Executor executor, PeerConnectedEventListener listener)
focal_class.class_method_signature: PeerGroup.addDisconnectedEventListener(PeerDisconnectedEventListener listener)
focal_class.full_signature: public void addDisconnectedEventListener(PeerDisconnectedEventListener listener)
focal_class.identifier: addDisconnectedEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerDisconnectedEventListener listener)
focal_class.return: void
focal_class.signature: void addDisconnectedEventListener(PeerDisconnectedEventListener listener)
focal_class.class_method_signature: PeerGroup.addDisconnectedEventListener(Executor executor, PeerDisconnectedEventListener listener)
focal_class.full_signature: public void addDisconnectedEventListener(Executor executor, PeerDisconnectedEventListener listener)
focal_class.identifier: addDisconnectedEventListener
focal_class.modifiers: public
focal_class.parameters: (Executor executor, PeerDisconnectedEventListener listener)
focal_class.return: void
focal_class.signature: void addDisconnectedEventListener(Executor executor, PeerDisconnectedEventListener listener)
focal_class.class_method_signature: PeerGroup.addDiscoveredEventListener(PeerDiscoveredEventListener listener)
focal_class.full_signature: public void addDiscoveredEventListener(PeerDiscoveredEventListener listener)
focal_class.identifier: addDiscoveredEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerDiscoveredEventListener listener)
focal_class.return: void
focal_class.signature: void addDiscoveredEventListener(PeerDiscoveredEventListener listener)
focal_class.class_method_signature: PeerGroup.addDiscoveredEventListener(Executor executor, PeerDiscoveredEventListener listener)
focal_class.full_signature: public void addDiscoveredEventListener(Executor executor, PeerDiscoveredEventListener listener)
focal_class.identifier: addDiscoveredEventListener
focal_class.modifiers: public
focal_class.parameters: (Executor executor, PeerDiscoveredEventListener listener)
focal_class.return: void
focal_class.signature: void addDiscoveredEventListener(Executor executor, PeerDiscoveredEventListener listener)
focal_class.class_method_signature: PeerGroup.addGetDataEventListener(GetDataEventListener listener)
focal_class.full_signature: public void addGetDataEventListener(GetDataEventListener listener)
focal_class.identifier: addGetDataEventListener
focal_class.modifiers: public
focal_class.parameters: (GetDataEventListener listener)
focal_class.return: void
focal_class.signature: void addGetDataEventListener(GetDataEventListener listener)
focal_class.class_method_signature: PeerGroup.addGetDataEventListener(final Executor executor, final GetDataEventListener listener)
focal_class.full_signature: public void addGetDataEventListener(final Executor executor, final GetDataEventListener listener)
focal_class.identifier: addGetDataEventListener
focal_class.modifiers: public
focal_class.parameters: (final Executor executor, final GetDataEventListener listener)
focal_class.return: void
focal_class.signature: void addGetDataEventListener(final Executor executor, final GetDataEventListener listener)
focal_class.class_method_signature: PeerGroup.addOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
focal_class.full_signature: public void addOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
focal_class.identifier: addOnTransactionBroadcastListener
focal_class.modifiers: public
focal_class.parameters: (OnTransactionBroadcastListener listener)
focal_class.return: void
focal_class.signature: void addOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
focal_class.class_method_signature: PeerGroup.addOnTransactionBroadcastListener(Executor executor, OnTransactionBroadcastListener listener)
focal_class.full_signature: public void addOnTransactionBroadcastListener(Executor executor, OnTransactionBroadcastListener listener)
focal_class.identifier: addOnTransactionBroadcastListener
focal_class.modifiers: public
focal_class.parameters: (Executor executor, OnTransactionBroadcastListener listener)
focal_class.return: void
focal_class.signature: void addOnTransactionBroadcastListener(Executor executor, OnTransactionBroadcastListener listener)
focal_class.class_method_signature: PeerGroup.addPreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
focal_class.full_signature: public void addPreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
focal_class.identifier: addPreMessageReceivedEventListener
focal_class.modifiers: public
focal_class.parameters: (PreMessageReceivedEventListener listener)
focal_class.return: void
focal_class.signature: void addPreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
focal_class.class_method_signature: PeerGroup.addPreMessageReceivedEventListener(Executor executor, PreMessageReceivedEventListener listener)
focal_class.full_signature: public void addPreMessageReceivedEventListener(Executor executor, PreMessageReceivedEventListener listener)
focal_class.identifier: addPreMessageReceivedEventListener
focal_class.modifiers: public
focal_class.parameters: (Executor executor, PreMessageReceivedEventListener listener)
focal_class.return: void
focal_class.signature: void addPreMessageReceivedEventListener(Executor executor, PreMessageReceivedEventListener listener)
focal_class.class_method_signature: PeerGroup.removeEventListener(AbstractPeerEventListener listener)
focal_class.full_signature: @Deprecated @SuppressWarnings("deprecation") public void removeEventListener(AbstractPeerEventListener listener)
focal_class.identifier: removeEventListener
focal_class.modifiers: @Deprecated @SuppressWarnings("deprecation") public
focal_class.parameters: (AbstractPeerEventListener listener)
focal_class.return: void
focal_class.signature: void removeEventListener(AbstractPeerEventListener listener)
focal_class.class_method_signature: PeerGroup.removeBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
focal_class.full_signature: public boolean removeBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
focal_class.identifier: removeBlocksDownloadedEventListener
focal_class.modifiers: public
focal_class.parameters: (BlocksDownloadedEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeBlocksDownloadedEventListener(BlocksDownloadedEventListener listener)
focal_class.class_method_signature: PeerGroup.removeChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
focal_class.full_signature: public boolean removeChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
focal_class.identifier: removeChainDownloadStartedEventListener
focal_class.modifiers: public
focal_class.parameters: (ChainDownloadStartedEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeChainDownloadStartedEventListener(ChainDownloadStartedEventListener listener)
focal_class.class_method_signature: PeerGroup.removeConnectedEventListener(PeerConnectedEventListener listener)
focal_class.full_signature: public boolean removeConnectedEventListener(PeerConnectedEventListener listener)
focal_class.identifier: removeConnectedEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerConnectedEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeConnectedEventListener(PeerConnectedEventListener listener)
focal_class.class_method_signature: PeerGroup.removeDisconnectedEventListener(PeerDisconnectedEventListener listener)
focal_class.full_signature: public boolean removeDisconnectedEventListener(PeerDisconnectedEventListener listener)
focal_class.identifier: removeDisconnectedEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerDisconnectedEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeDisconnectedEventListener(PeerDisconnectedEventListener listener)
focal_class.class_method_signature: PeerGroup.removeDiscoveredEventListener(PeerDiscoveredEventListener listener)
focal_class.full_signature: public boolean removeDiscoveredEventListener(PeerDiscoveredEventListener listener)
focal_class.identifier: removeDiscoveredEventListener
focal_class.modifiers: public
focal_class.parameters: (PeerDiscoveredEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeDiscoveredEventListener(PeerDiscoveredEventListener listener)
focal_class.class_method_signature: PeerGroup.removeGetDataEventListener(GetDataEventListener listener)
focal_class.full_signature: public boolean removeGetDataEventListener(GetDataEventListener listener)
focal_class.identifier: removeGetDataEventListener
focal_class.modifiers: public
focal_class.parameters: (GetDataEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeGetDataEventListener(GetDataEventListener listener)
focal_class.class_method_signature: PeerGroup.removeOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
focal_class.full_signature: public boolean removeOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
focal_class.identifier: removeOnTransactionBroadcastListener
focal_class.modifiers: public
focal_class.parameters: (OnTransactionBroadcastListener listener)
focal_class.return: boolean
focal_class.signature: boolean removeOnTransactionBroadcastListener(OnTransactionBroadcastListener listener)
focal_class.class_method_signature: PeerGroup.removePreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
focal_class.full_signature: public boolean removePreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
focal_class.identifier: removePreMessageReceivedEventListener
focal_class.modifiers: public
focal_class.parameters: (PreMessageReceivedEventListener listener)
focal_class.return: boolean
focal_class.signature: boolean removePreMessageReceivedEventListener(PreMessageReceivedEventListener listener)
focal_class.class_method_signature: PeerGroup.getConnectedPeers()
focal_class.full_signature: public List<Peer> getConnectedPeers()
focal_class.identifier: getConnectedPeers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Peer>
focal_class.signature: List<Peer> getConnectedPeers()
focal_class.class_method_signature: PeerGroup.getPendingPeers()
focal_class.full_signature: public List<Peer> getPendingPeers()
focal_class.identifier: getPendingPeers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<Peer>
focal_class.signature: List<Peer> getPendingPeers()
focal_class.class_method_signature: PeerGroup.addAddress(PeerAddress peerAddress)
focal_class.full_signature: public void addAddress(PeerAddress peerAddress)
focal_class.identifier: addAddress
focal_class.modifiers: public
focal_class.parameters: (PeerAddress peerAddress)
focal_class.return: void
focal_class.signature: void addAddress(PeerAddress peerAddress)
focal_class.class_method_signature: PeerGroup.addInactive(PeerAddress peerAddress)
focal_class.full_signature: private void addInactive(PeerAddress peerAddress)
focal_class.identifier: addInactive
focal_class.modifiers: private
focal_class.parameters: (PeerAddress peerAddress)
focal_class.return: void
focal_class.signature: void addInactive(PeerAddress peerAddress)
focal_class.class_method_signature: PeerGroup.setRequiredServices(long requiredServices)
focal_class.full_signature: public void setRequiredServices(long requiredServices)
focal_class.identifier: setRequiredServices
focal_class.modifiers: public
focal_class.parameters: (long requiredServices)
focal_class.return: void
focal_class.signature: void setRequiredServices(long requiredServices)
focal_class.class_method_signature: PeerGroup.addAddress(InetAddress address)
focal_class.full_signature: public void addAddress(InetAddress address)
focal_class.identifier: addAddress
focal_class.modifiers: public
focal_class.parameters: (InetAddress address)
focal_class.return: void
focal_class.signature: void addAddress(InetAddress address)
focal_class.class_method_signature: PeerGroup.addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_class.full_signature: public void addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_class.identifier: addPeerDiscovery
focal_class.modifiers: public
focal_class.parameters: (PeerDiscovery peerDiscovery)
focal_class.return: void
focal_class.signature: void addPeerDiscovery(PeerDiscovery peerDiscovery)
focal_class.class_method_signature: PeerGroup.discoverPeers()
focal_class.full_signature: protected int discoverPeers()
focal_class.identifier: discoverPeers
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int discoverPeers()
focal_class.class_method_signature: PeerGroup.waitForJobQueue()
focal_class.full_signature: @VisibleForTesting void waitForJobQueue()
focal_class.identifier: waitForJobQueue
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void waitForJobQueue()
focal_class.class_method_signature: PeerGroup.countConnectedAndPendingPeers()
focal_class.full_signature: private int countConnectedAndPendingPeers()
focal_class.identifier: countConnectedAndPendingPeers
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int countConnectedAndPendingPeers()
focal_class.class_method_signature: PeerGroup.maybeCheckForLocalhostPeer()
focal_class.full_signature: private boolean maybeCheckForLocalhostPeer()
focal_class.identifier: maybeCheckForLocalhostPeer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean maybeCheckForLocalhostPeer()
focal_class.class_method_signature: PeerGroup.startAsync()
focal_class.full_signature: public ListenableFuture startAsync()
focal_class.identifier: startAsync
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ListenableFuture
focal_class.signature: ListenableFuture startAsync()
focal_class.class_method_signature: PeerGroup.start()
focal_class.full_signature: public void start()
focal_class.identifier: start
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void start()
focal_class.class_method_signature: PeerGroup.stopAsync()
focal_class.full_signature: public ListenableFuture stopAsync()
focal_class.identifier: stopAsync
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ListenableFuture
focal_class.signature: ListenableFuture stopAsync()
focal_class.class_method_signature: PeerGroup.stop()
focal_class.full_signature: public void stop()
focal_class.identifier: stop
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stop()
focal_class.class_method_signature: PeerGroup.addWallet(Wallet wallet)
focal_class.full_signature: public void addWallet(Wallet wallet)
focal_class.identifier: addWallet
focal_class.modifiers: public
focal_class.parameters: (Wallet wallet)
focal_class.return: void
focal_class.signature: void addWallet(Wallet wallet)
focal_class.class_method_signature: PeerGroup.addPeerFilterProvider(PeerFilterProvider provider)
focal_class.full_signature: public ListenableFuture<BloomFilter> addPeerFilterProvider(PeerFilterProvider provider)
focal_class.identifier: addPeerFilterProvider
focal_class.modifiers: public
focal_class.parameters: (PeerFilterProvider provider)
focal_class.return: ListenableFuture<BloomFilter>
focal_class.signature: ListenableFuture<BloomFilter> addPeerFilterProvider(PeerFilterProvider provider)
focal_class.class_method_signature: PeerGroup.removePeerFilterProvider(PeerFilterProvider provider)
focal_class.full_signature: public void removePeerFilterProvider(PeerFilterProvider provider)
focal_class.identifier: removePeerFilterProvider
focal_class.modifiers: public
focal_class.parameters: (PeerFilterProvider provider)
focal_class.return: void
focal_class.signature: void removePeerFilterProvider(PeerFilterProvider provider)
focal_class.class_method_signature: PeerGroup.removeWallet(Wallet wallet)
focal_class.full_signature: public void removeWallet(Wallet wallet)
focal_class.identifier: removeWallet
focal_class.modifiers: public
focal_class.parameters: (Wallet wallet)
focal_class.return: void
focal_class.signature: void removeWallet(Wallet wallet)
focal_class.class_method_signature: PeerGroup.recalculateFastCatchupAndFilter(final FilterRecalculateMode mode)
focal_class.full_signature: public ListenableFuture<BloomFilter> recalculateFastCatchupAndFilter(final FilterRecalculateMode mode)
focal_class.identifier: recalculateFastCatchupAndFilter
focal_class.modifiers: public
focal_class.parameters: (final FilterRecalculateMode mode)
focal_class.return: ListenableFuture<BloomFilter>
focal_class.signature: ListenableFuture<BloomFilter> recalculateFastCatchupAndFilter(final FilterRecalculateMode mode)
focal_class.class_method_signature: PeerGroup.setBloomFilterFalsePositiveRate(double bloomFilterFPRate)
focal_class.full_signature: public void setBloomFilterFalsePositiveRate(double bloomFilterFPRate)
focal_class.identifier: setBloomFilterFalsePositiveRate
focal_class.modifiers: public
focal_class.parameters: (double bloomFilterFPRate)
focal_class.return: void
focal_class.signature: void setBloomFilterFalsePositiveRate(double bloomFilterFPRate)
focal_class.class_method_signature: PeerGroup.numConnectedPeers()
focal_class.full_signature: public int numConnectedPeers()
focal_class.identifier: numConnectedPeers
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int numConnectedPeers()
focal_class.class_method_signature: PeerGroup.connectTo(InetSocketAddress address)
focal_class.full_signature: @Nullable public Peer connectTo(InetSocketAddress address)
focal_class.identifier: connectTo
focal_class.modifiers: @Nullable public
focal_class.parameters: (InetSocketAddress address)
focal_class.return: Peer
focal_class.signature: Peer connectTo(InetSocketAddress address)
focal_class.class_method_signature: PeerGroup.connectToLocalHost()
focal_class.full_signature: @Nullable public Peer connectToLocalHost()
focal_class.identifier: connectToLocalHost
focal_class.modifiers: @Nullable public
focal_class.parameters: ()
focal_class.return: Peer
focal_class.signature: Peer connectToLocalHost()
focal_class.class_method_signature: PeerGroup.connectTo(PeerAddress address, boolean incrementMaxConnections, int connectTimeoutMillis)
focal_class.full_signature: @Nullable @GuardedBy("lock") protected Peer connectTo(PeerAddress address, boolean incrementMaxConnections, int connectTimeoutMillis)
focal_class.identifier: connectTo
focal_class.modifiers: @Nullable @GuardedBy("lock") protected
focal_class.parameters: (PeerAddress address, boolean incrementMaxConnections, int connectTimeoutMillis)
focal_class.return: Peer
focal_class.signature: Peer connectTo(PeerAddress address, boolean incrementMaxConnections, int connectTimeoutMillis)
focal_class.class_method_signature: PeerGroup.createPeer(PeerAddress address, VersionMessage ver)
focal_class.full_signature: @GuardedBy("lock") protected Peer createPeer(PeerAddress address, VersionMessage ver)
focal_class.identifier: createPeer
focal_class.modifiers: @GuardedBy("lock") protected
focal_class.parameters: (PeerAddress address, VersionMessage ver)
focal_class.return: Peer
focal_class.signature: Peer createPeer(PeerAddress address, VersionMessage ver)
focal_class.class_method_signature: PeerGroup.setConnectTimeoutMillis(int connectTimeoutMillis)
focal_class.full_signature: public void setConnectTimeoutMillis(int connectTimeoutMillis)
focal_class.identifier: setConnectTimeoutMillis
focal_class.modifiers: public
focal_class.parameters: (int connectTimeoutMillis)
focal_class.return: void
focal_class.signature: void setConnectTimeoutMillis(int connectTimeoutMillis)
focal_class.class_method_signature: PeerGroup.startBlockChainDownload(PeerDataEventListener listener)
focal_class.full_signature: public void startBlockChainDownload(PeerDataEventListener listener)
focal_class.identifier: startBlockChainDownload
focal_class.modifiers: public
focal_class.parameters: (PeerDataEventListener listener)
focal_class.return: void
focal_class.signature: void startBlockChainDownload(PeerDataEventListener listener)
focal_class.class_method_signature: PeerGroup.addDataEventListenerToPeer(Executor executor, Peer peer, PeerDataEventListener downloadListener)
focal_class.full_signature: private static void addDataEventListenerToPeer(Executor executor, Peer peer, PeerDataEventListener downloadListener)
focal_class.identifier: addDataEventListenerToPeer
focal_class.modifiers: private static
focal_class.parameters: (Executor executor, Peer peer, PeerDataEventListener downloadListener)
focal_class.return: void
focal_class.signature: void addDataEventListenerToPeer(Executor executor, Peer peer, PeerDataEventListener downloadListener)
focal_class.class_method_signature: PeerGroup.removeDataEventListenerFromPeer(Peer peer, PeerDataEventListener listener)
focal_class.full_signature: private static void removeDataEventListenerFromPeer(Peer peer, PeerDataEventListener listener)
focal_class.identifier: removeDataEventListenerFromPeer
focal_class.modifiers: private static
focal_class.parameters: (Peer peer, PeerDataEventListener listener)
focal_class.return: void
focal_class.signature: void removeDataEventListenerFromPeer(Peer peer, PeerDataEventListener listener)
focal_class.class_method_signature: PeerGroup.downloadBlockChain()
focal_class.full_signature: public void downloadBlockChain()
focal_class.identifier: downloadBlockChain
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void downloadBlockChain()
focal_class.class_method_signature: PeerGroup.handleNewPeer(final Peer peer)
focal_class.full_signature: protected void handleNewPeer(final Peer peer)
focal_class.identifier: handleNewPeer
focal_class.modifiers: protected
focal_class.parameters: (final Peer peer)
focal_class.return: void
focal_class.signature: void handleNewPeer(final Peer peer)
focal_class.class_method_signature: PeerGroup.setupPinging()
focal_class.full_signature: @SuppressWarnings("NonAtomicOperationOnVolatileField") private void setupPinging()
focal_class.identifier: setupPinging
focal_class.modifiers: @SuppressWarnings("NonAtomicOperationOnVolatileField") private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void setupPinging()
focal_class.class_method_signature: PeerGroup.setDownloadPeer(@Nullable Peer peer)
focal_class.full_signature: private void setDownloadPeer(@Nullable Peer peer)
focal_class.identifier: setDownloadPeer
focal_class.modifiers: private
focal_class.parameters: (@Nullable Peer peer)
focal_class.return: void
focal_class.signature: void setDownloadPeer(@Nullable Peer peer)
focal_class.class_method_signature: PeerGroup.getMemoryPool()
focal_class.full_signature: @Deprecated @Nullable public TxConfidenceTable getMemoryPool()
focal_class.identifier: getMemoryPool
focal_class.modifiers: @Deprecated @Nullable public
focal_class.parameters: ()
focal_class.return: TxConfidenceTable
focal_class.signature: TxConfidenceTable getMemoryPool()
focal_class.class_method_signature: PeerGroup.setFastCatchupTimeSecs(long secondsSinceEpoch)
focal_class.full_signature: public void setFastCatchupTimeSecs(long secondsSinceEpoch)
focal_class.identifier: setFastCatchupTimeSecs
focal_class.modifiers: public
focal_class.parameters: (long secondsSinceEpoch)
focal_class.return: void
focal_class.signature: void setFastCatchupTimeSecs(long secondsSinceEpoch)
focal_class.class_method_signature: PeerGroup.getFastCatchupTimeSecs()
focal_class.full_signature: public long getFastCatchupTimeSecs()
focal_class.identifier: getFastCatchupTimeSecs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getFastCatchupTimeSecs()
focal_class.class_method_signature: PeerGroup.handlePeerDeath(final Peer peer, @Nullable Throwable exception)
focal_class.full_signature: protected void handlePeerDeath(final Peer peer, @Nullable Throwable exception)
focal_class.identifier: handlePeerDeath
focal_class.modifiers: protected
focal_class.parameters: (final Peer peer, @Nullable Throwable exception)
focal_class.return: void
focal_class.signature: void handlePeerDeath(final Peer peer, @Nullable Throwable exception)
focal_class.class_method_signature: PeerGroup.setStallThreshold(int periodSecs, int bytesPerSecond)
focal_class.full_signature: public void setStallThreshold(int periodSecs, int bytesPerSecond)
focal_class.identifier: setStallThreshold
focal_class.modifiers: public
focal_class.parameters: (int periodSecs, int bytesPerSecond)
focal_class.return: void
focal_class.signature: void setStallThreshold(int periodSecs, int bytesPerSecond)
focal_class.class_method_signature: PeerGroup.startBlockChainDownloadFromPeer(Peer peer)
focal_class.full_signature: private void startBlockChainDownloadFromPeer(Peer peer)
focal_class.identifier: startBlockChainDownloadFromPeer
focal_class.modifiers: private
focal_class.parameters: (Peer peer)
focal_class.return: void
focal_class.signature: void startBlockChainDownloadFromPeer(Peer peer)
focal_class.class_method_signature: PeerGroup.waitForPeers(final int numPeers)
focal_class.full_signature: public ListenableFuture<List<Peer>> waitForPeers(final int numPeers)
focal_class.identifier: waitForPeers
focal_class.modifiers: public
focal_class.parameters: (final int numPeers)
focal_class.return: ListenableFuture<List<Peer>>
focal_class.signature: ListenableFuture<List<Peer>> waitForPeers(final int numPeers)
focal_class.class_method_signature: PeerGroup.waitForPeersOfVersion(final int numPeers, final long protocolVersion)
focal_class.full_signature: public ListenableFuture<List<Peer>> waitForPeersOfVersion(final int numPeers, final long protocolVersion)
focal_class.identifier: waitForPeersOfVersion
focal_class.modifiers: public
focal_class.parameters: (final int numPeers, final long protocolVersion)
focal_class.return: ListenableFuture<List<Peer>>
focal_class.signature: ListenableFuture<List<Peer>> waitForPeersOfVersion(final int numPeers, final long protocolVersion)
focal_class.class_method_signature: PeerGroup.findPeersOfAtLeastVersion(long protocolVersion)
focal_class.full_signature: public List<Peer> findPeersOfAtLeastVersion(long protocolVersion)
focal_class.identifier: findPeersOfAtLeastVersion
focal_class.modifiers: public
focal_class.parameters: (long protocolVersion)
focal_class.return: List<Peer>
focal_class.signature: List<Peer> findPeersOfAtLeastVersion(long protocolVersion)
focal_class.class_method_signature: PeerGroup.waitForPeersWithServiceMask(final int numPeers, final int mask)
focal_class.full_signature: public ListenableFuture<List<Peer>> waitForPeersWithServiceMask(final int numPeers, final int mask)
focal_class.identifier: waitForPeersWithServiceMask
focal_class.modifiers: public
focal_class.parameters: (final int numPeers, final int mask)
focal_class.return: ListenableFuture<List<Peer>>
focal_class.signature: ListenableFuture<List<Peer>> waitForPeersWithServiceMask(final int numPeers, final int mask)
focal_class.class_method_signature: PeerGroup.findPeersWithServiceMask(int mask)
focal_class.full_signature: public List<Peer> findPeersWithServiceMask(int mask)
focal_class.identifier: findPeersWithServiceMask
focal_class.modifiers: public
focal_class.parameters: (int mask)
focal_class.return: List<Peer>
focal_class.signature: List<Peer> findPeersWithServiceMask(int mask)
focal_class.class_method_signature: PeerGroup.getMinBroadcastConnections()
focal_class.full_signature: public int getMinBroadcastConnections()
focal_class.identifier: getMinBroadcastConnections
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMinBroadcastConnections()
focal_class.class_method_signature: PeerGroup.setMinBroadcastConnections(int value)
focal_class.full_signature: public void setMinBroadcastConnections(int value)
focal_class.identifier: setMinBroadcastConnections
focal_class.modifiers: public
focal_class.parameters: (int value)
focal_class.return: void
focal_class.signature: void setMinBroadcastConnections(int value)
focal_class.class_method_signature: PeerGroup.broadcastTransaction(final Transaction tx)
focal_class.full_signature: @Override public TransactionBroadcast broadcastTransaction(final Transaction tx)
focal_class.identifier: broadcastTransaction
focal_class.modifiers: @Override public
focal_class.parameters: (final Transaction tx)
focal_class.return: TransactionBroadcast
focal_class.signature: TransactionBroadcast broadcastTransaction(final Transaction tx)
focal_class.class_method_signature: PeerGroup.broadcastTransaction(final Transaction tx, final int minConnections)
focal_class.full_signature: public TransactionBroadcast broadcastTransaction(final Transaction tx, final int minConnections)
focal_class.identifier: broadcastTransaction
focal_class.modifiers: public
focal_class.parameters: (final Transaction tx, final int minConnections)
focal_class.return: TransactionBroadcast
focal_class.signature: TransactionBroadcast broadcastTransaction(final Transaction tx, final int minConnections)
focal_class.class_method_signature: PeerGroup.getPingIntervalMsec()
focal_class.full_signature: public long getPingIntervalMsec()
focal_class.identifier: getPingIntervalMsec
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getPingIntervalMsec()
focal_class.class_method_signature: PeerGroup.setPingIntervalMsec(long pingIntervalMsec)
focal_class.full_signature: public void setPingIntervalMsec(long pingIntervalMsec)
focal_class.identifier: setPingIntervalMsec
focal_class.modifiers: public
focal_class.parameters: (long pingIntervalMsec)
focal_class.return: void
focal_class.signature: void setPingIntervalMsec(long pingIntervalMsec)
focal_class.class_method_signature: PeerGroup.setMinRequiredProtocolVersion(int minRequiredProtocolVersion)
focal_class.full_signature: public void setMinRequiredProtocolVersion(int minRequiredProtocolVersion)
focal_class.identifier: setMinRequiredProtocolVersion
focal_class.modifiers: public
focal_class.parameters: (int minRequiredProtocolVersion)
focal_class.return: void
focal_class.signature: void setMinRequiredProtocolVersion(int minRequiredProtocolVersion)
focal_class.class_method_signature: PeerGroup.getMinRequiredProtocolVersion()
focal_class.full_signature: public int getMinRequiredProtocolVersion()
focal_class.identifier: getMinRequiredProtocolVersion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMinRequiredProtocolVersion()
focal_class.class_method_signature: PeerGroup.getMostCommonChainHeight()
focal_class.full_signature: public int getMostCommonChainHeight()
focal_class.identifier: getMostCommonChainHeight
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMostCommonChainHeight()
focal_class.class_method_signature: PeerGroup.getMostCommonChainHeight(final List<Peer> peers)
focal_class.full_signature: public static int getMostCommonChainHeight(final List<Peer> peers)
focal_class.identifier: getMostCommonChainHeight
focal_class.modifiers: public static
focal_class.parameters: (final List<Peer> peers)
focal_class.return: int
focal_class.signature: int getMostCommonChainHeight(final List<Peer> peers)
focal_class.class_method_signature: PeerGroup.selectDownloadPeer(List<Peer> peers)
focal_class.full_signature: @Nullable protected Peer selectDownloadPeer(List<Peer> peers)
focal_class.identifier: selectDownloadPeer
focal_class.modifiers: @Nullable protected
focal_class.parameters: (List<Peer> peers)
focal_class.return: Peer
focal_class.signature: Peer selectDownloadPeer(List<Peer> peers)
focal_class.class_method_signature: PeerGroup.getDownloadPeer()
focal_class.full_signature: public Peer getDownloadPeer()
focal_class.identifier: getDownloadPeer
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Peer
focal_class.signature: Peer getDownloadPeer()
focal_class.class_method_signature: PeerGroup.getMaxPeersToDiscoverCount()
focal_class.full_signature: public int getMaxPeersToDiscoverCount()
focal_class.identifier: getMaxPeersToDiscoverCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getMaxPeersToDiscoverCount()
focal_class.class_method_signature: PeerGroup.setMaxPeersToDiscoverCount(int maxPeersToDiscoverCount)
focal_class.full_signature: public void setMaxPeersToDiscoverCount(int maxPeersToDiscoverCount)
focal_class.identifier: setMaxPeersToDiscoverCount
focal_class.modifiers: public
focal_class.parameters: (int maxPeersToDiscoverCount)
focal_class.return: void
focal_class.signature: void setMaxPeersToDiscoverCount(int maxPeersToDiscoverCount)
focal_class.class_method_signature: PeerGroup.getUseLocalhostPeerWhenPossible()
focal_class.full_signature: public boolean getUseLocalhostPeerWhenPossible()
focal_class.identifier: getUseLocalhostPeerWhenPossible
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean getUseLocalhostPeerWhenPossible()
focal_class.class_method_signature: PeerGroup.setUseLocalhostPeerWhenPossible(boolean useLocalhostPeerWhenPossible)
focal_class.full_signature: public void setUseLocalhostPeerWhenPossible(boolean useLocalhostPeerWhenPossible)
focal_class.identifier: setUseLocalhostPeerWhenPossible
focal_class.modifiers: public
focal_class.parameters: (boolean useLocalhostPeerWhenPossible)
focal_class.return: void
focal_class.signature: void setUseLocalhostPeerWhenPossible(boolean useLocalhostPeerWhenPossible)
focal_class.class_method_signature: PeerGroup.isRunning()
focal_class.full_signature: public boolean isRunning()
focal_class.identifier: isRunning
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRunning()
focal_class.class_method_signature: PeerGroup.setBloomFilteringEnabled(boolean bloomFilteringEnabled)
focal_class.full_signature: public void setBloomFilteringEnabled(boolean bloomFilteringEnabled)
focal_class.identifier: setBloomFilteringEnabled
focal_class.modifiers: public
focal_class.parameters: (boolean bloomFilteringEnabled)
focal_class.return: void
focal_class.signature: void setBloomFilteringEnabled(boolean bloomFilteringEnabled)
focal_class.class_method_signature: PeerGroup.isBloomFilteringEnabled()
focal_class.full_signature: public boolean isBloomFilteringEnabled()
focal_class.identifier: isBloomFilteringEnabled
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isBloomFilteringEnabled()
focal_method.body: public ListenableFuture<List<Peer>> waitForPeersOfVersion(final int numPeers, final long protocolVersion) {
          List<Peer> foundPeers = findPeersOfAtLeastVersion(protocolVersion);
          if (foundPeers.size() >= numPeers) {
              return Futures.immediateFuture(foundPeers);
          }
          final SettableFuture<List<Peer>> future = SettableFuture.create();
          addConnectedEventListener(new PeerConnectedEventListener() {
              @Override
              public void onPeerConnected(Peer peer, int peerCount) {
                  final List<Peer> peers = findPeersOfAtLeastVersion(protocolVersion);
                  if (peers.size() >= numPeers) {
                      future.set(peers);
                      removeConnectedEventListener(this);
                  }
              }
          });
          return future;
      }
focal_method.class_method_signature: PeerGroup.waitForPeersOfVersion(final int numPeers, final long protocolVersion)
focal_method.full_signature: public ListenableFuture<List<Peer>> waitForPeersOfVersion(final int numPeers, final long protocolVersion)
focal_method.identifier: waitForPeersOfVersion
focal_method.invocations: findPeersOfAtLeastVersion size immediateFuture create addConnectedEventListener findPeersOfAtLeastVersion size set removeConnectedEventListener
focal_method.modifiers: public
focal_method.parameters: (final int numPeers, final long protocolVersion)
focal_method.return: ListenableFuture<List<Peer>>
focal_method.signature: ListenableFuture<List<Peer>> waitForPeersOfVersion(final int numPeers, final long protocolVersion)