public interface Shareable
LocalMap
.
Normally local maps only allow immutable or copiable objects in order to avoid shared access to mutable state.
However if you have an object that you know is thread-safe you can mark it with this interface and then you
will be able to add it to LocalMap
instances.
Mutable object that you want to store in a LocalMap
should override copy()
method.
Use this interface with caution.
Modifier and Type | Method and Description |
---|---|
default Shareable |
copy()
Returns a copy of the object.
|
default Shareable copy()
Copyright © 2021 Eclipse. All rights reserved.