public interface ContentRepository
Modifier and Type | Interface and Description |
---|---|
static class |
ContentRepository.Factory |
Modifier and Type | Field and Description |
---|---|
static String |
DELETED_CONTENT |
static String |
MARKED_CONTENT |
static long |
OBSOLETE_CONTENT_TIMEOUT
Time after which a marked obsolete content will be removed.
|
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(ContentReference reference)
Adds a reference to the content.
|
Map<String,Set<String>> |
cleanObsoleteContent()
Clean content that is not referenced from the repository.
|
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(ContentReference reference)
Remove the given content from the repository.
|
boolean |
syncContent(ContentReference reference)
Synchronize content with the given reference.
|
static final org.jboss.msc.service.ServiceName SERVICE_NAME
static final long OBSOLETE_CONTENT_TIMEOUT
static final String DELETED_CONTENT
static final String MARKED_CONTENT
byte[] addContent(InputStream stream) throws IOException
name
.stream
- stream from which the content can be read. Cannot be null
null
IOException
- if there is a problem reading the streamvoid addContentReference(ContentReference reference)
reference
- a reference to the content to be referenced. This is also used in
removeContent(ContentReference reference)
org.jboss.vfs.VirtualFile getContent(byte[] hash)
hash
- the hash. Cannot be null
boolean hasContent(byte[] hash)
hash
- the hash. Cannot be null
true
if the repository has content with the given hash.boolean syncContent(ContentReference reference)
reference
- the reference to be synchronized. Cannot be null
true
if the repository has content with the given referencevoid removeContent(ContentReference reference)
reference
- a reference to the content to be unreferenced. This is also used in
addContentReference(ContentReference reference)
Map<String,Set<String>> cleanObsoleteContent()
Copyright © 2023 JBoss by Red Hat. All rights reserved.