public interface IGridCache
Any Class that implements this, should have a public default constructor that takes a single argument of type IGrid.
Modifier and Type | Method and Description |
---|---|
void |
addNode(IGridNode gridNode,
IGridHost machine)
informs you cache that a machine was added to the grid.
|
void |
onJoin(IGridStorage sourceStorage)
Called when two grids merge into one, AE will call a join as it
Iteratively processes changes.
|
void |
onSplit(IGridStorage destinationStorage)
Called when a grid splits into two grids, AE will call a split as it
Iteratively processes changes.
|
void |
onUpdateTick()
Called each tick for the network, allows you to have active network wide
behaviors.
|
void |
populateGridStorage(IGridStorage destinationStorage)
Called when saving changes,
|
void |
removeNode(IGridNode gridNode,
IGridHost machine)
inform your cache, that a machine was removed from the grid.
|
void onUpdateTick()
void removeNode(IGridNode gridNode, IGridHost machine)
Important: Do not trust the grids state in this method, interact only with the node you are passed, if you need to manage other grid information, do it on the next updateTick.
gridNode
- removed from that gridmachine
- to be removed machinevoid addNode(IGridNode gridNode, IGridHost machine)
Important: Do not trust the grids state in this method, interact only with the node you are passed, if you need to manage other grid information, do it on the next updateTick.
gridNode
- added to grid nodemachine
- to be added machinevoid onSplit(IGridStorage destinationStorage)
destinationStorage
- storage which receives half of old gridvoid onJoin(IGridStorage sourceStorage)
sourceStorage
- old storagevoid populateGridStorage(IGridStorage destinationStorage)
destinationStorage
- storage