forked from apache/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IGNITE-21139 Provide ability to extract a command argument and class …
…from management task event
- Loading branch information
1 parent
a7543ca
commit dc69362
Showing
3 changed files
with
112 additions
and
10 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
modules/core/src/main/java/org/apache/ignite/internal/events/ManagementTaskEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.ignite.internal.events; | ||
|
||
import java.util.UUID; | ||
import org.apache.ignite.cluster.ClusterNode; | ||
import org.apache.ignite.events.EventType; | ||
import org.apache.ignite.events.TaskEvent; | ||
import org.apache.ignite.internal.visor.VisorTaskArgument; | ||
import org.apache.ignite.lang.IgniteUuid; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
/** | ||
* Management task started event. | ||
* | ||
* @see EventType#EVT_MANAGEMENT_TASK_STARTED | ||
*/ | ||
public class ManagementTaskEvent extends TaskEvent { | ||
/** */ | ||
private static final long serialVersionUID = 0L; | ||
|
||
/** */ | ||
private final VisorTaskArgument<?> arg; | ||
|
||
/** | ||
* Creates task event with given parameters. | ||
* | ||
* @param node Node. | ||
* @param msg Optional message. | ||
* @param type Event type. | ||
* @param sesId Task session ID. | ||
* @param taskName Task name. | ||
* @param subjId Subject ID. | ||
* @param internal Whether current task belongs to Ignite internal tasks. | ||
* @param taskClsName Name ot the task class. | ||
*/ | ||
public ManagementTaskEvent(ClusterNode node, String msg, int type, IgniteUuid sesId, String taskName, | ||
String taskClsName, boolean internal, @Nullable UUID subjId, VisorTaskArgument<?> arg) { | ||
super(node, msg, type, sesId, taskName, taskClsName, internal, subjId); | ||
|
||
this.arg = arg; | ||
} | ||
|
||
/** @return Task argument. */ | ||
public VisorTaskArgument<?> argument() { | ||
return arg; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters