Skip to main content
Version: 1.15

Allocation strategy plugins

Overview​

note

This extension point allows to define how storage microservice decides which Data storage plugin to use to store a given AIP and its associated files.

REGARDS provides many implementation of this extension point :

Interface​

IAllocationStrategy

Implementation​

To learn more about how to create your own plugin see Plugins

Here under is an exemple of how to implements this extension point to create your own business logic.

@Plugin(id = "exemple", version = "1.0.0", description = "exemple plugin",
author = "REGARDS Team", contact = "regards@c-s.fr", licence = "LGPLv3.0", owner = "CSSI",
url = "https://github.com/RegardsOss")
public class Plugin implements IAllocationStrategy {

@Override
public Multimap<Long, StorageDataFile> dispatch(Collection<StorageDataFile> dataFilesToHandle,
DispatchErrors dispatchErrors) {
// return map with key=<data storage plugin id> and value=<StorageDataFile to store>
}
}