Interface BufferManagerStorage
- All Superinterfaces:
DatabaseAPI
,ProxyAwareStorage
- All Known Implementing Classes:
SQLiteBufferStorage
public interface BufferManagerStorage extends ProxyAwareStorage
The interface supported by the storage system.
- Author:
- Donal Fellows
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
BufferManagerStorage.Region
A region descriptor. -
Method Summary
Modifier and Type Method Description void
addRecordingContents(BufferManagerStorage.Region region, byte[] contents)
Extract some bytes to the database.default void
addRecordingContents(BufferManagerStorage.Region region, ByteBuffer contents)
Extract some bytes to the database.default void
deleteRegionContents(HasCoreLocation core, int region)
Deprecated.Currently unsupported; underlying database structure absentbyte[]
getContents(BufferManagerStorage.Region region)
Retrieves some bytes from the database.List<CoreLocation>
getCoresWithStorage()
Get a list of all cores that have data stored in the database.List<Integer>
getRegionsWithStorage(HasCoreLocation core)
Get a list of all regions for a particular core that have data stored in the database.void
insertMockExtraction()
default int
storeDSEContents(BufferManagerStorage.Region region, byte[] contents)
Deprecated.Currently unsupported; underlying database structure absentdefault int
storeRegionContents(BufferManagerStorage.Region region, ByteBuffer contents)
Deprecated.Currently unsupported; underlying database structure absentMethods inherited from interface uk.ac.manchester.spinnaker.storage.ProxyAwareStorage
getProxyInformation
-
Method Details
-
getContents
Retrieves some bytes from the database. The bytes represent the contents of a recording region of a particular SpiNNaker core.- Parameters:
region
- The (DSE) region descriptor.- Returns:
- The region contents.
- Throws:
IllegalArgumentException
- If there's no such saved region.StorageException
- If anything goes wrong.
-
deleteRegionContents
@Deprecated default void deleteRegionContents(HasCoreLocation core, int region) throws StorageExceptionDeprecated.Currently unsupported; underlying database structure absentRemoves some bytes from the database. The bytes represent the contents of a DSE region of a particular SpiNNaker core.- Parameters:
core
- The core that has the memory region.region
- The region ID.- Throws:
StorageException
- If anything goes wrong.UnsupportedOperationException
- This method is unsupported.
-
getCoresWithStorage
Get a list of all cores that have data stored in the database. Warning: this is a potentially expensive operation!- Returns:
- A list of cores for which something is stored.
- Throws:
StorageException
- If anything goes wrong.
-
getRegionsWithStorage
Get a list of all regions for a particular core that have data stored in the database.- Parameters:
core
- The core that has the memory regions.- Returns:
- A list of region IDs for which something is stored.
- Throws:
StorageException
- If anything goes wrong.
-
storeDSEContents
@Deprecated default int storeDSEContents(BufferManagerStorage.Region region, byte[] contents) throws StorageExceptionDeprecated.Currently unsupported; underlying database structure absentStores some bytes in the database. The bytes represent the contents of a DSE region of a particular SpiNNaker core.- Parameters:
region
- The DSE region that this is the contents of.contents
- The contents to store.- Returns:
- The storage ID. (Not currently used elsewhere.)
- Throws:
StorageException
- If anything goes wrong.UnsupportedOperationException
- This method is unsupported.
-
storeRegionContents
@Deprecated default int storeRegionContents(BufferManagerStorage.Region region, ByteBuffer contents) throws StorageExceptionDeprecated.Currently unsupported; underlying database structure absentStores some bytes in the database. The bytes represent the contents of a DSE region of a particular SpiNNaker core.- Parameters:
region
- The DSE region that this is the contents of.contents
- The contents to store.- Returns:
- The storage ID. (Not currently used elsewhere.)
- Throws:
StorageException
- If anything goes wrong.
-
addRecordingContents
void addRecordingContents(BufferManagerStorage.Region region, byte[] contents) throws StorageExceptionExtract some bytes to the database. The bytes represent the contents of a recording region of a particular SpiNNaker core.- Parameters:
region
- The recording region doing the recording.contents
- The bytes to append.- Throws:
StorageException
- If anything goes wrong.
-
insertMockExtraction
- Throws:
StorageException
-
addRecordingContents
default void addRecordingContents(BufferManagerStorage.Region region, ByteBuffer contents) throws StorageExceptionExtract some bytes to the database. The bytes represent the contents of a recording region of a particular SpiNNaker core.- Parameters:
region
- The recording region that is being recorded.contents
- The contents to extract.- Throws:
StorageException
- If anything goes wrong.
-