Home / File/ AbstractScheduledEventExecutor.java — netty Source File

AbstractScheduledEventExecutor.java — netty Source File

Architecture documentation for AbstractScheduledEventExecutor.java, a java file in the netty codebase.

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2015 The Netty Project
 *
 * The Netty Project 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:
 *
 *   https://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 io.netty.util.concurrent;

import io.netty.util.internal.DefaultPriorityQueue;
import io.netty.util.internal.ObjectUtil;
import io.netty.util.internal.PriorityQueue;

import java.util.Comparator;
import java.util.Objects;
import java.util.Queue;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

/**
 * Abstract base class for {@link EventExecutor}s that want to support scheduling.
 */
public abstract class AbstractScheduledEventExecutor extends AbstractEventExecutor {
    private static final Comparator<ScheduledFutureTask<?>> SCHEDULED_FUTURE_TASK_COMPARATOR =
            new Comparator<ScheduledFutureTask<?>>() {
                @Override
                public int compare(ScheduledFutureTask<?> o1, ScheduledFutureTask<?> o2) {
                    return o1.compareTo(o2);
                }
            };

    static final Runnable WAKEUP_TASK = new Runnable() {
       @Override
       public void run() { } // Do nothing
    };

    PriorityQueue<ScheduledFutureTask<?>> scheduledTaskQueue;

    long nextTaskId;

    protected AbstractScheduledEventExecutor() {
    }

    protected AbstractScheduledEventExecutor(EventExecutorGroup parent) {
        super(parent);
    }

    @Override
    public Ticker ticker() {
        return Ticker.systemTicker();
    }

// ... (348 more lines)

Domain

Subdomains

Frequently Asked Questions

What does AbstractScheduledEventExecutor.java do?
AbstractScheduledEventExecutor.java is a source file in the netty codebase, written in java. It belongs to the CommonUtil domain, Concurrent subdomain.
Where is AbstractScheduledEventExecutor.java in the architecture?
AbstractScheduledEventExecutor.java is located at common/src/main/java/io/netty/util/concurrent/AbstractScheduledEventExecutor.java (domain: CommonUtil, subdomain: Concurrent, directory: common/src/main/java/io/netty/util/concurrent).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free