public class StaticIDBlockSizer extends Object implements IDBlockSizer
| Constructor and Description |
|---|
StaticIDBlockSizer(long blockSize,
long blockSizeLimit) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBlockSize(int idNamespace)
The size of the id block to be returned by calls
IDAuthority.getIDBlock(int,int, Duration)
for the given id namespace. |
long |
getIdUpperBound(int idNamespace)
Returns the upper bound for any id block returned by
IDAuthority.getIDBlock(int,int, Duration)
for the given id namespace. |
public StaticIDBlockSizer(long blockSize,
long blockSizeLimit)
public long getBlockSize(int idNamespace)
IDBlockSizerIDAuthority.getIDBlock(int,int, Duration)
for the given id namespace.
In other words, for the returned array of the above mentioned call, it must hold that the difference between the second
and first value is equal to the block size returned by this method (for the same partition id).getBlockSize in interface IDBlockSizerpublic long getIdUpperBound(int idNamespace)
IDBlockSizerIDAuthority.getIDBlock(int,int, Duration)
for the given id namespace.
In other words, it must hold that the second value of the returned array is smaller than this value for the same partition id.getIdUpperBound in interface IDBlockSizerCopyright © 2012–2015. All rights reserved.