Package com.logicaldoc.enterprise.store
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>
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(long docId) void
boolean
byte[]
byte[]
Invoked when a new message arrives from the cluster.void
init()
listResources
(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.store.MultiStore
compareTo, encryptAll, getConfig, getId, getParameterNames, getParameters, getStores, getTotalSize, moveResourcesToStore, setConfig, setId, store, store, test
Methods inherited from class com.logicaldoc.core.store.AbstractStore
destroy, equals, getResourceName, getResourceName, getStoreDefinitions, hashCode, isEnabled, newStore, toString
-
Constructor Details
-
ClusterStore
public ClusterStore()
-
-
Method Details
-
exists
- Specified by:
exists
in interfacecom.logicaldoc.core.store.Store
- Overrides:
exists
in classMultiStore
-
getBytes
- Specified by:
getBytes
in interfacecom.logicaldoc.core.store.Store
- Overrides:
getBytes
in classMultiStore
- Throws:
IOException
-
getBytes
- Specified by:
getBytes
in interfacecom.logicaldoc.core.store.Store
- Overrides:
getBytes
in classMultiStore
- Throws:
IOException
-
getStream
- Specified by:
getStream
in interfacecom.logicaldoc.core.store.Store
- Overrides:
getStream
in classMultiStore
- Throws:
IOException
-
writeToFile
- Specified by:
writeToFile
in interfacecom.logicaldoc.core.store.Store
- Overrides:
writeToFile
in classMultiStore
- 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.Store
- Overrides:
writeToStream
in classMultiStore
- Throws:
IOException
-
writeToStream
- Specified by:
writeToStream
in interfacecom.logicaldoc.core.store.Store
- Overrides:
writeToStream
in classMultiStore
- Throws:
IOException
-
size
- Specified by:
size
in interfacecom.logicaldoc.core.store.Store
- Overrides:
size
in classMultiStore
-
delete
- Specified by:
delete
in interfacecom.logicaldoc.core.store.Store
- Overrides:
delete
in classMultiStore
-
delete
public void delete(long docId) - Specified by:
delete
in interfacecom.logicaldoc.core.store.Store
- Overrides:
delete
in classMultiStore
-
getString
- Specified by:
getString
in interfacecom.logicaldoc.core.store.Store
- Overrides:
getString
in classMultiStore
-
listResources
- Specified by:
listResources
in interfacecom.logicaldoc.core.store.Store
- Overrides:
listResources
in classMultiStore
-
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
@PostConstruct public void init()- Specified by:
init
in interfacecom.logicaldoc.core.store.Store
- Overrides:
init
in classMultiStore
-