chromium/net/third_party/quiche/src/quiche/quic/test_tools/simulator/actor.h

// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef QUICHE_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_
#define QUICHE_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_

#include <string>

#include "quiche/quic/core/quic_clock.h"
#include "quiche/quic/core/quic_time.h"

namespace quic {
namespace simulator {

class Simulator;

// Actor is the base class for all participants of the simulation which can
// schedule events to be triggered at the specified time.  Every actor has a
// name assigned to it, which can be used for debugging and addressing purposes.
//
// The Actor object is scheduled as follows:
// 1. Every Actor object appears at most once in the event queue, for one
//    specific time.
// 2. Actor is scheduled by calling Schedule() method.
// 3. If Schedule() method is called with multiple different times specified,
//    Act() method will be called at the earliest time specified.
// 4. Before Act() is called, the Actor is removed from the event queue.  Act()
//    will not be called again unless Schedule() is called.
class Actor {};

}  // namespace simulator
}  // namespace quic

#endif  // QUICHE_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_