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

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

List of all members.

Public Member Functions

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

Static Public Member Functions

static void startBackup (CCNNetworkObject<?> objectToSyncToRepository) throws IOException

Protected Member Functions

void localCopy (CCNNetworkObject<?> newVersion)

Static Protected Attributes

static LocalCopyListener backupListener = new LocalCopyListener()

Detailed Description

A listener for a 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 add this functionality to an existing network object, add an instance of this class as a listener on the object.


Member Function Documentation

void org.ccnx.ccn.io.content.LocalCopyListener.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 Fri May 13 16:27:46 2011 for Content-Centric Networking in Java by  doxygen 1.6.3