public class FullPSync2017 extends PSyncProducerBase implements SegmentFetcher.OnError
| Modifier and Type | Class and Description |
|---|---|
static interface |
FullPSync2017.CanAddReceivedName |
static interface |
FullPSync2017.CanAddToSyncData |
static interface |
FullPSync2017.OnNamesUpdate |
class |
FullPSync2017.PendingEntryInfoFull |
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_SYNC_INTEREST_LIFETIME |
static double |
DEFAULT_SYNC_REPLY_FRESHNESS_PERIOD |
expectedNEntries_, hashToName_, iblt_, nameToHash_, syncPrefix_, syncReplyFreshnessPeriod_, threshold_| Constructor and Description |
|---|
FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain)
Create a FullPSync2017, where syncInterestLifetime is
DEFAULT_SYNC_INTEREST_LIFETIME, syncReplyFreshnessPeriod is
DEFAULT_SYNC_REPLY_FRESHNESS_PERIOD and signingInfo is the default
SigningInfo().
|
FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain,
double syncInterestLifetime,
double syncReplyFreshnessPeriod)
Create a FullPSync2017, where signingInfo is the default SigningInfo().
|
FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain,
double syncInterestLifetime,
double syncReplyFreshnessPeriod,
SigningInfo signingInfo)
Create a FullPSync2017.
|
FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain,
double syncInterestLifetime,
double syncReplyFreshnessPeriod,
SigningInfo signingInfo,
FullPSync2017.CanAddToSyncData canAddToSyncData,
FullPSync2017.CanAddReceivedName canAddReceivedName)
Create a FullPSync2017.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onError(SegmentFetcher.ErrorCode errorCode,
String message) |
void |
publishName(Name name)
Publish the Name to inform the others.
|
insertIntoIblt, onRegisterFailed, removeFromIbltpublic static final double DEFAULT_SYNC_INTEREST_LIFETIME
public static final double DEFAULT_SYNC_REPLY_FRESHNESS_PERIOD
public FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain,
double syncInterestLifetime,
double syncReplyFreshnessPeriod,
SigningInfo signingInfo,
FullPSync2017.CanAddToSyncData canAddToSyncData,
FullPSync2017.CanAddReceivedName canAddReceivedName)
throws IOException,
SecurityException
expectedNEntries - The expected number of entries in the IBLT.face - The application's Face.syncPrefix - The prefix Name of the sync group, which is copied.onNamesUpdate - When there are new names, this calls
onNamesUpdate.onNamesUpdate(names) where names is a list of Names. However,
see the canAddReceivedName callback which can control which names are added.
NOTE: The library will log any exceptions thrown by this callback, but for
better error handling the callback should catch and properly handle any
exceptions.keyChain - The KeyChain for signing Data packets.syncInterestLifetime - The Interest lifetime for the sync Interests,
in milliseconds.syncReplyFreshnessPeriod - The freshness period of the sync Data
packet, in milliseconds.signingInfo - The SigningInfo for signing Data packets, which is
copied.canAddToSyncData - When a new IBLT is received in a sync
Interest, this calls canAddToSyncData.canAddToSyncData(name, negative)
where Name is the candidate Name to add to the response Data packet of
Names, and negative is the set of names that the other's user's Name set,
but not in our own Name set. If the callback returns false, then this does
not report the Name to the other user. However, if canAddToSyncData is
null, then each name is reported.canAddReceivedName - When new names are received, this calls
canAddReceivedName.canAddReceivedName(name) for each name. If the callback
returns false, then this does not add to the IBLT or report to the
application with onNamesUpdate. However, if canAddReceivedName is null,
then each name is added.IOExceptionSecurityExceptionpublic FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain,
double syncInterestLifetime,
double syncReplyFreshnessPeriod,
SigningInfo signingInfo)
throws IOException,
SecurityException
expectedNEntries - The expected number of entries in the IBLT.face - The application's Face.syncPrefix - The prefix Name of the sync group, which is copied.onNamesUpdate - When there are new names, this calls
onNamesUpdate.onNamesUpdate(names) where names is a list of Names. However,
see the canAddReceivedName callback which can control which names are added.
NOTE: The library will log any exceptions thrown by this callback, but for
better error handling the callback should catch and properly handle any
exceptions.keyChain - The KeyChain for signing Data packets.syncInterestLifetime - The Interest lifetime for the sync Interests,
in milliseconds.syncReplyFreshnessPeriod - The freshness period of the sync Data
packet, in milliseconds.signingInfo - The SigningInfo for signing Data packets, which is
copied.IOExceptionSecurityExceptionpublic FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain,
double syncInterestLifetime,
double syncReplyFreshnessPeriod)
throws IOException,
SecurityException
expectedNEntries - The expected number of entries in the IBLT.face - The application's Face.syncPrefix - The prefix Name of the sync group, which is copied.onNamesUpdate - When there are new names, this calls
onNamesUpdate.onNamesUpdate(names) where names is a list of Names. However,
see the canAddReceivedName callback which can control which names are added.
NOTE: The library will log any exceptions thrown by this callback, but for
better error handling the callback should catch and properly handle any
exceptions.keyChain - The KeyChain for signing Data packets.syncInterestLifetime - The Interest lifetime for the sync Interests,
in milliseconds.syncReplyFreshnessPeriod - The freshness period of the sync Data
packet, in milliseconds.IOExceptionSecurityExceptionpublic FullPSync2017(int expectedNEntries,
Face face,
Name syncPrefix,
FullPSync2017.OnNamesUpdate onNamesUpdate,
KeyChain keyChain)
throws IOException,
SecurityException
expectedNEntries - The expected number of entries in the IBLT.face - The application's Face.syncPrefix - The prefix Name of the sync group, which is copied.onNamesUpdate - When there are new names, this calls
onNamesUpdate.onNamesUpdate(names) where names is a list of Names. However,
see the canAddReceivedName callback which can control which names are added.
NOTE: The library will log any exceptions thrown by this callback, but for
better error handling the callback should catch and properly handle any
exceptions.keyChain - The KeyChain for signing Data packets.IOExceptionSecurityExceptionpublic final void publishName(Name name)
name - The Name to publish.public final void onError(SegmentFetcher.ErrorCode errorCode, String message)
onError in interface SegmentFetcher.OnErrorCopyright © 2019. All rights reserved.