Package oracle.jdbc.diagnostics
Class MutableTraceAttributes
- java.lang.Object
-
- oracle.jdbc.diagnostics.TraceAttributes
-
- oracle.jdbc.diagnostics.MutableTraceAttributes
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<TraceAttributes.Entry>
public class MutableTraceAttributes extends TraceAttributes
Adding a new ConnectionAttribute should not necessitate any changes to this class.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class oracle.jdbc.diagnostics.TraceAttributes
TraceAttributes.Entry
-
-
Field Summary
-
Fields inherited from class oracle.jdbc.diagnostics.TraceAttributes
values
-
-
Constructor Summary
Constructors Constructor Description MutableTraceAttributes()
Create a TraceAttributes with all values set to null.MutableTraceAttributes(ImmutableTraceAttributes immutableTraceAttributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
set(TraceKey key, java.lang.String value)
Modifies the trace attributes value corresponding to the key and also, If key is not OracleTraceKey.SQL then both cached attributes are set to null.ImmutableTraceAttributes
toReadOnly()
ImmutableTraceAttributes
toReadOnlyWithoutKey(OracleTraceKey key)
-
Methods inherited from class oracle.jdbc.diagnostics.TraceAttributes
get, iterator
-
-
-
-
Constructor Detail
-
MutableTraceAttributes
public MutableTraceAttributes()
Create a TraceAttributes with all values set to null.
-
MutableTraceAttributes
public MutableTraceAttributes(ImmutableTraceAttributes immutableTraceAttributes)
-
-
Method Detail
-
set
public void set(TraceKey key, java.lang.String value)
Modifies the trace attributes value corresponding to the key and also, If key is not OracleTraceKey.SQL then both cached attributes are set to null. Otherwise (if key is OracleTraceKey.SQL): 1) if value is null and values[SQL_index] is not null, cached attributes are swapped 2) if value is not null and values[SQL_index] is not null, cachedImmutableCopy is set to null 3) if value is null and values[SQL_index] is null, cached attributes are swapped and if cachedImmutableCopy.values[SQL_index] is not equal to value, cachedImmutableCopy is set to null- Parameters:
key
- key corresponding to the value to be modifiedvalue
- the new value
-
toReadOnly
public ImmutableTraceAttributes toReadOnly()
- Specified by:
toReadOnly
in classTraceAttributes
- Returns:
- ImmutableTraceAttributes instance with existing values
-
toReadOnlyWithoutKey
public ImmutableTraceAttributes toReadOnlyWithoutKey(OracleTraceKey key)
-
-