Class ClientStorageRepository
java.lang.Object
com.refinedmods.refinedstorage.common.storage.ClientStorageRepository
- All Implemented Interfaces:
StorageRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves a storage by ID, if it exists.Retrieves info for a given storage ID.voidMarks to be saved.voidRemoves a storage by ID.removeIfEmpty(UUID id) If the storage exists, and is empty, it will remove the storage from the repository.voidset(UUID id, SerializableStorage storage) Sets a storage by ID.voidupdateInfo(UUID id, long stored, long capacity)
-
Constructor Details
-
ClientStorageRepository
-
-
Method Details
-
get
Description copied from interface:StorageRepositoryRetrieves a storage by ID, if it exists.- Specified by:
getin interfaceStorageRepository- Parameters:
id- the id- Returns:
- the storage, if present
-
set
Description copied from interface:StorageRepositorySets a storage by ID.- Specified by:
setin interfaceStorageRepository- Parameters:
id- the idstorage- the storage
-
removeIfEmpty
Description copied from interface:StorageRepositoryIf the storage exists, and is empty, it will remove the storage from the repository.- Specified by:
removeIfEmptyin interfaceStorageRepository- Parameters:
id- the id- Returns:
- the removed storage, if it existed and was empty
-
remove
Description copied from interface:StorageRepositoryRemoves a storage by ID.- Specified by:
removein interfaceStorageRepository- Parameters:
id- the id
-
updateInfo
-
getInfo
Description copied from interface:StorageRepositoryRetrieves info for a given storage ID.- Specified by:
getInfoin interfaceStorageRepository- Parameters:
id- the id- Returns:
- the info, or
StorageInfo.UNKNOWNif the ID was not found
-
markAsChanged
public void markAsChanged()Description copied from interface:StorageRepositoryMarks to be saved.- Specified by:
markAsChangedin interfaceStorageRepository
-