Reputation: 11
I want to create a cache module, which can store data coming from different tables. I also require search on these data.
Cache needs to store below kind of data in either map/list, and then search has to happen on country and capacity.
public class CumulativeCapacity {
private String region;
private String country;
private int capacity;
private int storeSum;
}
The search functionality is like, we have to check objects country is in the list [US, CAN, UK etc..] and capacity withing range1 and range2
as of now i created simple Cache Manager which is having list/map of these objects, and i am planning to use predicate to do the search.
any better logic using plain java classes?
Upvotes: 1
Views: 172
Reputation: 32014
1: You could use cache open source libraries.
2: If you need to write yourself, some of my idea:
Upvotes: 1