Class OldAsyncProfilerDisableTransformer
java.lang.Object
eu.cloudnetservice.wrapper.transform.spark.OldAsyncProfilerDisableTransformer
- All Implemented Interfaces:
ClassTransformer
@Internal
public final class OldAsyncProfilerDisableTransformer
extends Object
implements ClassTransformer
OldAsyncProfilerDisableTransformer relies on preview features of the Java platform:
OldAsyncProfilerDisableTransformerrefers to one or more preview APIs:ClassTransform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A transformer that explicitly disables the spark async profiler integration on old spark versions.
- Since:
- 4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classA transformer which replaces theloadmethod to always throw an exception onAsyncProfilerAccessin case the async profiler is not supported.Nested classes/interfaces inherited from interface eu.cloudnetservice.wrapper.transform.ClassTransformer
ClassTransformer.TransformWillingness -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance of this transformer, usually done via SPI. -
Method Summary
Modifier and TypeMethodDescriptionclassTransformWillingness(@NonNull String internalClassName) Checks if this class transformer is willing to transform the class with the given internal name.Provides the class transform that will be used to transform the class data.
-
Field Details
-
MN_LOAD
- See Also:
-
MN_IS_LINUX_MUSL
- See Also:
-
CNI_ASYNC_PROFILER_ACC_PREFIX
- See Also:
-
CNI_ASYNC_PROFILER_ACC_SUFFIX
- See Also:
-
CD_UNSUPPORTED_OP_EX
-
MTD_UNSUPPORTED_OP_EX_NEW
-
-
Constructor Details
-
OldAsyncProfilerDisableTransformer
public OldAsyncProfilerDisableTransformer()Constructs a new instance of this transformer, usually done via SPI.
-
-
Method Details
-
provideClassTransform
Provides the class transform that will be used to transform the class data. This method should only be called if a prior check toClassTransformer.classTransformWillingness(String)did not indicate a rejection of the class.- Specified by:
provideClassTransformin interfaceClassTransformer- Returns:
- the class transform to apply to the target class.
-
classTransformWillingness
@NonNull public @NonNull ClassTransformer.TransformWillingness classTransformWillingness(@NonNull @NonNull String internalClassName) Checks if this class transformer is willing to transform the class with the given internal name. If this method is not returning a rejection status, theClassTransformer.provideClassTransform()PREVIEW method is called and the transform gets applied to the target class.- Specified by:
classTransformWillingnessin interfaceClassTransformer- Parameters:
internalClassName- the internal class name of the class being checked for transformation.- Returns:
- the willingness of transformation for the class with the given name.
-
OldAsyncProfilerDisableTransformerwhen preview features are enabled.