net.tomp2p.p2p.config
Class ConfigurationStore
java.lang.Object
net.tomp2p.p2p.config.ConfigurationBase
net.tomp2p.p2p.config.ConfigurationBaseDHT
net.tomp2p.p2p.config.ConfigurationStore
public class ConfigurationStore
- extends ConfigurationBaseDHT
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfigurationStore
public ConfigurationStore()
isStoreIfAbsent
public boolean isStoreIfAbsent()
setStoreIfAbsent
public ConfigurationStore setStoreIfAbsent(boolean absent)
- If set to true, it only stores data on peers that do not have it.
FutureDHT reports back what keys have been stored on which peers (
FutureDHT.getRawKeys()
. The evaluation if it was successful or
not cannot be done by TomP2P, since FutureDHT e.g. may report that it was
stored on peer A, but peer B already has it. Instead a Map> is returned, which tells you on what peer the
value has been stored. If you store key1 and key2 and FutureDHT tells you
peerA:key1, then you know, that key1 was absent, while key2 was already
there.
- Parameters:
absent
- True if the value should only be stored if not already
present
- Returns:
- This instance.
setProtectDomain
public ConfigurationBase setProtectDomain(boolean protectDomain)
isProtectDomain
public boolean isProtectDomain()
setRefreshSeconds
public ConfigurationStore setRefreshSeconds(int refreshSeconds)
getRefreshSeconds
public int getRefreshSeconds()
setFutureCreate
public ConfigurationStore setFutureCreate(FutureCreate<FutureDHT> futureCreate)
getFutureCreate
public FutureCreate<FutureDHT> getFutureCreate()
Copyright © 2012. All Rights Reserved.