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
  See Also:
    `SchematicEntry`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SchematicEntryLookup()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SchematicEntry` | `getReadOnlySchematicValue(org.infinispan.schematic.internal.CacheContext cacheContext, String key)` Retrieves an atomic map from a given cache, stored under a given key, for reading only.
    `static SchematicEntry` | `getSchematicValue(org.infinispan.schematic.internal.CacheContext cacheContext, String key)` Retrieves a schematic value from the given cache, stored under the given key.
    `static SchematicEntry` | `getSchematicValue(org.infinispan.schematic.internal.CacheContext cacheContext, String key, boolean createIfAbsent)` Retrieves a schematic value from the given cache, stored under the given key.
    `static SchematicEntry` | `getSchematicValue(org.infinispan.schematic.internal.CacheContext cacheContext, 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.schematic.internal.CacheContext cacheContext, 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.schematic.internal.CacheContext cacheContext,
                                         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:
        `cacheContext` - cache context
        `key` - key under which the schematic value exists
      Returns:
        an AtomicMap

    - #### getSchematicValue

          public static SchematicEntry getSchematicValue(org.infinispan.schematic.internal.CacheContext cacheContext,
                                         String key,
                                         boolean createIfAbsent)

      Retrieves a schematic value from the given cache, stored under the given key.
      Parameters:
        `cacheContext` - cache context
        `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.schematic.internal.CacheContext cacheContext,
                                         String key,
                                         org.infinispan.context.FlagContainer flagContainer)

      Retrieves a schematic value from the given cache, stored under the given key.
      Parameters:
        `cacheContext` - cache context
        `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.schematic.internal.CacheContext cacheContext,
                                                 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:
        `cacheContext` - cache context
        `key` - key under which the atomic map exists
      Returns:
        an immutable, read-only map

    - #### removeSchematicValue

          public static void removeSchematicValue(org.infinispan.schematic.internal.CacheContext cacheContext,
                                  String key)

      Removes the atomic map associated with the given key from the underlying cache.
      Parameters:
        `cacheContext` - cache context
        `key` - key under which the atomic map exists

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