1 Reply Latest reply on Jul 11, 2006 6:09 AM by manik

    Acquire lock

    superuser33

      Hi, just started evaluating JBossCache for our clustering needs, and i was not able to find a simple clusterwide readLock / writeLock. Is this available/supported through JBossCache or JGroups at all?

      Ideally it would be something as simple as
      ------------------------------------------------

      ClusterLock lock = tree.acquireReadLock("/key/a",30000L); //30 second timeout
      try {
       //do stuff
      } finally {
      tree.releaseReadLock("/key/a");
      }