⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rdvconfigadv.java

📁 JXTA&#8482 is a set of open, generalized peer-to-peer (P2P) protocols that allow any networked devi
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
     *                 rendezvous.     */    public void setConfiguration(RendezVousConfiguration newstate) {        configuration = newstate;    }    /**     * The interval in relative milliseconds at which this peer will re-evaluate     * it's state as a rendezvous. If <code>0</code> (zero), the default, then     * the peer will remain in the state of <code>isRendezvous</code>.     *     * @return The interval in relative milliseconds at which this peer will re-evaluate     *         it's state as a rendezvous. If <code>0</code> (zero), the default, then     *         the peer will remain in the state of <code>isRendezvous</code>.     */    public long getAutoRendezvousCheckInterval() {        return autoRendezvousCheckInterval;    }    /**     * Sets the interval in relative milliseconds at which this peer will re-evaluate     * it's state as a rendezvous. If <code>0</code> (zero), the default, then     * the peer will remain in the state of <code>isRendezvous</code>.     *     * @param newvalue The interval in relative milliseconds at which this peer     *                 will re-evaluate it's state as a rendezvous. If <code>0</code> (zero),     *                 the default, then the peer will remain in the state of     *                 <code>isRendezvous</code>.     */    public void setAutoRendezvousCheckInterval(long newvalue) {        if (newvalue < 0) {            throw new IllegalArgumentException("Auto Rendezvous Check Interval must be >= 0");        }        autoRendezvousCheckInterval = newvalue;    }    /**     * If true then rendezvous clients will probe relay servers for rendezvous.     *     * @return If true then rendezvous clients will probe relay servers for rendezvous.     */    public boolean getProbeRelays() {        return probeRelays;    }    /**     * Set whether rendezvous clients will probe relay servers for rendezvous.     *     * @param doProbe If true then rendezvous clients will probe relay servers for rendezvous.     */    public void setProbeRelays(boolean doProbe) {        probeRelays = doProbe;    }    public URI[] getSeedRendezvous() {        return seedRendezvous.toArray(new URI[seedRendezvous.size()]);    }    public void addSeedRendezvous(URI addr) {        if (null == addr) {            throw new IllegalArgumentException("addr may not be null");        }        seedRendezvous.add(addr);    }    public void addSeedRendezvous(String addr) {        if (null == addr) {            throw new IllegalArgumentException("addr may not be null");        }        seedRendezvous.add(URI.create(addr));    }    public boolean removeSeedRendezvous(URI addr) {        if (null == addr) {            throw new IllegalArgumentException("addr may not be null");        }        return seedRendezvous.remove(addr);    }    public void clearSeedRendezvous() {        seedRendezvous.clear();    }    public URI[] getSeedingURIs() {        return seedingURIs.toArray(new URI[seedingURIs.size()]);    }    public void addSeedingURI(URI addr) {        if (null == addr) {            throw new IllegalArgumentException("addr may not be null");        }        seedingURIs.add(addr);    }    public void addSeedingURI(String addr) {        if (null == addr) {            throw new IllegalArgumentException("addr may not be null");        }        seedingURIs.add(URI.create(addr));    }    public boolean removeSeedingURI(URI addr) {        if (null == addr) {            throw new IllegalArgumentException("addr may not be null");        }        return seedingURIs.remove(addr);    }    public void clearSeedingURIs() {        seedingURIs.clear();    }    /**     * If true then this peer will use only seed rendezvous when configured as     * an edge peer.     *     * @return If true then this peer will use only seed rendezvous when     *         configured as an edge peer.     */    public boolean getUseOnlySeeds() {        return useOnlySeeds;    }    /**     * Set whether this peer will use only seed rendezvous when configured as     * an edge peer.     *     * @param onlySeeds If true then this peer will use only seed rendezvous     *                  when configured as an edge peer.     */    public void setUseOnlySeeds(boolean onlySeeds) {        useOnlySeeds = onlySeeds;    }    /**     * The interval in relative milliseconds before which this peer will     * attempt to contact the the seed peers.     *     * @return The interval in relative milliseconds before which this peer will     *         attempt to contact the the seed peers.     */    public long getSeedRendezvousConnectDelay() {        return seedRendezvousConnectDelay;    }    /**     * Sets the interval in relative milliseconds before which this peer will     * attempt to contact the the seed peers.     *     * @param newvalue The interval in relative milliseconds before which this peer will     *                 attempt to contact the the seed peers  or     *                 <code>-1</code> for the default value.     */    public void setSeedRendezvousConnectDelay(long newvalue) {        if ((-1 != newvalue) && (newvalue < 0)) {            throw new IllegalArgumentException("Seed Rendezvous Connect Delay must be >= 0");        }        seedRendezvousConnectDelay = newvalue;    }    /**     * The interval in relative milliseconds of leases offered by rendezvous     * peers.     *     * @return The interval in relative milliseconds of leases offered by rendezvous     *         peers.     */    public long getLeaseDuration() {        return leaseDuration;    }    /**     * Sets interval in relative milliseconds of leases to be offered by rendezvous     * peers.     *     * @param newvalue The interval in relative milliseconds of leases to be  offered by rendezvous     *                 peers  or  <code>-1</code> for the default value.     */    public void setLeaseDuration(long newvalue) {        if ((-1 != newvalue) && (newvalue < 0)) {            throw new IllegalArgumentException("Lease Duration must be >= 0");        }        leaseDuration = newvalue;    }    /**     * The interval in relative milliseconds of leases offered by rendezvous     * peers.     *     * @return The interval in relative milliseconds of leases offered by rendezvous     *         peers.     */    public long getLeaseMargin() {        return leaseMargin;    }    /**     * Sets interval in relative milliseconds of leases to be offered by rendezvous     * peers.     *     * @param newvalue The interval in relative milliseconds of leases to be  offered by rendezvous     *                 peers  or     *                 <code>-1</code> for the default value.     */    public void setLeaseMargin(long newvalue) {        if ((-1 != newvalue) && (newvalue < 0)) {            throw new IllegalArgumentException("Lease Margin must be >= 0");        }        leaseMargin = newvalue;    }    /**     * Return the maximum number of clients.     *     * @return The maximum number of clients.     */    public int getMaxClients() {        return maxClients;    }    /**     * Sets he maximum number of clients.     *     * @param newvalue The maximum number of clients or     *                 <code>-1</code> for the default value.     */    public void setMaxClients(int newvalue) {        if ((-1 != newvalue) && (newvalue <= 0)) {            throw new IllegalArgumentException("Max Clients must be > 0");        }        maxClients = newvalue;    }    /**     * Returns the maximum TTL for messages propagated by this peer or     * -1 for the default value.     *     * @return the maximum TTL for messages propagated by this peer or     *         -1 for the default value.     */    public int getMaxTTL() {        return maximumTTL;    }    /**     * Sets the maximum TTL for messages propagated by this peer.     *     * @param newvalue the maximum TTL for messages propagated by this peer or     *                 <code>-1</code> for the default value.     */    public void setMaxTTL(int newvalue) {        if ((-1 != newvalue) && (newvalue <= 0)) {            throw new IllegalArgumentException("Max TTL must be >= 0");        }        maximumTTL = newvalue;    }    /**     * Returns the minimum peerview size which the rendezvous service will     * find sufficient.     *     * @return the minimum peerview size.     */    public int getMinHappyPeerView() {        return minHappyPeerView;    }    /**     * Sets the minimum peerview size which the rendezvous service will find     * sufficient.  If the peerview size is below that threshold, the peerview     * will more aggressively try to discover additional members. If permitted,     * the local peer may eventually decide to become a rendezvous in order for     * the peerview to reach that size.     *     * @param newvalue the minimum peerview size, which must be > 0 or     *                 <code>-1</code> for the default value.     */    public void setMinHappyPeerView(int newvalue) {        if ((-1 != newvalue) && (newvalue <= 0)) {            throw new IllegalArgumentException("Min Happy Peer View size must be > 0");        }        minHappyPeerView = newvalue;    }    /**     * Return ACL URI if set     *     * @return ACL URI if set, null otherwise     */    public URI getAclUri() {        return aclURI;    }    /**     * Sets ACL URI     *     * @param uri URI if set, null otherwise     */    public void setAclUri(URI uri) {        aclURI = uri;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -