Public Member Functions | |
ContentObject | getContent (Interest interest) throws RepositoryException |
Gets content matching the given interest. | |
boolean | hasContent (ContentName name) throws RepositoryException |
Check for content matching the given name, without retrieving the content itself. | |
NameEnumerationResponse | getNamesWithPrefix (Interest i, ContentName responseName) |
Gets all names matching the given NameEnumeration interest. | |
Policy | getPolicy () |
Gets the current policy for this repository. | |
String | getVersion () |
Gets the current version of this RepositoryStore. | |
void | initialize (String repositoryRoot, File policyFile, String localName, String globalPrefix, String namespace, CCNHandle handle) throws RepositoryException |
Initialize the repository. | |
void | policyUpdate () throws RepositoryException |
Write/rewrite the policy file if different from what we have now. | |
NameEnumerationResponse | saveContent (ContentObject content) throws RepositoryException |
Save the given content in the repository store. | |
ContentObject | get (ContentRef ref) |
Get content for the given reference from the storage files. | |
boolean | diagnostic (String name) |
Dump all names of data stored in the repository into a special file within the repository on diagnostic request from higher level code. | |
void | shutDown () |
Cleanup on shutdown. | |
Object | getStatus (String type) |
Get implementation defined status. | |
synchronized boolean | bulkImport (String name) throws RepositoryException |
Bulk import of data from a file. | |
Static Public Attributes | |
static final String | CURRENT_VERSION = "1.4" |
Protected Member Functions | |
Integer | createIndex () |
Read the current repository file(s) for this repository and create an index for them. | |
void | dumpNames (int nodelen) |
Protected Attributes | |
String | _repositoryRoot = null |
String | _repositoryMeta = null |
File | _repositoryFile |
boolean | _useStoredPolicy = true |
HashMap< String, String > | _bulkImportInProgress = new HashMap<String, String>() |
Package Attributes | |
Map< Integer, RepoFile > | _files |
RepoFile | _activeWriteFile = null |
Integer | _currentFileIndex = 0 |
ContentTree | _index |
Classes | |
class | FileRef |
class | LogStructRepoStoreProfile |
class | RepoFile |
ContentObject org.ccnx.ccn.impl.repo.LogStructRepoStore.getContent | ( | Interest | interest | ) | throws RepositoryException |
Gets content matching the given interest.
interest | the given interest |
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
boolean org.ccnx.ccn.impl.repo.LogStructRepoStore.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.impl.repo.LogStructRepoStore.getNamesWithPrefix | ( | Interest | i, | |
ContentName | responseName | |||
) |
Gets all names matching the given NameEnumeration interest.
i | the interest |
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
Policy org.ccnx.ccn.impl.repo.LogStructRepoStore.getPolicy | ( | ) |
Gets the current policy for this repository.
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
String org.ccnx.ccn.impl.repo.LogStructRepoStore.getVersion | ( | ) | [virtual] |
Gets the current version of this RepositoryStore.
Implements org.ccnx.ccn.impl.repo.RepositoryStoreBase.
Integer org.ccnx.ccn.impl.repo.LogStructRepoStore.createIndex | ( | ) | [protected] |
Read the current repository file(s) for this repository and create an index for them.
WARNING: multiple files are not well tested
void org.ccnx.ccn.impl.repo.LogStructRepoStore.initialize | ( | String | repositoryRoot, | |
File | policyFile, | |||
String | localName, | |||
String | globalPrefix, | |||
String | namespace, | |||
CCNHandle | handle | |||
) | throws RepositoryException |
Initialize the repository.
repositoryRoot | the directory containing the files to store a repository. A new directory is created if this doesn't yet exist | |
policyFile | a file containing policy data to define the initial repository policy (see BasicPolicy) | |
localName | the local name for this repository as a slash separated String (defaults if null) | |
globalPrefix | the global prefix for this repository as a slash separated String (defaults if null) | |
An | initial namespace (defaults to namespace stored in repository, or / if none) |
RepositoryException | if the policyFile, localName, or globalName are improperly formatted |
handle | optional CCNHandle if caller wants to override the default connection/identity behavior of the repository -- this provides a KeyManager and handle for the repository to use to obtain its keys and communicate with ccnd. If null, the repository will configure its own based on policy, or if none, create one using the executing user's defaults. |
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
void org.ccnx.ccn.impl.repo.LogStructRepoStore.policyUpdate | ( | ) | throws RepositoryException |
Write/rewrite the policy file if different from what we have now.
RepositoryException |
If there are differences we need to write the updated version
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
NameEnumerationResponse org.ccnx.ccn.impl.repo.LogStructRepoStore.saveContent | ( | ContentObject | content | ) | throws RepositoryException |
Save the given content in the repository store.
content | the content to save |
RepositoryException | it the content can not be written or encoded |
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
ContentObject org.ccnx.ccn.impl.repo.LogStructRepoStore.get | ( | ContentRef | ref | ) |
Get content for the given reference from the storage files.
Used to retrieve content for comparison operations.
ref | the reference |
boolean org.ccnx.ccn.impl.repo.LogStructRepoStore.diagnostic | ( | String | name | ) |
Dump all names of data stored in the repository into a special file within the repository on diagnostic request from higher level code.
name | "nametree" or "nametreewide" to decide whether to limit the printout length of components |
Implements org.ccnx.ccn.impl.repo.RepositoryStore.
synchronized boolean org.ccnx.ccn.impl.repo.LogStructRepoStore.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.