org.ccnx.ccn.test.BitBucketRepository Class Reference

Test repository backend. More...

List of all members.

Public Member Functions

boolean checkPolicyUpdate (ContentObject co) throws RepositoryException
ContentObject getContent (Interest interest) throws RepositoryException
 Return the matching content if it exists.
NameEnumerationResponse getNamesWithPrefix (Interest i, ContentName responseName)
 Get names to respond to name enumeration requests.
byte[] getRepoInfo (ArrayList< ContentName > names)
void initialize (String repositoryRoot, File policyFile, String localName, String globalPrefix, String nameSpace, CCNHandle handle) throws RepositoryException
 Initialize a repository.
NameEnumerationResponse saveContent (ContentObject content) throws RepositoryException
 Save the specified content in the repository.
void setPolicy (Policy policy)
 Set the policy with XML based policy.
ArrayList< ContentNamegetNamespace ()
 Gets the currently valid namespace for this repository.
boolean diagnostic (String name)
 Handle diagnostic requests.
void shutDown ()
 Hook to shutdown the store (close files for example).
Policy getPolicy ()
 Gets the current policy for this repository.
String getVersion ()
 Returns the current version of the repository instance.
Object getStatus (String type)
 Get implementation defined status.
boolean hasContent (ContentName name) throws RepositoryException
 Check for content matching the given name, without retrieving the content itself.
boolean bulkImport (String name) throws RepositoryException
 Bulk import of data from a file.

Static Public Member Functions

static String getUsage ()

Detailed Description

Test repository backend.

Should not be used in production code.


Member Function Documentation

boolean org.ccnx.ccn.test.BitBucketRepository.bulkImport ( String  name  )  throws RepositoryException

Bulk import of data from a file.

Data must be in a format compatible with the repository store. This would normally mean wire format

Parameters:
fileName the name of the file to import data from.
Returns:
false if reexpression for import in progress
Exceptions:
RepositoryException 

Implements org.ccnx.ccn.impl.repo.RepositoryStore.

boolean org.ccnx.ccn.test.BitBucketRepository.diagnostic ( String  name  ) 

Handle diagnostic requests.

Returns:
true if request recognized and carried out

Reimplemented from org.ccnx.ccn.impl.repo.RepositoryStoreBase.

ContentObject org.ccnx.ccn.test.BitBucketRepository.getContent ( Interest  interest  )  throws RepositoryException [virtual]

Return the matching content if it exists.

Parameters:
interest Interest to match
Returns:

Implements org.ccnx.ccn.impl.repo.RepositoryStoreBase.

ArrayList<ContentName> org.ccnx.ccn.test.BitBucketRepository.getNamespace (  ) 

Gets the currently valid namespace for this repository.

Returns:
the namespace as an ArrayList of ContentNames containing prefixes of valid namespaces

Reimplemented from org.ccnx.ccn.impl.repo.RepositoryStoreBase.

NameEnumerationResponse org.ccnx.ccn.test.BitBucketRepository.getNamesWithPrefix ( Interest  i,
ContentName  responseName 
) [virtual]

Get names to respond to name enumeration requests.

Returns null if there is nothing after the prefix or if there is nothing new after the prefix if there is a version on the incoming interest

Parameters:
i NameEnumeration Interest defining which names to get
responseName 
Returns:
NameEnumerationResponse

Implements org.ccnx.ccn.impl.repo.RepositoryStoreBase.

String org.ccnx.ccn.test.BitBucketRepository.getVersion (  )  [virtual]

Returns the current version of the repository instance.

Subclasses must implement this method to report their version for returning repository information.

Returns:
the version as a String

Implements org.ccnx.ccn.impl.repo.RepositoryStoreBase.

boolean org.ccnx.ccn.test.BitBucketRepository.hasContent ( ContentName  name  )  throws RepositoryException

Check for content matching the given name, without retrieving the content itself.

Parameters:
name ContentName to match exactly, including digest as final explicit component
Returns:
true if there is a ContentObject with exactly the given name, false otherwise

Implements org.ccnx.ccn.impl.repo.RepositoryStore.

NameEnumerationResponse org.ccnx.ccn.test.BitBucketRepository.saveContent ( ContentObject  content  )  throws RepositoryException [virtual]

Save the specified content in the repository.

If content is added to a name that has been the subject of a name enumeration request without a newer version at that time, the save will trigger a response to avoid forcing the enumerating node to wait for an Interest timeout to ask again.

Parameters:
content 
Returns:
NameEnumerationResponse

Implements org.ccnx.ccn.impl.repo.RepositoryStoreBase.

void org.ccnx.ccn.test.BitBucketRepository.setPolicy ( Policy  policy  ) 

Set the policy with XML based policy.

Parameters:
policy 

Reimplemented from org.ccnx.ccn.impl.repo.RepositoryStoreBase.


The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:50 2011 for Content-Centric Networking in Java by  doxygen 1.6.3