Results 1 to 2 of 2

Thread: Java version of C++ IceUtil::Cache

  1. #1
    blair is offline Registered User
    Name: Blair Zajac
    Organization: Sony Pictures Imageworks
    Project: VnP
    Join Date
    Mar 2007
    Posts
    34

    Java version of C++ IceUtil::Cache

    In the Connections issue #25 page 8, there's discussion of the C++ IceUtil::Cache class which is provided to work around the mutex in the C++ EvictorBase which allows only one servant locator to be running at a time.

    The comment is made that it's only available for C++. What's the reasoning for this?

    Our servant evictor is in Java, and in 1.5 or greater, one could in EvictorBase.java replace the java.util.Map with a java.util.concurrent.ConcurrentHashMap, but at a quick glance, this wouldn't solve all the issues of using Zeroc's LinkedList class.

    Regards,
    Blair

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Hi Blair,

    That's a bug in the article ... there is actually a corresponding pair of classes in Java, IceUtil.Cache and IceUtil.Store.

    Like IceUtil::Cache in C++, these classes are used in Java to implement the Freeze Evictor.

    As mentioned in the article, the main use of these classes is to allow concurrent lookups/loads from the database within a single servant locator + evictor.
    If you have two servant locators, each with its own associated EvictorBase evictor, there is no synchronization between these evictors, and requests could be processed in parallel by the two servant locators/evictors.

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Locator cache vs Connection cache
    By ngambek2003 in forum Help Center
    Replies: 3
    Last Post: 02-15-2010, 03:37 AM
  2. about cache in freeze
    By fanson in forum Help Center
    Replies: 2
    Last Post: 12-05-2007, 09:24 PM
  3. Replies: 0
    Last Post: 06-30-2007, 10:52 PM
  4. Replies: 1
    Last Post: 04-05-2005, 03:18 AM
  5. Smart cache
    By Claes in forum Comments
    Replies: 0
    Last Post: 09-11-2004, 12:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •