public class MemoryRepositoryStorage extends Object implements RepositoryStorage
RepositoryStorage that maintains its state in local memory| Modifier and Type | Class and Description |
|---|---|
static class |
MemoryRepositoryStorage.Factory |
| Constructor and Description |
|---|
MemoryRepositoryStorage(XRepository repository) |
| Modifier and Type | Method and Description |
|---|---|
XResource |
addResource(XResource res)
Add the given resource to storage
|
Collection<org.osgi.resource.Capability> |
findProviders(org.osgi.resource.Requirement req)
Find the capabilities that match the specified requirement.
|
XRepository |
getRepository()
Get the associated reposistory;
|
RepositoryReader |
getRepositoryReader()
Get the repository reader for this storage
|
XResource |
getResource(XIdentityCapability icap)
Get the resource for the given identity capability.
|
protected AtomicLong |
getResourceIndex() |
boolean |
removeResource(XResource res)
Remove a the given resource from the cache.
|
public MemoryRepositoryStorage(XRepository repository)
protected AtomicLong getResourceIndex()
public XRepository getRepository()
RepositoryStoragegetRepository in interface RepositoryStoragepublic RepositoryReader getRepositoryReader()
RepositoryStoragegetRepositoryReader in interface RepositoryStoragepublic Collection<org.osgi.resource.Capability> findProviders(org.osgi.resource.Requirement req)
RepositoryStoragefindProviders in interface RepositoryStoragereq - The requirements for which matching capabilities should be returned. Must not be null.public XResource addResource(XResource res) throws RepositoryStorageException
RepositoryStorageaddResource in interface RepositoryStorageres - The resource to addRepositoryStorageException - If there is a problem storing the resourcepublic XResource getResource(XIdentityCapability icap)
RepositoryStoragegetResource in interface RepositoryStoragepublic boolean removeResource(XResource res) throws RepositoryStorageException
RepositoryStorageremoveResource in interface RepositoryStorageres - The resource to removeRepositoryStorageException - If there is a problem removing the resource from storageCopyright © 2016 JBoss by Red Hat. All rights reserved.