- All Known Implementing Classes:
BucketStorageService,FileSystemStorageService
public interface StorageService
Interfaces for a storage service.
-
Method Summary
-
Method Details
-
listGames
Lists available games.- Returns:
- A list of unique string identifiers of available games.
- Throws:
GameStorageException- If error occur while listing the games.
-
saveGame
Saves a game.- Parameters:
game- Game to save.- Throws:
GameStorageException- If an error occurs while saving the game.
-
loadGame
Loads a game.- Parameters:
gameId- Unique identifier of the game to load.- Returns:
- An instance of the loaded game.
- Throws:
GameStorageException- If an error occurs while loading the provided game.
-
deleteGame
Deletes a game.- Parameters:
gameId- Unique identifier of the game to delete.- Throws:
GameStorageException- If some error occur while deleting the specified game.
-
newGame
Creates a new game.- Parameters:
playerName- The name of the player for the new game.- Returns:
- An instance of the new game.
-