com.elastisys.scale.cloudpool.api.types

## Class PoolSizeSummary

- java.lang.Object
- - com.elastisys.scale.cloudpool.api.types.PoolSizeSummary

    public class PoolSizeSummary
    extends Object

Response message of the `CloudPool.getPoolSize()` operation that returns information about the pool size -- both desired and actual size.

### Constructor Summary

Constructors
Constructor and Description
`PoolSizeSummary(org.joda.time.DateTime timestamp, int desiredSize, int allocated, int active)`
`PoolSizeSummary(int desiredSize, int allocated, int active)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object obj)`
`int` `getActive()` The number of active machines in the pool `Machine.isActiveMember()`.
`int` `getAllocated()` Returns the number of allocated machines in the pool (see `Machine.isAllocated()`.
`int` `getDesiredSize()` Returns the desired size of the machine pool.
`org.joda.time.DateTime` `getTimestamp()` Returns the time at which the pool size observation was made.
`int` `hashCode()`
`String` `toString()`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### PoolSizeSummary

    public PoolSizeSummary(int desiredSize,
                           int allocated,
                           int active)

#### PoolSizeSummary

    public PoolSizeSummary(org.joda.time.DateTime timestamp,
                           int desiredSize,
                           int allocated,
                           int active)

### Method Detail

#### getTimestamp

    public org.joda.time.DateTime getTimestamp()

Returns the time at which the pool size observation was made. Note that in case the cloud pool serves locally cached data, this field may be used by the client to determine if the data is fresh enough to be acted upon.

Returns:

#### getDesiredSize

    public int getDesiredSize()

Returns the desired size of the machine pool.

Returns:

#### getAllocated

    public int getAllocated()

Returns the number of allocated machines in the pool (see `Machine.isAllocated()`.

Returns:

#### getActive

    public int getActive()

The number of active machines in the pool `Machine.isActiveMember()`. That is, the number of allocated machines that have also been marked with an active membership status.

Returns:

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`