C
- concrete builder classpublic interface MapBuilder<C extends MapBuilder<C>>
ChronicleMapBuilder
and
ChronicleMapStatelessClientBuilder
.Modifier and Type | Method and Description |
---|---|
C |
putReturnsNull(boolean putReturnsNull)
Configures if the maps created by this
MapBuilder should return null
instead of previous mapped values on ChornicleMap.put(key, value) calls. |
C |
removeReturnsNull(boolean removeReturnsNull)
Configures if the maps created by this
MapBuilder should return null
instead of the last mapped value on ChronicleMap.remove(key) calls. |
C putReturnsNull(boolean putReturnsNull)
MapBuilder
should return null
instead of previous mapped values on ChornicleMap.put(key, value)
calls.
Map.put()
returns the previous value, functionality
which is rarely used but fairly cheap for simple in-process, on-heap implementations like
HashMap
. But an off-heap collection has to create a new object and deserialize
the data from off-heap memory. A collection hiding remote queries over the network should
send the value back in addition to that. It's expensive for something you probably don't use.
By default, of cause, ChronicleMap
conforms the general Map
contract and
returns the previous mapped value on put()
calls.
putReturnsNull
- true
if you want ChronicleMap.put()
to not return the value that was replaced but
instead return null
MapBuilder
with this configuration appliedremoveReturnsNull(boolean)
C removeReturnsNull(boolean removeReturnsNull)
MapBuilder
should return null
instead of the last mapped value on ChronicleMap.remove(key)
calls.
Map.remove()
returns the previous value, functionality which is
rarely used but fairly cheap for simple in-process, on-heap implementations like HashMap
. But an off-heap collection has to create a new object and deserialize the data
from off-heap memory. A collection hiding remote queries over the network should send
the value back in addition to that. It's expensive for something you probably don't use.
By default, of cause, ChronicleMap
conforms the general Map
contract and
returns the mapped value on remove()
calls.
removeReturnsNull
- true
if you want ChronicleMap.remove()
to not return the value of the removed entry
but instead return null
MapBuilder
with this configuration appliedputReturnsNull(boolean)
Copyright © 2016. All rights reserved.