Public Member Functions | |
LocalCopyWrapper (CCNNetworkObject<?> obj) throws IOException | |
CCNNetworkObject<?> | object () |
void | addListener (UpdateListener listener) |
void | removeListener (UpdateListener listener) |
void | clearListeners () |
boolean | available () |
boolean | isSaved () throws IOException |
boolean | hasError () |
IOException | getError () |
void | clearError () |
boolean | contentEquals (Object obj) |
byte[] | getContentDigest () throws IOException |
void | close () |
void | disableFlowControl () |
int | hashCode () |
boolean | equals (Object obj) |
Long | firstSegmentNumber () |
ContentName | getBaseName () |
PublisherPublicKeyDigest | getContentPublisher () throws IOException |
LinkObject | getDereferencedLink () |
byte[] | getFirstDigest () |
KeyLocator | getPublisherKeyLocator () throws IOException |
CCNTime | getVersion () throws IOException |
byte[] | getVersionComponent () throws IOException |
ContentName | getVersionedName () |
boolean | isGone () |
boolean | save () throws ContentEncodingException, IOException |
boolean | save (CCNTime version) throws ContentEncodingException, IOException |
boolean | saveAsGone () throws ContentEncodingException, IOException |
SaveType | saveType () |
void | setOurPublisherInformation (PublisherPublicKeyDigest publisherIdentity, KeyLocator keyLocator) |
boolean | update () throws ContentDecodingException, IOException |
boolean | update (ContentName name, PublisherPublicKeyDigest publisher) throws ContentDecodingException, IOException |
boolean | update (long timeout) throws ContentDecodingException, IOException |
void | updateInBackground () throws IOException |
void | updateInBackground (boolean continuousUpdates) throws IOException |
void | updateInBackground (boolean continuousUpdates, UpdateListener listener) throws IOException |
void | updateInBackground (ContentName latestVersionKnown, boolean continuousUpdates) throws IOException |
void | updateInBackground (ContentName latestVersionKnown, boolean continuousUpdates, UpdateListener listener) throws IOException |
void | waitForData () |
void | waitForData (long timeout) |
void | newVersionAvailable (CCNNetworkObject<?> newVersion, boolean wasSave) |
Notification when a new version is available of a given object (the object's data and version information will already have been updated to reflect the new version). | |
Protected Member Functions | |
void | localCopy () |
Package Attributes | |
final CCNNetworkObject<?> | _netobj |
final CCNHandle | _handle |
final ConcurrentHashMap < UpdateListener, UpdateListener > | _updateListeners = new ConcurrentHashMap<UpdateListener, UpdateListener>(1) |
A local repository is one connected directly to the same ccnd as the application; it may have a distinguished role as the repository that is always available for local configuration data regardless of external connectivity. If there is more than one repository that is local, the behavior is undefined.
To use this wrapper, create a network object instance as usual and then instantiate the wrapper with the network object. Use the wrapper whenever possible instead of the underlying network object. To access distinctive features of the particular network object subclass, call the object() method on the wrapper to get the underlying object.
void org.ccnx.ccn.io.content.LocalCopyWrapper.newVersionAvailable | ( | CCNNetworkObject<?> | newVersion, | |
boolean | wasSave | |||
) |
Notification when a new version is available of a given object (the object's data and version information will already have been updated to reflect the new version).
newVersion | The newly updated object. | |
wasSave | If true, someone called save() on this particular object, if false, the object received new data from the network. |
Implements org.ccnx.ccn.io.content.UpdateListener.