Public Member Functions | |
InterestData (ContentName basename) | |
An Interest with unbounded timespan. | |
InterestData (ContentName basename, VersionNumber startTime) | |
An Interest with only a lower bound. | |
InterestData (ContentName basename, VersionNumber startTime, VersionNumber stopTime) | |
synchronized int | size () |
synchronized boolean | equals (Object obj) throws ClassCastException |
Implement equals based on name, startTime, stopTime, and the excluded version numbers. | |
synchronized int | hashCode () |
Implement hashCode() so we can ensure consistency with equals. | |
synchronized void | setStartTime (VersionNumber startTime) |
Dont do this while in a sorted set, as the sort order will break. | |
synchronized void | setStopTime (VersionNumber stopTime) |
stopTime is the maximum version to include. | |
synchronized boolean | addExclude (VersionNumber version) |
Returns false if too many excludes in this Interest. | |
synchronized Interest | buildInterest () |
Interest | getLastInterest () |
return the last interest built. | |
synchronized boolean | contains (VersionNumber version) |
Is version contained in [startTime, stopTime]? Uses UNSIGNED COMPARISON. | |
String | toString () |
String | dumpContents () |
synchronized InterestData | splitLeft (int count) |
Split this object to the left, transferring count elements. | |
synchronized InterestData | splitRight (int count) |
Split this object to the right, transferring count elements. | |
void | transferLeft (InterestData left, int count) |
transfer count items from head of exclusion list to left. | |
void | transferRight (InterestData right, int count) |
transfer count items from tail of exclusion list to right. | |
synchronized VersionNumber | getStartVersion () |
synchronized VersionNumber | getStopVersion () |
synchronized long | getWidth () |
synchronized double | getDensity () |
synchronized boolean | validate () |
Sanity check that all the excluded versions fall between [start, stop] inclusive, using unsigned comparison. | |
Protected Member Functions | |
synchronized void | addExcludeUnbounded (VersionNumber version) |
Used internally. | |
Classes | |
class | StartTimeComparator |
This class does not do any network transactions, it only stores state about a specific interest and will generate a new Interest message based on its current start, stop, and exclusion list.
org.ccnx.ccn.profiles.versioning.InterestData.InterestData | ( | ContentName | basename | ) |
An Interest with unbounded timespan.
basename |
org.ccnx.ccn.profiles.versioning.InterestData.InterestData | ( | ContentName | basename, | |
VersionNumber | startTime | |||
) |
An Interest with only a lower bound.
basename | ||
startTime |
org.ccnx.ccn.profiles.versioning.InterestData.InterestData | ( | ContentName | basename, | |
VersionNumber | startTime, | |||
VersionNumber | stopTime | |||
) |
startTime | minimum version to include. | |
stopTime | maximum version to include. |
synchronized void org.ccnx.ccn.profiles.versioning.InterestData.setStartTime | ( | VersionNumber | startTime | ) |
Dont do this while in a sorted set, as the sort order will break.
Start time is the minimum version to include. in milliseconds (not binarytime)
startTime | minimum version to include (milliseconds). The earliest time is NO_START_TIME. if a startTime < NO_START_TIME is given (e.g. 0), NO_START_TIME is used. |
synchronized void org.ccnx.ccn.profiles.versioning.InterestData.setStopTime | ( | VersionNumber | stopTime | ) |
stopTime is the maximum version to include.
use NO_STOP_TIME for infinity. If a greater value (unsigned comparison) is given, NO_STOP_TIME is used. in milliseconds (not binarytime)
synchronized boolean org.ccnx.ccn.profiles.versioning.InterestData.addExclude | ( | VersionNumber | version | ) |
Returns false if too many excludes in this Interest.
version |
synchronized boolean org.ccnx.ccn.profiles.versioning.InterestData.contains | ( | VersionNumber | version | ) |
Is version contained in [startTime, stopTime]? Uses UNSIGNED COMPARISON.
version |
void org.ccnx.ccn.profiles.versioning.InterestData.transferLeft | ( | InterestData | left, | |
int | count | |||
) |
transfer count items from head of exclusion list to left.
Caller has verified that count items will fit in left.
left | ||
count |
void org.ccnx.ccn.profiles.versioning.InterestData.transferRight | ( | InterestData | right, | |
int | count | |||
) |
transfer count items from tail of exclusion list to right.
Caller has verified that count items will fit in right.
right | ||
count |
synchronized long org.ccnx.ccn.profiles.versioning.InterestData.getWidth | ( | ) |
synchronized boolean org.ccnx.ccn.profiles.versioning.InterestData.validate | ( | ) |
Sanity check that all the excluded versions fall between [start, stop] inclusive, using unsigned comparison.
synchronized void org.ccnx.ccn.profiles.versioning.InterestData.addExcludeUnbounded | ( | VersionNumber | version | ) | [protected] |
Used internally.
Sometimes we want to intentionally overflow
version |