D
- The type of domain objects to segment into different SIPs@FunctionalInterface
public interface SipSegmentationStrategy<D>
Modifier and Type | Method and Description |
---|---|
static <D> SipSegmentationStrategy<D> |
byMaxAius(long maxAiusPerSip)
Return a SipSegmentationStrategy that allows a maximum number of AIUs per SIP.
|
static <D> SipSegmentationStrategy<D> |
byMaxDigitalObjects(long maxDigitalObjects)
Return a SipSegmentationStrategy that allows a maximum number of digital objects per SIP.
|
static <D> SipSegmentationStrategy<D> |
byMaxDigitalObjectsSize(long maxSize)
Return a SipSegmentationStrategy that allows a maximum total size (uncompressed) of digital objects
per SIP.
|
static <D> SipSegmentationStrategy<D> |
byMaxPdiSize(long maxSize)
Return a SipSegmentationStrategy that allows a maximum size (uncompressed) of the PDI per SIP.
|
static <D> SipSegmentationStrategy<D> |
byMaxProspectiveSipSize(long maxSize,
DigitalObjectsExtraction<D> digitalObjectsExtraction)
Return a SipSegmentationStrategy that allows a maximum total size (uncompressed) of the SIP including
the object being added, but NOT including the PDI.
|
static <D> SipSegmentationStrategy<D> |
byMaxSipSize(long maxSize)
Return a SipSegmentationStrategy that allows a maximum total size (uncompressed) of the SIP.
|
static <D> SipSegmentationStrategy<D> |
combining(SipSegmentationStrategy<D>... partialStrategies)
Return a SipSegmentationStrategy that combines a number of partial strategies.
|
static long |
getDomainObjectSize(java.util.Iterator<? extends DigitalObject> iterator,
long maxSize)
Return the size of a domain object in bytes.
|
boolean |
shouldStartNewSip(D domainObject,
SipMetrics metrics)
Determine whether to start a new SIP.
|
boolean shouldStartNewSip(D domainObject, SipMetrics metrics)
domainObject
- The domain object to be added to either the current SIP or a new onemetrics
- Metrics about the assembly of the current SIPtrue
if a new SIP should be started for the given domain object, or false
if
the domain object should be stored in the current SIPstatic <D> SipSegmentationStrategy<D> byMaxAius(long maxAiusPerSip)
D
- The type of domain objects to segment into different SIPsmaxAiusPerSip
- The maximum number of AIUs that may go into a SIPstatic <D> SipSegmentationStrategy<D> byMaxDigitalObjects(long maxDigitalObjects)
D
- The type of domain objects to segment into different SIPsmaxDigitalObjects
- The maximum number of AIUs that may go into a SIPstatic <D> SipSegmentationStrategy<D> byMaxPdiSize(long maxSize)
D
- The type of domain objects to segment into different SIPsmaxSize
- The maximum size of the PDIstatic <D> SipSegmentationStrategy<D> byMaxDigitalObjectsSize(long maxSize)
D
- The type of domain objects to segment into different SIPsmaxSize
- The maximum size of the digital objectsstatic <D> SipSegmentationStrategy<D> byMaxSipSize(long maxSize)
D
- The type of domain objects to segment into different SIPsmaxSize
- The maximum size of the SIPstatic <D> SipSegmentationStrategy<D> byMaxProspectiveSipSize(long maxSize, DigitalObjectsExtraction<D> digitalObjectsExtraction)
D
- The type of domain objects to segment into different SIPsmaxSize
- The maximum size of the SIPdigitalObjectsExtraction
- The extractor for the type of digital object being added.static long getDomainObjectSize(java.util.Iterator<? extends DigitalObject> iterator, long maxSize)
maxSize
- this is the maximum allowed size for the SIPiterator
- used to iterate over the digital objects contained in the domain object@SafeVarargs static <D> SipSegmentationStrategy<D> combining(SipSegmentationStrategy<D>... partialStrategies)
D
- The type of domain objects to segment into different SIPspartialStrategies
- The partial strategies to combine