Class PolicyActor


  • public final class PolicyActor
    extends Object
    An actor that proxies to the page replacement policy.
    • Constructor Detail

      • PolicyActor

        public PolicyActor​(Thread parent,
                           Policy policy,
                           BasicSettings settings)
        Creates an actor that executes the policy actions asynchronously over a buffered channel.
        Parameters:
        parent - the supervisor to interrupt if the policy fails
        policy - the cache policy being simulated
        settings - the simulation settings
    • Method Detail

      • send

        public void send​(List<AccessEvent> events)
        Sends the access events for async processing and blocks until accepted into the mailbox.
      • finish

        public CompletableFuture<Void> finish()
        Sends a shutdown signal after the pending messages are completed and blocks until done.
      • stats

        public PolicyStats stats()
        Returns the cache efficiency statistics.