PeNull

final class PeNull implements Pe

A class that implements the Null Object Design Pattern for Pe class.

Author:Manoel Campos da Silva Filho

See also: Pe.NULL

Methods

addCapacity

public boolean addCapacity(long capacityToAdd)

allocateResource

public boolean allocateResource(long amountToAllocate)

deallocateAllResources

public long deallocateAllResources()

deallocateAndRemoveResource

public boolean deallocateAndRemoveResource(long amountToDeallocate)

deallocateResource

public boolean deallocateResource(long amountToDeallocate)

getAllocatedResource

public long getAllocatedResource()

getAvailableResource

public long getAvailableResource()

getCapacity

public long getCapacity()

getId

public long getId()

getPeProvisioner

public PeProvisioner getPeProvisioner()

getStatus

public Status getStatus()

isAmountAvailable

public boolean isAmountAvailable(long amountToCheck)

isAmountAvailable

public boolean isAmountAvailable(double amountToCheck)

isBuzy

public boolean isBuzy()

isFailed

public boolean isFailed()

isFree

public boolean isFree()

isFull

public boolean isFull()

isResourceAmountBeingUsed

public boolean isResourceAmountBeingUsed(long amountToCheck)

isSuitable

public boolean isSuitable(long newTotalAllocatedResource)

isWorking

public boolean isWorking()

removeCapacity

public boolean removeCapacity(long capacityToRemove)

setAllocatedResource

public boolean setAllocatedResource(long newTotalAllocatedResource)

setCapacity

public boolean setCapacity(long mipsCapacity)

setCapacity

public boolean setCapacity(double mipsCapacity)

setId

public void setId(long id)

setPeProvisioner

public Pe setPeProvisioner(PeProvisioner peProvisioner)

setStatus

public boolean setStatus(Status status)