public interface ContentRepository
| Modifier and Type | Interface and Description |
|---|---|
static class |
ContentRepository.Factory |
| Modifier and Type | Field and Description |
|---|---|
static org.jboss.msc.service.ServiceName |
SERVICE_NAME
Standard ServiceName under which a service controller for an instance of
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
addContent(InputStream stream)
Add the given content to the repository along with a reference tracked by
name. |
void |
addContentReference(byte[] hash,
Object reference)
Adds a reference to the content hash.
|
org.jboss.vfs.VirtualFile |
getContent(byte[] hash)
Get the content as a virtual file.
|
boolean |
hasContent(byte[] hash)
Gets whether content with the given hash is stored in the repository.
|
void |
removeContent(byte[] hash,
Object reference)
Remove the given content from the repository.
|
boolean |
syncContent(byte[] hash)
Synchronize content with the given hash.
|
static final org.jboss.msc.service.ServiceName SERVICE_NAME
byte[] addContent(InputStream stream) throws IOException
name.stream - stream from which the content can be read. Cannot be nullnullIOException - if there is a problem reading the streamvoid addContentReference(byte[] hash,
Object reference)
hash - the hash of the deploymentreference - An identifier which must honour the equals() and hashCode() contracts. In the case of a deployment, this will be the deployment name. This is also used in #removeContent(byte[], String)org.jboss.vfs.VirtualFile getContent(byte[] hash)
hash - the hash. Cannot be nullboolean hasContent(byte[] hash)
hash - the hash. Cannot be nulltrue if the repository has content with the given hashboolean syncContent(byte[] hash)
hash - the hash. Cannot be nulltrue if the repository has content with the given hashvoid removeContent(byte[] hash,
Object reference)
name will be removed, and if there are no references left the deployment will be totally removedhash - the hash. Cannot be nullreference - An identifier which must honour the equals() and hashCode() contracts. In the case of a deployment, this will be the deployment name. This is also used in addContentReference(byte[], Object)Copyright © 2014 JBoss by Red Hat. All rights reserved.