Package org.opensaml.core.xml.persist.impl

# Class SegmentingIntermediateDirectoryStrategy

java.lang.Object
org.opensaml.core.xml.persist.impl.SegmentingIntermediateDirectoryStrategy

All Implemented Interfaces:
  `Function<String,List<String>>`

public class SegmentingIntermediateDirectoryStrategy extends Object implements Function<String,List<String>>
Strategy function for producing intermediate directories from an input key.

Typically used with `FilesystemLoadSaveManager`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private org.slf4j.Logger`
`log`
Logger.
`private int`
`segmentLength`
The length of each produced segment.
`private int`
`segmentNumber`
The number of segments to produce.
`private Function<String,String>`
`sourceStrategy`
Strategy function for generating the source data from the input key.

## Constructor Summary

Constructors
Constructor
Description
`SegmentingIntermediateDirectoryStrategy(int number, int length, Function<String,String> source)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`List<String>`
`apply(String key)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### log

@Nonnull private org.slf4j.Logger log
Logger.

### sourceStrategy

@Nonnull private Function<String,String> sourceStrategy
Strategy function for generating the source data from the input key.

### segmentNumber

private int segmentNumber
The number of segments to produce.

### segmentLength

private int segmentLength
The length of each produced segment.

## Constructor Details

### SegmentingIntermediateDirectoryStrategy

public SegmentingIntermediateDirectoryStrategy(@ParameterName(name="segmentNumber") int number, @ParameterName(name="segmentLength") int length, @ParameterName(name="sourceStrategy") @Nonnull Function<String,String> source)
Constructor.

Parameters:
  `number` - number of segments
  `length` - length of each segment
  `source` - source strategy function

## Method Details

### apply

@Nullable @Unmodifiable @NotLive public List<String> apply(String key)

Specified by:
  `apply` in interface `Function<String,List<String>>`