public static final class PrivateMaxEntriesMap.Builder<K,V> extends Object
PrivateMaxEntriesMap
instances. It
provides a flexible approach for constructing customized instances with
a named parameter syntax. It can be used in the following manner:
ConcurrentMap<Vertex, Set<Edge>> graph = new Builder<Vertex, Set<Edge>>()
.maximumCapacity(5000)
.build();
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
PrivateMaxEntriesMap<K,V> |
build()
Creates a new
PrivateMaxEntriesMap instance. |
PrivateMaxEntriesMap.Builder<K,V> |
concurrencyLevel(int concurrencyLevel)
Specifies the estimated number of concurrently updating threads.
|
PrivateMaxEntriesMap.Builder<K,V> |
initialCapacity(int initialCapacity)
Specifies the initial capacity of the hash table (default 16).
|
PrivateMaxEntriesMap.Builder<K,V> |
maximumCapacity(long capacity)
Specifies the maximum capacity to coerce the map to and may
exceed it temporarily.
|
public PrivateMaxEntriesMap.Builder<K,V> initialCapacity(int initialCapacity)
initialCapacity
- the initial capacity used to size the hash table
to accommodate this many entries.IllegalArgumentException
- if the initialCapacity is negativepublic PrivateMaxEntriesMap.Builder<K,V> maximumCapacity(long capacity)
capacity
- the threshold to bound the map byIllegalArgumentException
- if the maximumCapacity is negativepublic PrivateMaxEntriesMap.Builder<K,V> concurrencyLevel(int concurrencyLevel)
concurrencyLevel
- the estimated number of concurrently updating
threadsIllegalArgumentException
- if the concurrencyLevel is less than or
equal to zeropublic PrivateMaxEntriesMap<K,V> build()
PrivateMaxEntriesMap
instance.IllegalStateException
- if the maximum capacity was
not setCopyright © 2008–2023 FasterXML. All rights reserved.