Package com.day.cq.replication
Interface ReplicationContent
-
public interface ReplicationContentThis interface describes the assembled content to replicate.
-
-
Field Summary
Fields Modifier and Type Field Description static ReplicationContentVOIDImplements a void replication content to be used for delete or flush actions.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidacquire(java.lang.String agentName)Marks this content to be used by the given agent.voiddestroy()Destroy the cached content.java.util.Collection<java.lang.String>getAcquiredBy()Returns the collection of agent names that use this content.longgetContentLength()Return the content length if knownjava.lang.StringgetContentType()Get the content typeReplicationContentFacadegetFacade()Returns the facade for this content.java.io.InputStreamgetInputStream()Get the input stream for the content.longgetLastModified()Returns the last modified time or -1 if unknownvoidrelease(java.lang.String agentName)Mark that this replication content is not needed anymore for this agent.
-
-
-
Field Detail
-
VOID
static final ReplicationContent VOID
Implements a void replication content to be used for delete or flush actions.
-
-
Method Detail
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOExceptionGet the input stream for the content.- Returns:
- return the input stream for this content or
nullif the underlying data source does not exist anymore. - Throws:
java.io.IOException- if an I/O error occurrs
-
getContentType
java.lang.String getContentType()
Get the content type- Returns:
- The content type or null.
-
getContentLength
long getContentLength()
Return the content length if known- Returns:
- Return the content length or -1 if the length is unknown.
-
getLastModified
long getLastModified()
Returns the last modified time or -1 if unknown- Returns:
- the last modified time
-
acquire
void acquire(java.lang.String agentName)
Marks this content to be used by the given agent.- Parameters:
agentName- name of the agent
-
release
void release(java.lang.String agentName)
Mark that this replication content is not needed anymore for this agent. This must only be called when the replication is not present any more in any queues handled by this agent.- Parameters:
agentName- The name of the agent.
-
getAcquiredBy
java.util.Collection<java.lang.String> getAcquiredBy()
Returns the collection of agent names that use this content.- Returns:
- the names
-
destroy
void destroy()
Destroy the cached content. This destroys the cached content regardless of the current value of the usage counter.
-
getFacade
ReplicationContentFacade getFacade()
Returns the facade for this content.- Returns:
- the facade
-
-