com.aranai.dungeonator.datastore
Interface IDungeonDataStore

All Known Implementing Classes:
DungeonDataStore

public interface IDungeonDataStore

Interface for data store classes. Specifies standard methods for accessing, updating or deleting Dungeonator metadata.


Method Summary
 void deleteChunk(DungeonChunk chunk)
          Delete chunk.
 DungeonChunk getChunk(java.lang.String hash)
          Gets a DungeonChunk from the data store.
 boolean saveChunk(DungeonChunk chunk)
          Saves a DungeonChunk to the data store.
 

Method Detail

getChunk

DungeonChunk getChunk(java.lang.String hash)
                      throws DataStoreGetException
Gets a DungeonChunk from the data store.

Parameters:
hash - the hash for the chunk
Returns:
the DungeonChunk if the hash is valid, or null otherwise
Throws:
DataStoreGetException

saveChunk

boolean saveChunk(DungeonChunk chunk)
                  throws DataStoreSaveException
Saves a DungeonChunk to the data store.

Parameters:
chunk - the DungeonChunk to save
Returns:
true, if successful
Throws:
DataStoreSaveException - if an error occurs while saving the chunk

deleteChunk

void deleteChunk(DungeonChunk chunk)
                 throws DataStoreDeleteException
Delete chunk.

Parameters:
chunk - the chunk
Throws:
DataStoreDeleteException - if an error occurs while deleting the chunk