public class MemoryRepositoryStorage extends Object implements RepositoryStorage
RepositoryStorage
that maintains its state in local memoryModifier and Type | Class and Description |
---|---|
static class |
MemoryRepositoryStorage.Factory |
Constructor and Description |
---|
MemoryRepositoryStorage(XRepository repository) |
Modifier and Type | Method and Description |
---|---|
org.jboss.osgi.resolver.XResource |
addResource(org.jboss.osgi.resolver.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
|
org.jboss.osgi.resolver.XResource |
getResource(org.jboss.osgi.resolver.XIdentityCapability icap)
Get the resource for the given identity capability.
|
protected AtomicLong |
getResourceIndex() |
boolean |
removeResource(org.jboss.osgi.resolver.XResource res)
Remove a the given resource from the cache.
|
public MemoryRepositoryStorage(XRepository repository)
protected AtomicLong getResourceIndex()
public XRepository getRepository()
RepositoryStorage
getRepository
in interface RepositoryStorage
public RepositoryReader getRepositoryReader()
RepositoryStorage
getRepositoryReader
in interface RepositoryStorage
public Collection<org.osgi.resource.Capability> findProviders(org.osgi.resource.Requirement req)
RepositoryStorage
findProviders
in interface RepositoryStorage
req
- The requirements for which matching capabilities should be returned. Must not be null
.public org.jboss.osgi.resolver.XResource addResource(org.jboss.osgi.resolver.XResource res) throws RepositoryStorageException
RepositoryStorage
addResource
in interface RepositoryStorage
res
- The resource to addRepositoryStorageException
- If there is a problem storing the resourcepublic org.jboss.osgi.resolver.XResource getResource(org.jboss.osgi.resolver.XIdentityCapability icap)
RepositoryStorage
getResource
in interface RepositoryStorage
public boolean removeResource(org.jboss.osgi.resolver.XResource res) throws RepositoryStorageException
RepositoryStorage
removeResource
in interface RepositoryStorage
res
- The resource to removeRepositoryStorageException
- If there is a problem removing the resource from storageCopyright © 2013 JBoss by Red Hat. All rights reserved.