Class ClusterStorer

java.lang.Object
com.logicaldoc.core.store.AbstractStorer
com.logicaldoc.enterprise.storer.MultiStorer
com.logicaldoc.enterprise.storer.ClusterStorer
All Implemented Interfaces:
com.logicaldoc.core.store.Storer, PayloadHandler, Comparable<com.logicaldoc.core.store.Storer>

public class ClusterStorer extends MultiStorer implements PayloadHandler
A cluster-aware storer that is able to retrieve documents located in other nodes in the same cluster.
Since:
8.7.4
Author:
Marco Meschieri - LogicalDOC
  • Constructor Details

    • ClusterStorer

      public ClusterStorer()
  • Method Details

    • exists

      public boolean exists(long docId, String resource)
      Specified by:
      exists in interface com.logicaldoc.core.store.Storer
      Overrides:
      exists in class MultiStorer
    • getBytes

      public byte[] getBytes(long docId, String resource, long start, long length) throws IOException
      Specified by:
      getBytes in interface com.logicaldoc.core.store.Storer
      Overrides:
      getBytes in class MultiStorer
      Throws:
      IOException
    • getBytes

      public byte[] getBytes(long docId, String resource) throws IOException
      Specified by:
      getBytes in interface com.logicaldoc.core.store.Storer
      Overrides:
      getBytes in class MultiStorer
      Throws:
      IOException
    • getStream

      public InputStream getStream(long docId, String resource) throws IOException
      Specified by:
      getStream in interface com.logicaldoc.core.store.Storer
      Overrides:
      getStream in class MultiStorer
      Throws:
      IOException
    • writeToFile

      public void writeToFile(long docId, String resource, File out) throws IOException
      Specified by:
      writeToFile in interface com.logicaldoc.core.store.Storer
      Overrides:
      writeToFile in class MultiStorer
      Throws:
      IOException
    • writeToStream

      public void writeToStream(long docId, String resource, OutputStream output, long start, long length) throws IOException
      Specified by:
      writeToStream in interface com.logicaldoc.core.store.Storer
      Overrides:
      writeToStream in class MultiStorer
      Throws:
      IOException
    • writeToStream

      public void writeToStream(long docId, String resource, OutputStream output) throws IOException
      Specified by:
      writeToStream in interface com.logicaldoc.core.store.Storer
      Overrides:
      writeToStream in class MultiStorer
      Throws:
      IOException
    • size

      public long size(long docId, String resource)
      Specified by:
      size in interface com.logicaldoc.core.store.Storer
      Overrides:
      size in class MultiStorer
    • delete

      public void delete(long docId, String resource)
      Specified by:
      delete in interface com.logicaldoc.core.store.Storer
      Overrides:
      delete in class MultiStorer
    • delete

      public void delete(long docId)
      Specified by:
      delete in interface com.logicaldoc.core.store.Storer
      Overrides:
      delete in class MultiStorer
    • getString

      public String getString(long docId, String resource)
      Specified by:
      getString in interface com.logicaldoc.core.store.Storer
      Overrides:
      getString in class MultiStorer
    • listResources

      public List<String> listResources(long docId, String fileVersion)
      Specified by:
      listResources in interface com.logicaldoc.core.store.Storer
      Overrides:
      listResources in class MultiStorer
    • handle

      public Object handle(Payload request)
      Description copied from interface: PayloadHandler
      Invoked when a new message arrives from the cluster.
      Specified by:
      handle in interface PayloadHandler
      Parameters:
      request - Payload to be processed
      Returns:
      The response to the received message
    • init

      public void init()
      Description copied from class: MultiStorer
      Initializes the storers list
      Specified by:
      init in interface com.logicaldoc.core.store.Storer
      Overrides:
      init in class MultiStorer