Interface ReplicationContent


public interface ReplicationContent
This interface describes the assembled content to replicate.
  • Field Details

    • VOID

      static final ReplicationContent VOID
      Implements a void replication content to be used for delete or flush actions.
  • Method Details

    • getInputStream

      InputStream getInputStream() throws IOException
      Get the input stream for the content.
      Returns:
      return the input stream for this content or null if the underlying data source does not exist anymore.
      Throws:
      IOException - if an I/O error occurrs
    • getContentType

      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(String agentName)
      Marks this content to be used by the given agent.
      Parameters:
      agentName - name of the agent
    • release

      void release(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

      Collection<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

      Returns the facade for this content.
      Returns:
      the facade