at.borkowski.scovillej.impl

Class SimulationImpl

    • Constructor Detail

      • SimulationImpl

        public SimulationImpl(long totalTicks,                      List<String> phases,                      List<SimulationMember> members,                      Map<String,SeriesProvider<?>> series,                      Set<ServiceProvider<?>> services)
        Creates a new simulation. The returned simulation is standing at tick 0 before processing.
        Parameters:
        totalTicks - the total ticks this simulation must run for
        phases - a list of phases to be used
        members - a list of members to be serviced
        series - a list of series to be recorded
        services - a list of services to be provided
    • Method Detail

      • executeCurrentTick

        public void executeCurrentTick()
        Description copied from interface: Simulation
        Executes the current tick. This method may only be called if the simulation has not executed the current tick yet. Otherwise, an IllegalStateException is thrown.
        Specified by:
        executeCurrentTick in interface Simulation
      • executeAndIncreaseTick

        public void executeAndIncreaseTick()
        Description copied from interface: Simulation
        Executes the current tick and advanced to the next tick. This method may only be called if the simulation has not executed the current tick yet. Otherwise, an IllegalStateException is thrown.
        Specified by:
        executeAndIncreaseTick in interface Simulation
      • increaseTick

        public void increaseTick()
        Description copied from interface: Simulation
        Advances to the next tick. This method may only be called if the simulation has already executed the current tick. If this method is called and the simulation has finished processing the last tick, no action is taken. See Simulation.increaseTickStrictly() for a version where this behavior is different.
        Specified by:
        increaseTick in interface Simulation
      • increaseTickStrictly

        public void increaseTickStrictly()
        Description copied from interface: Simulation
        Advances to the next tick. This method may only be called if the simulation has already executed the current tick. If this method is called and the simulation has finished processing the last tick, IllegalStateException is thrown. See Simulation.increaseTickStrictly() for a version where this behavior is different.
        Specified by:
        increaseTickStrictly in interface Simulation
      • executedCurrentTick

        public boolean executedCurrentTick()
        Description copied from interface: Simulation
        Determines whether the current tick has been prepared (return value is false) or has already been processed (returned value is true).
        Specified by:
        executedCurrentTick in interface Simulation
        Returns:
        whether the current tick has already been processed
      • getTotalTicks

        public long getTotalTicks()
        Description copied from interface: Simulation
        Returns the number of ticks this simulation has been configured to process.
        Specified by:
        getTotalTicks in interface Simulation
        Returns:
        the total number of ticks for this simulation
      • getSeries

        public <T> SeriesResult<T> getSeries(String symbol,                                     Class<T> clazz)
        Description copied from interface: Simulation
        Returns the series result for a given series. Note that while this method may be called mid-simulation and will return correct results for the current tick, advancing by ticks may render the returned object unusable or have it provide invalid results. Generally, the returned object is value only until the next advancing in the simulation. If the symbol is not known of the class does not match the originally created series, null is returned.
        Specified by:
        getSeries in interface Simulation
        Type Parameters:
        T - the type of series to reutrn
        Parameters:
        symbol - the symbol to return the series result for
        clazz - the class of the series
        Returns:
        the series result
      • test__getEventsMap

        public Map<Long,List<SimulationEvent>> test__getEventsMap()
        Testability method only.
        Returns:
        the internal events map
      • getPhases

        public List<String> getPhases()
        Description copied from interface: Simulation
        Returns the phases used in this simulation.
        Specified by:
        getPhases in interface Simulation
        Returns:
        the phases used in this simulation.

Copyright © 2015. All rights reserved.



NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14