/*
 * Copyright 2016 Netflix, Inc.
 *
 * 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.netflix.fenzo.queues;

import com.netflix.fenzo.TaskRequest;

/**
 * A queuable task extends {@link TaskRequest} with a method to get attributes for the queue.
 */
public interface QueuableTask extends TaskRequest {

    /**
     * Get the attributes for the queue that the task belongs to.
     * @return The queue attributes for this task.
     */
    QAttributes getQAttributes();
}

@@ -985,11 +985,726 @@
 butes();
+%0A%0A    /**%0A     * Get the time at which this task is ready for consideration for assignment. This can be compared to system's%0A     * current time, for example, via %7B@link System#currentTimeMillis()%7D, to determine if the task is ready for being%0A     * considered for assignment. If the returned time is less than current time, then it is not ready. A return time%0A     * of %3Ccode%3E0%3C/code%3E implies that the task is ready now. Tasks that are not ready in a scheduling iteration may%0A     * be skipped to be considered in the next scheduling iteration.%0A     * @return Time in milli seconds when this task is ready, or %3Ccode%3E0%3C/code%3E to indicate it is ready.%0A     */%0A    default long getReadyAt() %7B%0A        return 0L;%0A    %7D
 %0A%7D%0A

define a new default function in QueuableTask to get task's ready time