public interface Connector extends Node
changeBuffer(double)
, i.e. on whether you
fill up the connectors buffer or drain it.
Modifier and Type | Method and Description |
---|---|
double |
changeBuffer(double delta)
Try to apply the specified delta to the global buffer.
|
double |
globalBuffer()
The accumulative energy stored across all buffers in the node's network.
|
double |
globalBufferSize()
The accumulative size of all buffers in the node's network.
|
double |
localBuffer()
The energy stored in the local buffer.
|
double |
localBufferSize()
The size of the local buffer.
|
void |
setLocalBufferSize(double size)
Change the size of the connectors local buffer.
|
boolean |
tryChangeBuffer(double delta)
Like
changeBuffer(double) , but will only store/consume the specified
amount of energy if there is enough capacity/energy available. |
address, canBeReachedFrom, connect, disconnect, host, isNeighborOf, neighbors, network, reachability, reachableNodes, remove, sendToAddress, sendToNeighbors, sendToReachable, sendToVisible
loadData, saveData
double localBuffer()
double localBufferSize()
double globalBuffer()
double globalBufferSize()
double changeBuffer(double delta)
delta
- the amount of energy to consume or store.boolean tryChangeBuffer(double delta)
changeBuffer(double)
, but will only store/consume the specified
amount of energy if there is enough capacity/energy available.delta
- the amount of energy to consume or store.void setLocalBufferSize(double size)
size
- the new size of the local buffer. Note that this is capped
to a minimum of zero, i.e. if a negative value is passed the
size will be set to zero.