Test repository backend. More...
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< ContentName > | getNamespace () |
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 () |
Test repository backend.
Should not be used in production code.
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
fileName | the name of the file to import data from. |
RepositoryException |
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
boolean org.ccnx.ccn.test.BitBucketRepository.diagnostic | ( | String | name | ) |
Handle diagnostic requests.
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.
interest | Interest to match |
Implements org.ccnx.ccn.impl.repo.RepositoryStoreBase.
ArrayList<ContentName> org.ccnx.ccn.test.BitBucketRepository.getNamespace | ( | ) |
Gets the currently valid namespace for this repository.
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
i | NameEnumeration Interest defining which names to get | |
responseName |
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.
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.
name | ContentName to match exactly, including digest as final explicit component |
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.
content |
Implements org.ccnx.ccn.impl.repo.RepositoryStoreBase.
void org.ccnx.ccn.test.BitBucketRepository.setPolicy | ( | Policy | policy | ) |
Set the policy with XML based policy.
policy |
Reimplemented from org.ccnx.ccn.impl.repo.RepositoryStoreBase.