| Package | Description |
|---|---|
| com.elastisys.scale.cloudpool.api.types |
| Modifier and Type | Method and Description |
|---|---|
Machine |
Machine.ToShortMachineFormat.apply(Machine machine) |
Machine |
Machine.Builder.build()
Creates a new
Machine instance from the parameters passed
thus far to the Machine.Builder. |
Machine |
Machine.withMetadata(com.google.gson.JsonObject metadata)
Creates a copy of this
Machine with a different value for the
metadata field. |
| Modifier and Type | Method and Description |
|---|---|
List<Machine> |
MachinePool.getActiveMachines()
Returns all active
Machines in the pool. |
List<Machine> |
MachinePool.getAllocatedMachines()
Returns all allocated
Machines in the pool. |
List<Machine> |
MachinePool.getMachines()
Returns all
Machines in the pool. |
List<Machine> |
MachinePool.getStartedMachines()
Returns all started
Machines in the pool. |
static com.google.common.base.Function<? super Machine,org.joda.time.DateTime> |
Machine.instanceHourStart()
|
static com.google.common.base.Predicate<? super Machine> |
Machine.inState(MachineState state)
|
static com.google.common.base.Predicate<Machine> |
Machine.isActiveMember()
Returns a
Predicate that returns true when passed a
Machine that is an active pool member -- it has been allocated
from the underlying infrastructure (MachineState.REQUESTED,
MachineState.PENDING or MachineState.RUNNING) and is an
active pool member (MembershipStatus.isActive()). |
static com.google.common.base.Predicate<Machine> |
Machine.isAllocated()
Returns a
Predicate that returns true when passed a
Machine that has been allocated from the underlying
infrastructure (machine state MachineState.REQUESTED,
MachineState.PENDING or MachineState.RUNNING). |
static com.google.common.base.Predicate<Machine> |
Machine.isEvictable()
|
static com.google.common.base.Predicate<Machine> |
Machine.isStarted()
A
Predicate that returns true when passed a
Machine that has been started by the underlying infrastructure
(machine state is MachineState.PENDING or
MachineState.RUNNING). |
static com.google.common.base.Function<? super Machine,Long> |
Machine.remainingInstanceHourTime()
Returns a
Function that given a Machine returns the
remaining time (in seconds) to the start of its next hour. |
static com.google.common.base.Function<? super Machine,com.google.common.base.Optional<Long>> |
Machine.requestAge(org.joda.time.DateTime now)
Optionally returns how many milliseconds ago a request was made.
|
static List<Machine> |
Machine.sort(Collection<Machine> machines,
Comparator<Machine> comparator)
Sorts a collection of
Machines according to the order prescribed
by a certain Comparator. |
static com.google.common.base.Function<? super Machine,String> |
Machine.toId()
Returns a transformation
Function that given a Machine
extracts its identifier. |
static com.google.common.base.Function<Machine,Machine> |
Machine.toShortFormat()
Factory method for the
Machine.ToShortMachineFormat Function. |
static com.google.common.base.Function<Machine,Machine> |
Machine.toShortFormat()
Factory method for the
Machine.ToShortMachineFormat Function. |
static com.google.common.base.Function<Machine,String> |
Machine.toShortString()
Factory method for the
Machine.ToShortMachineString Function. |
static com.google.common.base.Function<? super Machine,MachineState> |
Machine.toState()
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
Machine.MachineWithState.apply(Machine machine) |
MachineState |
Machine.MachineStateExtractor.apply(Machine machine)
Extracts the state of a
Machine. |
String |
Machine.MachineIdExtractor.apply(Machine machine)
Extracts the id of a
Machine. |
boolean |
Machine.EvictableMemberPredicate.apply(Machine machine) |
boolean |
Machine.ActiveMemberPredicate.apply(Machine machine) |
boolean |
Machine.AllocatedMachinePredicate.apply(Machine machine) |
boolean |
Machine.StartedMachinePredicate.apply(Machine machine) |
org.joda.time.DateTime |
Machine.InstanceHourStart.apply(Machine machine)
Calculates the starting point of the machine's current hour.
|
com.google.common.base.Optional<Long> |
Machine.RequestAge.apply(Machine machine) |
Long |
Machine.RemainingInstanceHourTime.apply(Machine machine)
Calculates the remaining time (in seconds) of the machine's last
started billing hour.
|
Machine |
Machine.ToShortMachineFormat.apply(Machine machine) |
String |
Machine.ToShortMachineString.apply(Machine machine) |
| Modifier and Type | Method and Description |
|---|---|
static List<Machine> |
Machine.sort(Collection<Machine> machines,
Comparator<Machine> comparator)
Sorts a collection of
Machines according to the order prescribed
by a certain Comparator. |
static List<Machine> |
Machine.sort(Collection<Machine> machines,
Comparator<Machine> comparator)
Sorts a collection of
Machines according to the order prescribed
by a certain Comparator. |
| Constructor and Description |
|---|
MachinePool(List<? extends Machine> machines,
org.joda.time.DateTime timestamp)
Constructs a new
MachinePool snapshot. |
Copyright © 2011–2017 Elastisys. All rights reserved.