2024-05-23 14:18:16 +02:00
|
|
|
class SPECDB::Uncached(V) < DODB::Storage::Basic(V)
|
2024-05-09 12:18:46 +02:00
|
|
|
property storage_dir : String
|
|
|
|
def initialize(storage_ext = "", remove_previous_data = true)
|
2024-05-09 18:41:20 +02:00
|
|
|
@storage_dir = "specdb-storage-uncached#{storage_ext}"
|
2024-05-23 14:18:16 +02:00
|
|
|
::FileUtils.rm_rf storage_dir if remove_previous_data
|
2024-05-09 12:18:46 +02:00
|
|
|
super storage_dir
|
|
|
|
end
|
|
|
|
|
|
|
|
def rm_storage_dir
|
|
|
|
::FileUtils.rm_rf @storage_dir
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-05-23 14:18:16 +02:00
|
|
|
class SPECDB::Cached(V) < DODB::Storage::Cached(V)
|
2024-05-09 12:18:46 +02:00
|
|
|
property storage_dir : String
|
|
|
|
def initialize(storage_ext = "", remove_previous_data = true)
|
2024-05-09 18:41:20 +02:00
|
|
|
@storage_dir = "specdb-storage-cached#{storage_ext}"
|
2024-05-23 14:18:16 +02:00
|
|
|
::FileUtils.rm_rf storage_dir if remove_previous_data
|
|
|
|
super storage_dir
|
|
|
|
end
|
2024-05-09 12:18:46 +02:00
|
|
|
|
2024-05-23 14:18:16 +02:00
|
|
|
def rm_storage_dir
|
|
|
|
::FileUtils.rm_rf @storage_dir
|
|
|
|
end
|
|
|
|
end
|
2024-05-09 12:18:46 +02:00
|
|
|
|
2024-05-24 00:25:28 +02:00
|
|
|
class SPECDB::FIFO(V) < DODB::Storage::Stacked(V)
|
2024-05-23 14:18:16 +02:00
|
|
|
property storage_dir : String
|
2024-05-25 02:22:52 +02:00
|
|
|
def initialize(storage_ext = "", @max_entries : UInt32 = 5_000, remove_previous_data = true)
|
2024-05-24 00:25:28 +02:00
|
|
|
@storage_dir = "specdb-storage-fifo-#{@max_entries}#{storage_ext}"
|
2024-05-23 14:18:16 +02:00
|
|
|
::FileUtils.rm_rf storage_dir if remove_previous_data
|
2024-05-25 02:22:52 +02:00
|
|
|
super storage_dir, max_entries
|
2024-05-09 12:18:46 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
def rm_storage_dir
|
|
|
|
::FileUtils.rm_rf @storage_dir
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-05-23 14:18:16 +02:00
|
|
|
class SPECDB::RAMOnly(V) < DODB::Storage::RAMOnly(V)
|
2024-05-09 12:18:46 +02:00
|
|
|
property storage_dir : String
|
|
|
|
def initialize(storage_ext = "", remove_previous_data = true)
|
2024-05-09 18:41:20 +02:00
|
|
|
@storage_dir = "specdb-storage-ram#{storage_ext}"
|
2024-05-23 14:18:16 +02:00
|
|
|
::FileUtils.rm_rf storage_dir if remove_previous_data
|
2024-05-09 12:18:46 +02:00
|
|
|
super storage_dir
|
|
|
|
end
|
|
|
|
|
|
|
|
def rm_storage_dir
|
|
|
|
::FileUtils.rm_rf @storage_dir
|
|
|
|
end
|
|
|
|
end
|