Class ClusterStore

java.lang.Object
com.logicaldoc.core.store.AbstractStore
com.logicaldoc.enterprise.store.MultiStore
com.logicaldoc.enterprise.store.ClusterStore
All Implemented Interfaces:
com.logicaldoc.core.store.Store, PayloadHandler, Comparable<com.logicaldoc.core.store.Store>

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

    • ClusterStore

      public ClusterStore()
  • Method Details

    • exists

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

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

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

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

      public void writeToFile(long docId, String resource, File out) throws IOException
      Specified by:
      writeToFile in interface com.logicaldoc.core.store.Store
      Overrides:
      writeToFile in class MultiStore
      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.Store
      Overrides:
      writeToStream in class MultiStore
      Throws:
      IOException
    • writeToStream

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

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

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

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

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

      public List<String> listResources(long docId, String fileVersion)
      Specified by:
      listResources in interface com.logicaldoc.core.store.Store
      Overrides:
      listResources in class MultiStore
    • 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

      @PostConstruct public void init()
      Specified by:
      init in interface com.logicaldoc.core.store.Store
      Overrides:
      init in class MultiStore