Class 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 Detail

      • ClusterStorer

        public ClusterStorer()
    • Method Detail

      • 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
      • 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 payload)
                      throws Exception
        Description copied from interface: PayloadHandler
        Invoked when a new message arrives from the cluster.
        Specified by:
        handle in interface PayloadHandler
        Parameters:
        payload - Payload to be processed
        Returns:
        The response to the received message
        Throws:
        Exception - a generic error
      • 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