T
- the type of the values in the id manager.public static class FileBackedIdManager.Builder<T>
extends java.lang.Object
FileBackedIdManager
instances by adding
values that it associates with unique ids.
The provided implementation is not thread-safe, so it should be synchronized externally.
Constructor and Description |
---|
FileBackedIdManager.Builder(java.io.File file)
Constructs an empty builder backed by the given file.
|
Modifier and Type | Method and Description |
---|---|
long |
add(T value)
Adds the given value to this builder.
|
FileBackedIdManager |
build()
Creates a
FileBackedIdManager representing the data in this
builder and backed by the file with which it was created. |
public FileBackedIdManager.Builder(java.io.File file)
file
- the file to back the id manager to build.public long add(T value)
value
- the value to add to this builder.public FileBackedIdManager build()
FileBackedIdManager
representing the data in this
builder and backed by the file with which it was created.FileBackedIdManager
representing the data in this builder and backed by the file with which it was created.