public final class NullMarkerMessageImpl extends Object implements MarkerMessage
This is public because package-private is classloader-package-private. Do not use in deployed code.
Modifier and Type | Field and Description |
---|---|
static MarkerMessage |
NULL_MARKER_MESSAGE |
Modifier and Type | Method and Description |
---|---|
MarkerMessage |
associationScope(Scope scope)
Sets the scope of the marker.
|
MarkerMessage |
branchScope() |
MarkerMessage |
instance(int instanceId) |
boolean |
isEnabled()
Allows a caller to guard against performing expensive marshalling of message parameters, in cases where it doesn’t have access to the
SasFacility . |
MarkerMessage |
noneScope() |
MarkerMessage |
noReactivation() |
void |
report()
Enqueue this message for reporting to SAS.
|
MarkerMessage |
setReactivationFlag(boolean reactivate)
Sets the reactivation flag of the marker.
|
MarkerMessage |
staticParam(EnumParameter param0)
Add a 32-bit fixed-length parameter to the message, specified as an enumerated type.
|
MarkerMessage |
staticParam(int param0)
Add a 32-bit fixed-length parameter to the message.
|
MarkerMessage |
staticParam(Integer param0)
Add a 32-bit fixed-length parameter to the message, specified as an Integer.
|
MarkerMessage |
threadSafeParam(byte[] param)
Add a parameter that will not be copied, even after
Message.report() is called and therefore must not be modified by calling code. |
MarkerMessage |
traceScope() |
MarkerMessage |
varParam(Object param0)
Add one variable length parameter.
|
MarkerMessage |
varParams(Object param0,
Object param1)
Add two variable-length parameters.
|
MarkerMessage |
varParams(Object param0,
Object param1,
Object param2)
Add three variable-length parameters.
|
public static final MarkerMessage NULL_MARKER_MESSAGE
public MarkerMessage instance(int instanceId)
instance
in interface Message<MarkerMessage>
public boolean isEnabled()
Message
Allows a caller to guard against performing expensive marshalling of message parameters, in cases where it doesn’t have access to the SasFacility
.
isEnabled
in interface Message<MarkerMessage>
public MarkerMessage associationScope(Scope scope)
MarkerMessage
Sets the scope of the marker.
associationScope
in interface MarkerMessage
scope
- whether the marker should associate on the branch or trace scopepublic MarkerMessage traceScope()
traceScope
in interface MarkerMessage
public MarkerMessage branchScope()
branchScope
in interface MarkerMessage
public MarkerMessage noneScope()
noneScope
in interface MarkerMessage
public MarkerMessage setReactivationFlag(boolean reactivate)
MarkerMessage
Sets the reactivation flag of the marker.
setReactivationFlag
in interface MarkerMessage
reactivate
- whether the trail should be reactivated after the marker is sentpublic MarkerMessage noReactivation()
noReactivation
in interface MarkerMessage
public MarkerMessage threadSafeParam(byte[] param)
Message
Add a parameter that will not be copied, even after Message.report()
is called and therefore must not be modified by calling code.
Callers should use this for parameters which it plans to modify and has therefore defensively copied or marshalled into a new byte array.
Use of Message.isEnabled()
is recommended before marshalling to avoid unnecessary memory and CPU use.
threadSafeParam
in interface Message<MarkerMessage>
param
- a message parameter that the caller guarantees will not be subsequently modifiedpublic MarkerMessage varParam(Object param0)
Message
Add one variable length parameter.
Warning: Parameters passed to this and other variable-length parameter methods must not be modified until the Message.report()
method is called.
See discussion in the Javadoc for this interface (Message
).
varParam
in interface Message<MarkerMessage>
param0
- an parameter to be added to this messagepublic MarkerMessage varParams(Object param0, Object param1)
Message
Add two variable-length parameters.
Parameters will be handled as for #param(Object)
.
See warning on interface Javadoc about when parameters are marshalled.
varParams
in interface Message<MarkerMessage>
public MarkerMessage varParams(Object param0, Object param1, Object param2)
Message
Add three variable-length parameters.
Parameters will be handled as for #param(Object)
.
See warning on interface Javadoc about when parameters are marshalled.
varParams
in interface Message<MarkerMessage>
public MarkerMessage staticParam(int param0)
Message
Add a 32-bit fixed-length parameter to the message.
staticParam
in interface Message<MarkerMessage>
param0
- a 32-bit integer containing the parameterpublic MarkerMessage staticParam(EnumParameter param0)
Message
Add a 32-bit fixed-length parameter to the message, specified as an enumerated type.
The implementation adds the parameter using EnumParameter.value()
.
staticParam
in interface Message<MarkerMessage>
param0
- an enum parameter from a generated enum typepublic MarkerMessage staticParam(Integer param0)
Message
Add a 32-bit fixed-length parameter to the message, specified as an Integer.
staticParam
in interface Message<MarkerMessage>
param0
- an enum parameter from a generated enum typepublic void report()
Message
Enqueue this message for reporting to SAS.
Variable-length parameters added with #param(Object)
and the multi-parameter methods are marshalled into
the message when this method is called so they can be freely modified from this call on.
Parameters added with Message.threadSafeParam(byte[])
are not copied therefore must not be modified even after this method is called
because the actual reporting to SAS will be done asynchronously.
report
in interface Message<MarkerMessage>