com.elastisys.scale.cloudpool.api.types

## Class Machine.RequestAge

- java.lang.Object
- - com.elastisys.scale.cloudpool.api.types.Machine.RequestAge

All Implemented Interfaces:
  com.google.common.base.Function<Machine,com.google.common.base.Optional<Long>>

Enclosing class:
  Machine

    public static class Machine.RequestAge
    extends Object
    implements com.google.common.base.Function<Machine,com.google.common.base.Optional<Long>>

A `Function` that optionally returns the number of milliseconds of how long ago the request to start a given `Machine` was made. Since not all cloud infrastructures support returning this value, the return value from the function is `Optional`.

### Constructor Summary

Constructors
Constructor and Description
`RequestAge(org.joda.time.DateTime now)` Creates a new instance that sets the current time to a particular value.

### Method Summary

All Methods Instance Methods Concrete Methods
`com.google.common.base.Optional<Long>` `apply(Machine machine)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface com.google.common.base.Function

`equals`

### Constructor Detail

#### RequestAge

    public RequestAge(org.joda.time.DateTime now)

Creates a new instance that sets the current time to a particular value.

Parameters:
  `now` - The time to regard as the current time.

### Method Detail

#### apply

    public com.google.common.base.Optional<Long> apply(Machine machine)

Specified by:
  `apply` in interface `com.google.common.base.Function<Machine,com.google.common.base.Optional<Long>>`