Interface StreamResolver

    • Method Detail

      • getStream

        Stream getStream​(String cid)
                  throws IOException
        Retrieve the corresponding Stream by its stream identifier - here the cid (Content-ID).
        Parameters:
        cid - the Content-ID that identifies the Stream that shall be retrieved.
        Returns:
        the correspondig Stream.
        Throws:
        IOException - if reading a stream failed.
      • getUnusedStreams

        List<Stream> getUnusedStreams()
                               throws IOException
        Retrieve all streams that were not used so far. Per definition, these streams are regarded when this method was called
        Returns:
        unused streams
        Throws:
        IOException - in case of I/O errors
      • markUnused

        boolean markUnused​(String cid)
        Mark a Stream as being unused and reset it to an unused state. This method can only be used once to add the Stream to the unused streams collection. In subsequent invocations it will only return if marking the Stream as unused succeeded once but will not add it to the collection of unused streams again.
        Parameters:
        cid - the Content-ID that identifies the Stream that shall be retrieved.
        Returns:
        true if resetting the Stream to an unused state succeeded otherwise false.