forked from External/mage
Performance: fixed server's big memory usage in long games and in big stack sizes (related to #11285, fixes #9302)
This commit is contained in:
parent
36ccfb0a2a
commit
d57a3c100d
7 changed files with 107 additions and 61 deletions
|
|
@ -488,12 +488,29 @@ public interface Game extends MageItem, Serializable, Copyable<Game> {
|
|||
//game transaction methods
|
||||
void saveState(boolean bookmark);
|
||||
|
||||
/**
|
||||
* Save current game state and return bookmark to it
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int bookmarkState();
|
||||
|
||||
GameState restoreState(int bookmark, String context);
|
||||
|
||||
/**
|
||||
* Remove selected bookmark and all newer bookmarks and game states
|
||||
* Part of restore/rollback lifecycle
|
||||
*
|
||||
* @param bookmark
|
||||
*/
|
||||
void removeBookmark(int bookmark);
|
||||
|
||||
/**
|
||||
* TODO: remove logic changed, must research each usage of removeBookmark and replace it with new code
|
||||
* @param bookmark
|
||||
*/
|
||||
void removeBookmark_v2(int bookmark);
|
||||
|
||||
int getSavedStateSize();
|
||||
|
||||
boolean isSaveGame();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue