public class RemoteFileRepositoryService extends Object implements org.jboss.msc.service.Service<org.jboss.as.server.mgmt.domain.CompositeContentRepository>
ContentRepository.Factory
DELETED_CONTENT, MARKED_CONTENT, OBSOLETE_CONTENT_TIMEOUT, SERVICE_NAME
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.
|
static void |
addService(org.jboss.msc.service.ServiceTarget target,
File localDeploymentContentsFolder) |
Map<String,Set<String>> |
cleanObsoleteContent()
Clean content that is not referenced from the repository.
|
void |
deleteDeployment(ContentReference reference)
Deletes a deployment from the local file system
|
org.jboss.vfs.VirtualFile |
getContent(byte[] hash)
Get the content as a virtual file.
|
File[] |
getDeploymentFiles(ContentReference reference)
Get the files associated with a given deployment.
|
File |
getDeploymentRoot(ContentReference reference)
Gets the directory under which files associated with a given deployment
would be found.
|
org.jboss.as.server.mgmt.domain.CompositeContentRepository |
getValue() |
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.
|
void |
start(org.jboss.msc.service.StartContext context) |
void |
stop(org.jboss.msc.service.StopContext context) |
boolean |
syncContent(ContentReference reference)
Synchronize content with the given reference.
|
public static void addService(org.jboss.msc.service.ServiceTarget target, File localDeploymentContentsFolder)
public void start(org.jboss.msc.service.StartContext context) throws org.jboss.msc.service.StartException
start
in interface org.jboss.msc.service.Service<org.jboss.as.server.mgmt.domain.CompositeContentRepository>
org.jboss.msc.service.StartException
public void stop(org.jboss.msc.service.StopContext context)
stop
in interface org.jboss.msc.service.Service<org.jboss.as.server.mgmt.domain.CompositeContentRepository>
public org.jboss.as.server.mgmt.domain.CompositeContentRepository getValue() throws IllegalStateException, IllegalArgumentException
getValue
in interface org.jboss.msc.value.Value<org.jboss.as.server.mgmt.domain.CompositeContentRepository>
IllegalStateException
IllegalArgumentException
public byte[] addContent(InputStream stream) throws IOException
ContentRepository
name
.stream
- stream from which the content can be read. Cannot be null
null
IOException
- if there is a problem reading the streampublic org.jboss.vfs.VirtualFile getContent(byte[] hash)
ContentRepository
hash
- the hash. Cannot be null
public boolean syncContent(ContentReference reference)
ContentRepository
reference
- the reference to be synchronized. Cannot be null
true
if the repository has content with the given referencepublic boolean hasContent(byte[] hash)
ContentRepository
hash
- the hash. Cannot be null
true
if the repository has content with the given hash.public void removeContent(ContentReference reference)
ContentRepository
reference
- a reference to the content to be unreferenced. This is also used in
ContentRepository.addContentReference(ContentReference reference)
public final File[] getDeploymentFiles(ContentReference reference)
DeploymentFileRepository
reference
- the reference of the deployment content.null
if it is not foundpublic File getDeploymentRoot(ContentReference reference)
DeploymentFileRepository
reference
- the reference of the deployment content.null
, even if the
deployment is unknownpublic void deleteDeployment(ContentReference reference)
DeploymentFileRepository
reference
- the reference of the deployment content.public void addContentReference(ContentReference reference)
ContentRepository
reference
- a reference to the content to be referenced. This is also used in
ContentRepository.removeContent(ContentReference reference)
public Map<String,Set<String>> cleanObsoleteContent()
ContentRepository
Copyright © 2023 JBoss by Red Hat. All rights reserved.