1 Reply Latest reply on May 24, 2006 3:02 PM by Manik Surtani

    Good practice???

    babu Newbie

      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

      LRUPolicyTest.java:

      String rootStr = "/test/testdata";

      for (int i = 0; i < 10; i++)
      {
      String str = rootStr + i;
      Fqn fqn = Fqn.fromString(str);
      try
      {
      cache_.put(fqn, str, str);
      } catch (Exception e)
      {
      fail("Failed to insert data" + e);
      e.printStackTrace();
      }
      }

      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?