public class PathConverter extends Object
File
path. Uses a nested tree of folders (depth based on iterationDepth) with a maximum number of children (based on blockSize). The
leaves of the trees will be the actual content files. This way, no folder will have more children than the 'blockSize' set, keeping the folders balanced.Modifier and Type | Field and Description |
---|---|
protected BigInteger |
blockSize |
protected int |
blockSizeInt |
protected int |
iterationDepth |
Constructor and Description |
---|
PathConverter() |
Modifier and Type | Method and Description |
---|---|
int |
getBlockSize() |
BigInteger |
getIdForPath(File path) |
int |
getIterationDepth() |
File |
getPathForId(BigInteger id) |
void |
setBlockSize(int blockSize) |
void |
setIterationDepth(int iterationDepth) |
protected BigInteger blockSize
protected int iterationDepth
protected int blockSizeInt
public File getPathForId(BigInteger id)
public BigInteger getIdForPath(File path)
public void setBlockSize(int blockSize)
public int getBlockSize()
public void setIterationDepth(int iterationDepth)
public int getIterationDepth()
Copyright © 2019. All rights reserved.