org.ccnx.ccn.io.content.LocalCopyWrapper Class Reference

Wrapper for a generic network object that requests a local repository to hold a copy of the object whenever it is updated or saved. More...

Inheritance diagram for org.ccnx.ccn.io.content.LocalCopyWrapper:

org.ccnx.ccn.io.content.UpdateListener

List of all members.

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)


Detailed Description

Wrapper for a generic network object that requests a local repository to hold a copy of the object whenever it is updated or saved.

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.

Author:
jthornton

Member Function Documentation

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).

Parameters:
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.


The documentation for this class was generated from the following file:

Generated on Thu Feb 16 00:45:02 2012 for Content-Centric Networking in Java by  doxygen 1.5.6