Interface TimeZoned

All Known Subinterfaces:
Datacenter, Vm
All Known Implementing Classes:
DatacenterSimple, NetworkDatacenter, NetworkVm, VmGroup, VmSimple

public interface TimeZoned
An interface to be implemented by objects that are physically placed into some time zone, such as Datacenter and Vm.
Since:
CloudSim Plus 4.6.0
Author:
Manoel Campos da Silva Filho
See Also:
  • Field Details

  • Method Details

    • getTimeZone

      double getTimeZone()
      Gets the time zone offset, a value between [MIN_TIME_ZONE_OFFSET and MAX_TIME_ZONE_OFFSET], in which the object is physically located.
      Returns:
      the time zone offset
    • setTimeZone

      TimeZoned setTimeZone(double timeZone)
      Sets the time zone offset between [MIN_TIME_ZONE_OFFSET and MAX_TIME_ZONE_OFFSET].
      Parameters:
      timeZone - the new time zone offset
      Returns:
    • validateTimeZone

      default double validateTimeZone(double timeZone)
    • closestDatacenter

      static Datacenter closestDatacenter(Vm vm, List<Datacenter> datacenters)
      Selects the Datacenter closest to a given Vm, based on their timezone. It considers the Datacenter list is already sorted by timezone.
      Parameters:
      vm - to Vm to try place into the closest Datacenter
      datacenters - the list of available Datacenters, sorted by timezone
      Returns:
      the first selected Datacenter
    • distance

      default double distance(TimeZoned other)
      Computes the distance between this and other TimeZoned object, considering their timezone offset values.
      Parameters:
      other - the other TimeZoned object to check the distance to
      Returns:
      a positive integer value representing the distance between the objects
    • format

      static String format(double timeZone)