Class SQLiteDataSpecStorage
java.lang.Object
uk.ac.manchester.spinnaker.storage.sqlite.SQLiteDataSpecStorage
- All Implemented Interfaces:
- DatabaseAPI,- DSEStorage,- ProxyAwareStorage
How to actually talk to an SQLite database.
- Author:
- Donal Fellows
- 
Nested Class SummaryNested classes/interfaces inherited from interface uk.ac.manchester.spinnaker.storage.DSEStorageDSEStorage.Ethernet
- 
Constructor SummaryConstructorsConstructorDescriptionSQLiteDataSpecStorage(DSEDatabaseEngine connectionProvider) Create an instance.
- 
Method SummaryModifier and TypeMethodDescriptionintgetAppId()Get the system wide app id.Get the machine dimensions.Get the proxy information from the database.Gets a map of region ids to pointers and content Maps only regions with a none zero size.getRegionSizes(CoreLocation core) Get a map of region id to size for regions with a none zero size.Gets the start address for the metadata on this core.listCoresToLoad(DSEStorage.Ethernet ethernet, boolean loadSystemCores) Get a list of all cores that need to be done for a particular ethernet.Get a list of all ethernets that need to have DSE loading done on them.protected static voidsetArguments(PreparedStatement statement, Object... args) Set the arguments to a prepared statement.voidsetRegionPointer(CoreLocation xyp, int regionNum, int pointer) Set the pointer for where to write the region data to.voidsetStartAddress(CoreLocation xyp, MemoryLocation start) Record the start address for the metadata on this core.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.ac.manchester.spinnaker.storage.ProxyAwareStoragegetProxyInformation
- 
Constructor Details- 
SQLiteDataSpecStorageCreate an instance.- Parameters:
- connectionProvider- The connection provider that will be asked for how to talk SQL to the database.
 
 
- 
- 
Method Details- 
listEthernetsToLoadDescription copied from interface:DSEStorageGet a list of all ethernets that need to have DSE loading done on them.- Specified by:
- listEthernetsToLoadin interface- DSEStorage
- Returns:
- The list of ethernets.
- Throws:
- StorageException- If the database access fails.
 
- 
listCoresToLoadpublic List<CoreLocation> listCoresToLoad(DSEStorage.Ethernet ethernet, boolean loadSystemCores) throws StorageException Description copied from interface:DSEStorageGet a list of all cores that need to be done for a particular ethernet.- Specified by:
- listCoresToLoadin interface- DSEStorage
- Parameters:
- ethernet- The ethernet we're loading onto.
- loadSystemCores- If- true, just list system cores. If- false, just list application (non-system) cores.
- Returns:
- The list of core locations.
- Throws:
- StorageException- If the database access fails.
 
- 
getRegionSizesDescription copied from interface:DSEStorageGet a map of region id to size for regions with a none zero size.- Specified by:
- getRegionSizesin interface- DSEStorage
- Parameters:
- core- Coordinates to get the region sizes for
- Returns:
- Sorted Map of Region number to size. For the regions with a none zero size
- Throws:
- StorageException- If the database access fails.
 
- 
getRegionPointersAndContentpublic HashMap<Integer,RegionInfo> getRegionPointersAndContent(CoreLocation xyp) throws StorageException Description copied from interface:DSEStorageGets a map of region ids to pointers and content Maps only regions with a none zero size. The content may be null is no data added- Specified by:
- getRegionPointersAndContentin interface- DSEStorage
- Parameters:
- xyp- Coordinates for the core
- Returns:
- map of region number to object holding pointer and content
- Throws:
- StorageException- If the database access fails.
 
- 
setStartAddressDescription copied from interface:DSEStorageRecord the start address for the metadata on this core.- Specified by:
- setStartAddressin interface- DSEStorage
- Parameters:
- xyp- Coordinates for the core
- start- Where the load metadata starts.
- Throws:
- StorageException- If the database access fails.
 
- 
getStartAddressDescription copied from interface:DSEStorageGets the start address for the metadata on this core.- Specified by:
- getStartAddressin interface- DSEStorage
- Parameters:
- xyp- Coordinates for the core
- Returns:
- The location of the start of the metadata region
- Throws:
- StorageException- If the database access fails.
 
- 
setRegionPointerDescription copied from interface:DSEStorageSet the pointer for where to write the region data to.- Specified by:
- setRegionPointerin interface- DSEStorage
- Parameters:
- xyp- Coordinates for the core
- regionNum- region number for this pointer
- pointer- start address for this regions metadata
- Throws:
- StorageException- If the database access fails.
 
- 
getAppIdDescription copied from interface:DSEStorageGet the system wide app id.- Specified by:
- getAppIdin interface- DSEStorage
- Returns:
- the app id
- Throws:
- StorageException- If the database access fails.
 
- 
getMachineDimensionsDescription copied from interface:DSEStorageGet the machine dimensions.- Specified by:
- getMachineDimensionsin interface- DSEStorage
- Returns:
- The machine dimensions.
- Throws:
- StorageException- If the database access fails.
 
- 
getProxyInformationDescription copied from interface:ProxyAwareStorageGet the proxy information from the database.- Specified by:
- getProxyInformationin interface- ProxyAwareStorage
- Returns:
- The proxy information, or nullif none defined. When there is no proxy, only direct connections to SpiNNaker are possible.
- Throws:
- StorageException- If anything goes wrong.
 
- 
setArgumentsSet the arguments to a prepared statement. Convenience method.
 
-