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
  • Method Details

    • getContents

      byte[] getContents(BufferManagerStorage.Region region) throws StorageException
      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 StorageException
      Deprecated.
      Currently unsupported; underlying database structure absent
      Removes 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

      List<CoreLocation> getCoresWithStorage() throws StorageException
      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

      List<Integer> getRegionsWithStorage(HasCoreLocation core) throws StorageException
      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 StorageException
      Deprecated.
      Currently unsupported; underlying database structure absent
      Stores 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 StorageException
      Deprecated.
      Currently unsupported; underlying database structure absent
      Stores 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 StorageException
      Extract 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

      void insertMockExtraction() throws StorageException
      Throws:
      StorageException
    • addRecordingContents

      default void addRecordingContents(BufferManagerStorage.Region region, ByteBuffer contents) throws StorageException
      Extract 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.