Skip to content

Package: QueuedJobExecution

QueuedJobExecution

nameinstructionbranchcomplexitylinemethod
getType()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.job.engine.queue;
14:
15: import org.eclipse.kapua.model.KapuaUpdatableEntity;
16: import org.eclipse.kapua.model.id.KapuaId;
17:
18: import javax.xml.bind.annotation.XmlAccessType;
19: import javax.xml.bind.annotation.XmlAccessorType;
20: import javax.xml.bind.annotation.XmlRootElement;
21: import javax.xml.bind.annotation.XmlType;
22:
23: /**
24: * {@link QueuedJobExecution} definition.
25: *
26: * @since 1.1.0
27: */
28: @XmlRootElement(name = "queuedJobExecution")
29: @XmlAccessorType(XmlAccessType.PROPERTY)
30: @XmlType(factoryClass = QueuedJobExecutionXmlRegistry.class, factoryMethod = "newQueuedJobExecution")
31: public interface QueuedJobExecution extends KapuaUpdatableEntity {
32:
33: String TYPE = "queuedJobExecution";
34:
35: @Override
36: default String getType() {
37: return TYPE;
38: }
39:
40: /**
41: * Gets the {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
42: *
43: * @return The {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
44: * @since 1.1.0
45: */
46: KapuaId getJobId();
47:
48: /**
49: * Sets the {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
50: *
51: * @param jobId The {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
52: * @since 1.1.0
53: */
54: void setJobId(KapuaId jobId);
55:
56: /**
57: * Gets the {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId}.
58: *
59: * @return The {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId}.
60: * @since 1.1.0
61: */
62: KapuaId getJobExecutionId();
63:
64: /**
65: * Sets the {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId}.
66: *
67: * @param jobExecutionId The {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId}.
68: * @since 1.1.0
69: */
70: void setJobExecutionId(KapuaId jobExecutionId);
71:
72: /**
73: * Gets the {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId} that needs to complete.
74: *
75: * @return The {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId} that needs to complete.
76: * @since 1.1.0
77: */
78: KapuaId getWaitForJobExecutionId();
79:
80: /**
81: * Sets the {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId} that needs to complete.
82: *
83: * @param waitForJobExecutionId The {@link org.eclipse.kapua.service.job.execution.JobExecution} {@link KapuaId} that needs to complete.
84: * @since 1.1.0
85: */
86: void setWaitForJobExecutionId(KapuaId waitForJobExecutionId);
87:
88: /**
89: * Gets the {@link QueuedJobExecutionStatus}.
90: *
91: * @return The {@link QueuedJobExecutionStatus}.
92: * @since 1.1.0
93: */
94: QueuedJobExecutionStatus getStatus();
95:
96: /**
97: * Sets the {@link QueuedJobExecutionStatus}.
98: *
99: * @param status The {@link QueuedJobExecutionStatus}.
100: * @since 1.1.0
101: */
102: void setStatus(QueuedJobExecutionStatus status);
103: }