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.
    • 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)
        Unmarks this content for be used by the given 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.