public void setRequiredServices(long requiredServices) {
        lock.lock();
        try {
            this.requiredServices = requiredServices;
            peerDiscoverers.clear();
            addPeerDiscovery(MultiplexingDiscovery.forServices(params, requiredServices));
        } finally {
            lock.unlock();
        }
    }
public void setRequiredServices ( long requiredServices ) { lock . lock ( ) ; try { this . requiredServices = requiredServices ; peerDiscoverers . clear ( ) ; addPeerDiscovery ( MultiplexingDiscovery . forServices ( params , requiredServices ) ) ; } finally { lock . unlock ( ) ; } }
Convenience for connecting only to peers that can serve specific services. It will configure suitable peer
discoveries.
@param requiredServices Required services as a bitmask, e.g. {@link VersionMessage#NODE_NETWORK}.