Allow mixed storages
Closed this issue · 0 comments
raoulvdberge commented
Describe your enhancement
- Remove
ResourceList
andStorage
generic soup. StorageChannel
exists to segregate storage types from each other. However, if we remove the generics requirement onStorage
we can have a single mixedStorageChannel
. Segregation is not needed at that point (it was needed to satisfy the generic), so a natural consequence is that we can useStorageNetworkComponent
and let that be the singleStorageChannel
for the network.- If there is a single storage channel, blocks like the disk drive don't need to maintain a storage per storage channel. They can expose one storage for all the storage channels, making it easy to reason about.
- We do remove some compile time safety because we remove a generic. However, 1) it's a natural consequence if we want to allow mixed storage channels and 2) the compile time safety was mostly gone anyway already due to all the unchecked and rawtypes operations.
- We add
ResourceKey
to provide some level of safety (noObject
) - We can remove
StorageChannelType
(there is now a singleStorageChannel
so..) and move some logic toResourceKey
and introduceResourceType
.