I want to restrict no of elements in a Region. As far as I know
we can only control no of nodes in one region ( Am I missing some thing here?)
So am planning to keep each element as separate node to control element count like
String rootStr = "/test/testdata";
for (int i = 0; i < 10; i++)
String str = rootStr + i;
Fqn fqn = Fqn.fromString(str);
cache_.put(fqn, str, str);
} catch (Exception e)
fail("Failed to insert data" + e);
Am not sure whether this is the right approach to restrict the elements count?
Can someone please verify this approach? Whats the performance overhead involved in this approach?
You are correct in that eviction policies only work on node count. This approach will work, in fact it may be more performant (depending on the degree of concurrency of your application) than putting them as elements in a node.