// Path: GroundControl/groundcontrol/src/main/java/com/bottlerocketstudios/groundcontrol/HashBuilder.java
// public class HashBuilder {
// 
//     private int mHash;
// 
//     public HashBuilder() {
//         this(17);
//     }
// 
//     public HashBuilder(int initialValue) {
//         if (initialValue == 0) {
//             throw new IllegalArgumentException("Initial value cannot be 0");
//         }
//         mHash = initialValue;
//     }
// 
//     public HashBuilder addHashLong(long value) {
//         return addHashInt((int) (value ^ (value  >>> 32)));
//     }
// 
//     public HashBuilder addHashFloat(float value) {
//         return addHashInt(Float.floatToIntBits(value));
//     }
// 
//     public HashBuilder addHashDouble(double value) {
//         return addHashLong(Double.doubleToLongBits(value));
//     }
// 
//     public HashBuilder addHashBoolean(boolean value) {
//         return addHashInt(value ? 1 : 0);
//     }
// 
//     public HashBuilder addHashObject(Object object) {
//         return addHashInt(object.hashCode());
//     }
// 
//     public HashBuilder addHashInt(int value) {
//         mHash = mHash * 31 + value;
//         return this;
//     }
// 
//     public int build() {
//         return mHash;
//     }
// }


import com.bottlerocketstudios.groundcontrol.HashBuilder;
import java.util.concurrent.Future;
/*
 * Copyright (c) 2016. Bottle Rocket LLC
 * Licensed 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 com.bottlerocketstudios.groundcontrol.executor;



/**
 * Encapsulates a Job that has been executed along with associated time values.
 */
public class RunningJob {
    private final Job mJob;
    private final Future mFuture;
    private long mDeadlineTimestamp;

    private volatile int mHashCode;

    public RunningJob(Job job, Future future, long startTime) {
        mJob = job;
        mFuture = future;
// Path: GroundControl/groundcontrol/src/main/java/com/bottlerocketstudios/groundcontrol/HashBuilder.java
// public class HashBuilder {
// 
//     private int mHash;
// 
//     public HashBuilder() {
//         this(17);
//     }
// 
//     public HashBuilder(int initialValue) {
//         if (initialValue == 0) {
//             throw new IllegalArgumentException("Initial value cannot be 0");
//         }
//         mHash = initialValue;
//     }
// 
//     public HashBuilder addHashLong(long value) {
//         return addHashInt((int) (value ^ (value  >>> 32)));
//     }
// 
//     public HashBuilder addHashFloat(float value) {
//         return addHashInt(Float.floatToIntBits(value));
//     }
// 
//     public HashBuilder addHashDouble(double value) {
//         return addHashLong(Double.doubleToLongBits(value));
//     }
// 
//     public HashBuilder addHashBoolean(boolean value) {
//         return addHashInt(value ? 1 : 0);
//     }
// 
//     public HashBuilder addHashObject(Object object) {
//         return addHashInt(object.hashCode());
//     }
// 
//     public HashBuilder addHashInt(int value) {
//         mHash = mHash * 31 + value;
//         return this;
//     }
// 
//     public int build() {
//         return mHash;
//     }
// }


// Path: GroundControl/groundcontrol/src/main/java/com/bottlerocketstudios/groundcontrol/executor/RunningJob.java
import com.bottlerocketstudios.groundcontrol.HashBuilder;
import java.util.concurrent.Future;

/*
 * Copyright (c) 2016. Bottle Rocket LLC
 * Licensed 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 com.bottlerocketstudios.groundcontrol.executor;



/**
 * Encapsulates a Job that has been executed along with associated time values.
 */
public class RunningJob {
    private final Job mJob;
    private final Future mFuture;
    private long mDeadlineTimestamp;

    private volatile int mHashCode;

    public RunningJob(Job job, Future future, long startTime) {
        mJob = job;
        mFuture = future;
        trackJobStarted(startTime);