public class GraphPropertiesMetadataRepository extends Object implements ModuleMetadataRepository
ModuleMetadataRepository backed by a GraphProperties.| Constructor and Description |
|---|
GraphPropertiesMetadataRepository(org.neo4j.graphdb.GraphDatabaseService database,
RuntimeConfiguration configuration,
String propertyPrefix)
Create a new repository.
|
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getAllModuleIds()
Get IDs of all modules, for which metadata has been persisted by this repository.
|
<M extends ModuleMetadata> |
getModuleMetadata(RuntimeModule module)
Get the metadata of a module that has previously been presisted.
|
<M extends ModuleMetadata> |
getModuleMetadata(String moduleId)
Get the metadata of a module that has previously been presisted.
|
protected String |
moduleKey(String moduleId)
Build a module key to use as a property on the metadata container for storing metadata.
|
<M extends ModuleMetadata> |
persistModuleMetadata(RuntimeModule module,
M metadata)
Persist metadata of a module.
|
<M extends ModuleMetadata> |
persistModuleMetadata(String moduleId,
M metadata)
Persist metadata of a module.
|
void |
removeModuleMetadata(String moduleId)
Remove persisted metadata for a module.
|
public GraphPropertiesMetadataRepository(org.neo4j.graphdb.GraphDatabaseService database,
RuntimeConfiguration configuration,
String propertyPrefix)
database - to back the repository.configuration - of the runtime.propertyPrefix - String with which the property keys of properties written by this repository will be prefixed.public <M extends ModuleMetadata> M getModuleMetadata(RuntimeModule module)
getModuleMetadata in interface ModuleMetadataRepositoryM - type of the metadata.module - to get metadata for.public <M extends ModuleMetadata> M getModuleMetadata(String moduleId)
getModuleMetadata in interface ModuleMetadataRepositoryM - type of the metadata.moduleId - to get metadata for.public <M extends ModuleMetadata> void persistModuleMetadata(RuntimeModule module, M metadata)
persistModuleMetadata in interface ModuleMetadataRepositoryM - type of the metadata.module - for which to persist metadata.metadata - to persist.public <M extends ModuleMetadata> void persistModuleMetadata(String moduleId, M metadata)
persistModuleMetadata in interface ModuleMetadataRepositoryM - type of the metadata.moduleId - for which to persist metadata.metadata - to persist.public Set<String> getAllModuleIds()
getAllModuleIds in interface ModuleMetadataRepositorypublic void removeModuleMetadata(String moduleId)
removeModuleMetadata in interface ModuleMetadataRepositorymoduleId - ID of the module for which to remove previously persisted metadata. Nothing happens if no such
metadata exists.Copyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.