PRODUCTS AND SERVICES INDUSTRIES SUPPORT PARTNERS COMMUNITIES ABOUT
  Coherence FAQ
  Label: example

Content with label example in Coherence FAQ (See content from all spaces)
Related Labels: faq-code-examples , singleton , mutex , size , cluster

How do I create a cluster-wide named mutex?
create a clusterwide, named mutex, simply lock a key in a cache with an infinite wait time. Note that a key can be locked even though the key does not actually exist in the cache. This example implements a nonrecursive mutex. String sMutexName = "myNamedMutex ...
How do I implement a Clustered Singleton?
following code example demonstrates how to implement a clustered singleton. import com.tangosol.net.CacheFactory; import com.tangosol.net.NamedCache; / Singleton using cache to back it. (Commented out code is from a singleJVM traditional singleton pattern. New code supports stateless session EJB ...
How do I limit a cache size by bytes instead of by the entry count?
partitioned cache, use the attached cache extension MemoryLimitedCache.java which measures its units in bytes. Configure the {{highunits}} to be in bytes, as shown below. Be sure to specify the class of the cache extension, too. <localscheme> <schemename>bytelimited</schemename> <classname>com.tangosol.examples.coherence.MemoryLimitedCache</classname ...