public class PSyncSegmentPublisher extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SEGMENTS_STORED |
| Constructor and Description |
|---|
PSyncSegmentPublisher(Face face,
KeyChain keyChain)
Create a PSyncSegmentPublisher where inMemoryStorageLimit is
MAX_SEGMENTS_STORED.
|
PSyncSegmentPublisher(Face face,
KeyChain keyChain,
int inMemoryStorageLimit)
Create a PSyncSegmentPublisher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
publish(Name interestName,
Name dataName,
Blob content,
double freshnessPeriod)
Put all the segments in the memory store, where signingInfo is the default
SigningInfo().
|
void |
publish(Name interestName,
Name dataName,
Blob content,
double freshnessPeriod,
SigningInfo signingInfo)
Put all the segments in the memory store.
|
boolean |
replyFromStore(Name interestName)
Try to reply to the Interest name from the memory store.
|
public static final int MAX_SEGMENTS_STORED
public PSyncSegmentPublisher(Face face, KeyChain keyChain, int inMemoryStorageLimit)
face - The application's Face.keyChain - The KeyChain for signing Data packets.inMemoryStorageLimit - The limit for the in-memory storage.public final void publish(Name interestName, Name dataName, Blob content, double freshnessPeriod, SigningInfo signingInfo) throws EncodingException, TpmBackEnd.Error, PibImpl.Error, KeyChain.Error, IOException
interestName - If the Interest name ends in a segment, immediately
send the Data packet for the segment to the Face.dataName - The Data name, which has components after the Interest name.content - The content of the data to be segmented.freshnessPeriod - The freshness period of the segments, in milliseconds.signingInfo - The SigningInfo for signing segment Data packets.EncodingExceptionTpmBackEnd.ErrorPibImpl.ErrorKeyChain.ErrorIOExceptionpublic final void publish(Name interestName, Name dataName, Blob content, double freshnessPeriod) throws EncodingException, TpmBackEnd.Error, PibImpl.Error, KeyChain.Error, IOException
interestName - If the Interest name ends in a segment, immediately
send the Data packet for the segment to the Face.dataName - The Data name, which has components after the Interest name.content - The content of the data to be segmented.freshnessPeriod - The freshness period of the segments, in milliseconds.EncodingExceptionTpmBackEnd.ErrorPibImpl.ErrorKeyChain.ErrorIOExceptionpublic final boolean replyFromStore(Name interestName) throws IOException
interestName - The Interest name for looking up in the memory store.IOExceptionCopyright © 2019. All rights reserved.