Class NullMarkerMessageImpl
- java.lang.Object
-
- com.opencloud.rhino.facilities.sas.NullMarkerMessageImpl
-
- All Implemented Interfaces:
MarkerMessage,Message<MarkerMessage>
public final class NullMarkerMessageImpl extends Object implements MarkerMessage
This is public because package-private is classloader-package-private. Do not use in deployed code.
-
-
Field Summary
Fields Modifier and Type Field Description static MarkerMessageNULL_MARKER_MESSAGE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarkerMessageassociationScope(Scope scope)Sets the scope of the marker.MarkerMessagebranchScope()The marker is an association marker whose scope is this branch only.MarkerMessageinstance(int instanceId)booleanisEnabled()Allows a caller to guard against performing expensive marshalling of message parameters, in cases where it doesn’t have access to theSasFacility.MarkerMessagenoneScope()The marker is not an association marker.MarkerMessagenoReactivation()voidreport()Enqueue this message for reporting to SAS.MarkerMessagesetReactivationFlag(boolean reactivate)Sets the reactivation flag of the marker.MarkerMessagestaticParam(int param0)Add a 32-bit fixed-length parameter to the message.MarkerMessagestaticParam(EnumParameter param0)Add a 32-bit fixed-length parameter to the message, specified as an enumerated type.MarkerMessagestaticParam(Integer param0)Add a 32-bit fixed-length parameter to the message, specified as an Integer.MarkerMessagethreadSafeParam(byte[] param)Add a parameter that will not be copied, even afterMessage.report()is called and therefore must not be modified by calling code.MarkerMessagetraceScope()The marker is an association marker whose scope is the entire trace.MarkerMessagevarParam(Object param0)Add one variable length parameter.MarkerMessagevarParams(Object param0, Object param1)Add two variable-length parameters.MarkerMessagevarParams(Object param0, Object param1, Object param2)Add three variable-length parameters.
-
-
-
Field Detail
-
NULL_MARKER_MESSAGE
public static final MarkerMessage NULL_MARKER_MESSAGE
-
-
Method Detail
-
instance
public MarkerMessage instance(int instanceId)
- Specified by:
instancein interfaceMessage<MarkerMessage>
-
isEnabled
public boolean isEnabled()
Description copied from interface:MessageAllows a caller to guard against performing expensive marshalling of message parameters, in cases where it doesn’t have access to the
SasFacility.- Specified by:
isEnabledin interfaceMessage<MarkerMessage>- Returns:
- true if SAS tracing is enabled on the SAS facility this message was created from
-
associationScope
public MarkerMessage associationScope(Scope scope)
Description copied from interface:MarkerMessageSets the scope of the marker.
- Specified by:
associationScopein interfaceMarkerMessage- Parameters:
scope- whether the marker should associate on the branch or trace scope, or not associate.- Returns:
- this to allow method chaining
-
traceScope
public MarkerMessage traceScope()
Description copied from interface:MarkerMessageThe marker is an association marker whose scope is the entire trace.
- Specified by:
traceScopein interfaceMarkerMessage- Returns:
- this to allow method chaining
-
branchScope
public MarkerMessage branchScope()
Description copied from interface:MarkerMessageThe marker is an association marker whose scope is this branch only.
- Specified by:
branchScopein interfaceMarkerMessage- Returns:
- this to allow method chaining
-
noneScope
public MarkerMessage noneScope()
Description copied from interface:MarkerMessageThe marker is not an association marker.
- Specified by:
noneScopein interfaceMarkerMessage- Returns:
- this to allow method chaining
-
setReactivationFlag
public MarkerMessage setReactivationFlag(boolean reactivate)
Description copied from interface:MarkerMessageSets the reactivation flag of the marker.
- Specified by:
setReactivationFlagin interfaceMarkerMessage- Parameters:
reactivate- whether the trail should be reactivated after the marker is sent- Returns:
- this to allow method chaining
-
noReactivation
public MarkerMessage noReactivation()
- Specified by:
noReactivationin interfaceMarkerMessage
-
threadSafeParam
public MarkerMessage threadSafeParam(byte[] param)
Description copied from interface:MessageAdd 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.- Specified by:
threadSafeParamin interfaceMessage<MarkerMessage>- Parameters:
param- a message parameter that the caller guarantees will not be subsequently modified- Returns:
- this, to allow method chaining
-
varParam
public MarkerMessage varParam(Object param0)
Description copied from interface:MessageAdd 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).- Specified by:
varParamin interfaceMessage<MarkerMessage>- Parameters:
param0- an parameter to be added to this message- Returns:
- this, to allow method chaining
-
varParams
public MarkerMessage varParams(Object param0, Object param1)
Description copied from interface:MessageAdd two variable-length parameters. Parameters will be handled as for
#param(Object).See warning on interface Javadoc about when parameters are marshalled.
- Specified by:
varParamsin interfaceMessage<MarkerMessage>- Returns:
- this, to allow method chaining
-
varParams
public MarkerMessage varParams(Object param0, Object param1, Object param2)
Description copied from interface:MessageAdd three variable-length parameters. Parameters will be handled as for
#param(Object).See warning on interface Javadoc about when parameters are marshalled.
- Specified by:
varParamsin interfaceMessage<MarkerMessage>- Returns:
- this, to allow method chaining
-
staticParam
public MarkerMessage staticParam(int param0)
Description copied from interface:MessageAdd a 32-bit fixed-length parameter to the message.
- Specified by:
staticParamin interfaceMessage<MarkerMessage>- Parameters:
param0- a 32-bit integer containing the parameter- Returns:
- this, to allow method chaining
-
staticParam
public MarkerMessage staticParam(EnumParameter param0)
Description copied from interface:MessageAdd a 32-bit fixed-length parameter to the message, specified as an enumerated type.
The implementation adds the parameter using
EnumParameter.value().- Specified by:
staticParamin interfaceMessage<MarkerMessage>- Parameters:
param0- an enum parameter from a generated enum type- Returns:
- this, to allow method chaining
-
staticParam
public MarkerMessage staticParam(Integer param0)
Description copied from interface:MessageAdd a 32-bit fixed-length parameter to the message, specified as an Integer.
- Specified by:
staticParamin interfaceMessage<MarkerMessage>- Parameters:
param0- an enum parameter from a generated enum type- Returns:
- this, to allow method chaining
-
report
public void report()
Description copied from interface:MessageEnqueue 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.- Specified by:
reportin interfaceMessage<MarkerMessage>
-
-