I am working on a project where a lot of searches are being conducted on a very large set of data so I am realizing using a traditional database structure itsn't working as I need to read tables into a HashMap format, that stays in memory the entire time, to be able to run queries in the amount of time needed for the application performance.
I am wondering what the recommended process for peristing a HashMap is with regard to speed of retrieving them from their persistent state and regard to minimizing extra code needed (as now I am writing custom classes that read the necessary data from DB tables and then create a nested HashMap reflecting the data structure that I need it to be in to be searchable as quickly as possible. I am not sure if simply writing to a text file would be a proper way to do this with regards to making sure the data is preserved and not corrupted. Any advice is appreciated