1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.core
.state
.model
;
15 * <b>LttvSoftIRQState</b>
20 public class LttngSoftIRQState
implements Cloneable
{
22 // ========================================================================
24 // =======================================================================
25 private Long pending
= null;
26 private Long running
= null;
28 // ========================================================================
30 // =======================================================================
31 public LttngSoftIRQState() {
37 public LttngSoftIRQState
clone() {
38 LttngSoftIRQState newState
= null;
41 newState
= (LttngSoftIRQState
)super.clone();
44 // Basic type in java are immutable!
45 // Thus, using assignment ("=") on basic type is CORRECT,
46 // but we should ALWAYS use "new" or "clone()" on "non basic" type
47 newState
.pending
= this.pending
;
48 newState
.running
= this.running
;
50 catch ( CloneNotSupportedException e
) {
51 System
.out
.println("Cloning failed with : " + e
.getMessage() ); //$NON-NLS-1$
57 // ========================================================================
59 // =======================================================================
64 public void setPending(Long pending
) {
65 this.pending
= pending
;
71 public Long
getPending() {
79 public void setRunning(Long running
) {
80 this.running
= running
;
86 public Long
getRunning() {
95 public void incrementRunning() {
99 public void incrementPending() {
103 public void decrementRunning() {
109 public void decrementPending() {