Package com.logicaldoc.enterprise.storer
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>
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(long docId) void
boolean
byte[]
byte[]
Invoked when a new message arrives from the cluster.void
init()
Initializes the storers listlistResources
(long docId, String fileVersion) long
void
writeToFile
(long docId, String resource, File out) void
writeToStream
(long docId, String resource, OutputStream output) void
writeToStream
(long docId, String resource, OutputStream output, long start, long length) Methods inherited from class com.logicaldoc.enterprise.storer.MultiStorer
compareTo, encryptAll, getConfig, getId, getParameterNames, getParameters, getStorers, getTotalSize, moveResourcesToStore, setConfig, setId, store, store, test
Methods inherited from class com.logicaldoc.core.store.AbstractStorer
destroy, equals, getResourceName, getResourceName, hashCode, isEnabled, setManager, toString
-
Constructor Details
-
ClusterStorer
public ClusterStorer()
-
-
Method Details
-
exists
- Specified by:
exists
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
exists
in classMultiStorer
-
getBytes
- Specified by:
getBytes
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
getBytes
in classMultiStorer
- Throws:
IOException
-
getBytes
- Specified by:
getBytes
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
getBytes
in classMultiStorer
- Throws:
IOException
-
getStream
- Specified by:
getStream
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
getStream
in classMultiStorer
- Throws:
IOException
-
writeToFile
- Specified by:
writeToFile
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
writeToFile
in classMultiStorer
- Throws:
IOException
-
writeToStream
public void writeToStream(long docId, String resource, OutputStream output, long start, long length) throws IOException - Specified by:
writeToStream
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
writeToStream
in classMultiStorer
- Throws:
IOException
-
writeToStream
- Specified by:
writeToStream
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
writeToStream
in classMultiStorer
- Throws:
IOException
-
size
- Specified by:
size
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
size
in classMultiStorer
-
delete
- Specified by:
delete
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
delete
in classMultiStorer
-
delete
public void delete(long docId) - Specified by:
delete
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
delete
in classMultiStorer
-
getString
- Specified by:
getString
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
getString
in classMultiStorer
-
listResources
- Specified by:
listResources
in interfacecom.logicaldoc.core.store.Storer
- Overrides:
listResources
in classMultiStorer
-
handle
Description copied from interface:PayloadHandler
Invoked when a new message arrives from the cluster.- Specified by:
handle
in interfacePayloadHandler
- 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 interfacecom.logicaldoc.core.store.Storer
- Overrides:
init
in classMultiStorer
-