Class PluginCrossNodesEvent<R>
java.lang.Object
com.atlassian.bamboo.cluster.event.AbstractCrossNodesEvent<R,PluginCrossNodesEventsServiceGrpc.PluginCrossNodesEventsServiceStub>
com.atlassian.bamboo.cluster.event.plugin.PluginCrossNodesEvent<R>
- Type Parameters:
R- the correspondent CrossNodesCommunication event type
- All Implemented Interfaces:
CrossNodesEvent,Serializable
- Direct Known Subclasses:
DisablePluginEvent,EnablePluginEvent,InstallPluginEvent,UninstallPluginEvent,UpgradePluginEvent
public abstract class PluginCrossNodesEvent<R>
extends AbstractCrossNodesEvent<R,PluginCrossNodesEventsServiceGrpc.PluginCrossNodesEventsServiceStub>
implements CrossNodesEvent, Serializable
Abstract class with commonalities for plugin events in a multi-node environment.
Child classes need to expose their own static method to create a Builder. For instance, take
a look at InstallPluginEvent.newBuilder().
- Since:
- 9.5
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPluginCrossNodesEvent.AbstractPluginEventBuilder<T extends PluginCrossNodesEvent<?>,B extends PluginCrossNodesEvent.AbstractPluginEventBuilder<T, B>> Nested classes/interfaces inherited from interface com.atlassian.bamboo.cluster.event.CrossNodesEvent
CrossNodesEvent.Type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPluginCrossNodesEvent(CrossNodesEvent.Type eventType, @Nullable String pluginKey, int pluginsVersion, @Nullable String pluginName, @NotNull TestModeEnum testMode) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Retrieves the class object representing the gRPC stub used for communication with the Atlassian Cache service.@NotNull CrossNodesEvent.TypegetType()Returns the type of the event.inthashCode()Returns a hash code value for the object.booleanisEmpty()Returns whether the event is empty.toGrpcRequestMessage(@NotNull MetadataInfo metadataInfo) Converts event specific data and provided metadata information into the corresponding gRPC request message.protected abstract RtoGrpcRequestMessage(@NotNull MetadataInfo metadataInfo, String pluginKey, int pluginsVersion, String pluginName) @NotNull StringtoString()Returns a string representation of the object.Methods inherited from class com.atlassian.bamboo.cluster.event.AbstractCrossNodesEvent
sendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.cluster.event.CrossNodesEvent
isNotEmpty
-
Constructor Details
-
PluginCrossNodesEvent
protected PluginCrossNodesEvent(@NotNull CrossNodesEvent.Type eventType, @Nullable @Nullable String pluginKey, int pluginsVersion, @Nullable @Nullable String pluginName, @NotNull @NotNull TestModeEnum testMode)
-
-
Method Details
-
getType
Description copied from interface:CrossNodesEventReturns the type of the event.- Specified by:
getTypein interfaceCrossNodesEvent- Returns:
- the type of the event
-
isEmpty
public boolean isEmpty()Description copied from interface:CrossNodesEventReturns whether the event is empty. May be needed to avoid sending empty events.- Specified by:
isEmptyin interfaceCrossNodesEvent- Returns:
- true if the event is empty, false otherwise.
-
getStubClass
@NotNull public @NotNull Class<PluginCrossNodesEventsServiceGrpc.PluginCrossNodesEventsServiceStub> getStubClass()Retrieves the class object representing the gRPC stub used for communication with the Atlassian Cache service.- Specified by:
getStubClassin classAbstractCrossNodesEvent<R,PluginCrossNodesEventsServiceGrpc.PluginCrossNodesEventsServiceStub> - Returns:
- The class object of PluginCrossNodesEventsServiceStub.
-
toString
Description copied from interface:CrossNodesEventReturns a string representation of the object.- Specified by:
toStringin interfaceCrossNodesEvent- Overrides:
toStringin classObject- Returns:
- a string representation of the object
-
equals
Description copied from interface:CrossNodesEventIndicates whether some other object is "equal to" this one.- Specified by:
equalsin interfaceCrossNodesEvent- Overrides:
equalsin classObject- Parameters:
o- the reference object with which to compare- Returns:
trueif this object is the same as the obj argument;falseotherwise
-
hashCode
public int hashCode()Description copied from interface:CrossNodesEventReturns a hash code value for the object.- Specified by:
hashCodein interfaceCrossNodesEvent- Overrides:
hashCodein classObject- Returns:
- a hash code value for this object
-
toGrpcRequestMessage
@NotNull protected abstract R toGrpcRequestMessage(@NotNull @NotNull MetadataInfo metadataInfo, String pluginKey, int pluginsVersion, String pluginName) -
toGrpcRequestMessage
Description copied from class:AbstractCrossNodesEventConverts event specific data and provided metadata information into the corresponding gRPC request message.- Specified by:
toGrpcRequestMessagein classAbstractCrossNodesEvent<R,PluginCrossNodesEventsServiceGrpc.PluginCrossNodesEventsServiceStub> - Parameters:
metadataInfo- Metadata information to be used.- Returns:
- The gRPC request message
-