mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-16 04:05:50 +00:00
Add PeerGroup.clearListeners(). Resolves issue 426.
This commit is contained in:
parent
4e95ab3cfc
commit
2c26f8802b
@ -450,6 +450,14 @@ public class PeerGroup extends AbstractIdleService implements TransactionBroadca
|
|||||||
return ListenerRegistration.removeFromList(listener, peerEventListeners);
|
return ListenerRegistration.removeFromList(listener, peerEventListeners);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all event listeners simultaneously. Note that this includes listeners added internally by the framework
|
||||||
|
* so it's generally not advised to use this - it exists for special purposes only.
|
||||||
|
*/
|
||||||
|
public void clearEventListeners() {
|
||||||
|
peerEventListeners.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a newly allocated list containing the currently connected peers. If all you care about is the count,
|
* Returns a newly allocated list containing the currently connected peers. If all you care about is the count,
|
||||||
* use numConnectedPeers().
|
* use numConnectedPeers().
|
||||||
|
Loading…
x
Reference in New Issue
Block a user