Interface ReplicationContent


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

      Fields 
      Modifier and Type Field Description
      static ReplicationContent VOID
      Implements 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
      void acquire​(java.lang.String agentName)
      Marks this content to be used by the given agent.
      void destroy()
      Destroy the cached content.
      java.util.Collection<java.lang.String> getAcquiredBy()
      Returns the collection of agent names that use this content.
      long getContentLength()
      Return the content length if known
      java.lang.String getContentType()
      Get the content type
      ReplicationContentFacade getFacade()
      Returns the facade for this content.
      java.io.InputStream getInputStream()
      Get the input stream for the content.
      long getLastModified()
      Returns the last modified time or -1 if unknown
      void release​(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.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:
        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.