125 * <!ATTLIST entry key CDATA #REQUIRED>
126 * </pre>
127 *
128 * <p>This class is thread-safe: multiple threads can share a single
129 * {@code Properties} object without the need for external synchronization.
130 *
131 * @apiNote
132 * The {@code Properties} class does not inherit the concept of a load factor
133 * from its superclass, {@code Hashtable}.
134 *
135 * @author Arthur van Hoff
136 * @author Michael McCloskey
137 * @author Xueming Shen
138 * @since 1.0
139 */
140 public
141 class Properties extends Hashtable<Object,Object> {
142 /**
143 * use serialVersionUID from JDK 1.1.X for interoperability
144 */
145 private static final long serialVersionUID = 4112578634029874840L;
146
147 private static final Unsafe UNSAFE = Unsafe.getUnsafe();
148
149 /**
150 * A property list that contains default values for any keys not
151 * found in this property list.
152 *
153 * @serial
154 */
155 protected volatile Properties defaults;
156
157 /**
158 * Properties does not store values in its inherited Hashtable, but instead
159 * in an internal ConcurrentHashMap. Synchronization is omitted from
160 * simple read operations. Writes and bulk operations remain synchronized,
161 * as in Hashtable.
162 */
163 private transient volatile ConcurrentHashMap<Object, Object> map;
164
|
125 * <!ATTLIST entry key CDATA #REQUIRED>
126 * </pre>
127 *
128 * <p>This class is thread-safe: multiple threads can share a single
129 * {@code Properties} object without the need for external synchronization.
130 *
131 * @apiNote
132 * The {@code Properties} class does not inherit the concept of a load factor
133 * from its superclass, {@code Hashtable}.
134 *
135 * @author Arthur van Hoff
136 * @author Michael McCloskey
137 * @author Xueming Shen
138 * @since 1.0
139 */
140 public
141 class Properties extends Hashtable<Object,Object> {
142 /**
143 * use serialVersionUID from JDK 1.1.X for interoperability
144 */
145 @java.io.Serial
146 private static final long serialVersionUID = 4112578634029874840L;
147
148 private static final Unsafe UNSAFE = Unsafe.getUnsafe();
149
150 /**
151 * A property list that contains default values for any keys not
152 * found in this property list.
153 *
154 * @serial
155 */
156 protected volatile Properties defaults;
157
158 /**
159 * Properties does not store values in its inherited Hashtable, but instead
160 * in an internal ConcurrentHashMap. Synchronization is omitted from
161 * simple read operations. Writes and bulk operations remain synchronized,
162 * as in Hashtable.
163 */
164 private transient volatile ConcurrentHashMap<Object, Object> map;
165
|