Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.infinispan.schematic.internal
Class SchematicEntryLookup

    java.lang.Object
      org.infinispan.schematic.internal.SchematicEntryLookup

    public class SchematicEntryLookup

extends Object

A helper that locates or safely constructs and registers schematic values with a given cache. This should be the only way `SchematicEntry`s are created/retrieved, to prevent concurrent creation, registration and possibly overwriting of such a value within the cache.

Since:
  5.1
Author:
  Randall Hauch (C) 2011 Red Hat Inc.
See Also:
  `SchematicEntry`

Constructor Summary
`SchematicEntryLookup()`

Method Summary
`static SchematicEntry` | `getReadOnlySchematicValue(org.infinispan.Cache<String,SchematicEntry> cache, String key)` Retrieves an atomic map from a given cache, stored under a given key, for reading only.
`static SchematicEntry` | `getSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache, String key)` Retrieves a schematic value from the given cache, stored under the given key.
`static SchematicEntry` | `getSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache, String key, boolean createIfAbsent)` Retrieves a schematic value from the given cache, stored under the given key.
`static SchematicEntry` | `getSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache, String key, org.infinispan.context.FlagContainer flagContainer)` Retrieves a schematic value from the given cache, stored under the given key.
`static void` | `removeSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache, String key)` Removes the atomic map associated with the given key from the underlying cache.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SchematicEntryLookup

    public SchematicEntryLookup()

Method Detail

### getSchematicValue

    public static SchematicEntry getSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache,
                                                   String key)

  Retrieves a schematic value from the given cache, stored under the given key. If a schematic value did not exist, one is created and registered in an atomic fashion.

  Parameters:
    `cache` - underlying cache
    `key` - key under which the schematic value exists
  Returns:
    an AtomicMap

### getSchematicValue

    public static SchematicEntry getSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache,
                                                   String key,
                                                   boolean createIfAbsent)

  Retrieves a schematic value from the given cache, stored under the given key.

  Parameters:
    `cache` - underlying cache
    `key` - key under which the atomic map exists
    `createIfAbsent` - if true, a new atomic map is created if one doesn't exist; otherwise null is returned if the map didn't exist.
  Returns:
    an AtomicMap, or null if one did not exist.

### getSchematicValue

    public static SchematicEntry getSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache,
                                                   String key,
                                                   org.infinispan.context.FlagContainer flagContainer)

  Retrieves a schematic value from the given cache, stored under the given key.

  Parameters:
    `cache` - underlying cache
    `key` - key under which the atomic map exists
    `flagContainer` - a container to pass in per-invocation flags to the underlying cache. May be null if no flags are used.
  Returns:
    an AtomicMap, or null if one did not exist.

### getReadOnlySchematicValue

    public static SchematicEntry getReadOnlySchematicValue(org.infinispan.Cache<String,SchematicEntry> cache,
                                                           String key)

  Retrieves an atomic map from a given cache, stored under a given key, for reading only. The atomic map returned will not support updates, and if the map did not in fact exist, an empty map is returned.

  Parameters:
    `cache` - underlying cache
    `key` - key under which the atomic map exists
  Returns:
    an immutable, read-only map

### removeSchematicValue

    public static void removeSchematicValue(org.infinispan.Cache<String,SchematicEntry> cache,
                                            String key)

  Removes the atomic map associated with the given key from the underlying cache.

  Parameters:
    `cache` - underlying cache
    `key` - key under which the atomic map exists

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.