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

## org.jboss.cache.pojo
Interface PojoCacheThreadContext

All Known Implementing Classes:
  PojoCacheThreadContextImpl

    public interface PojoCacheThreadContext

Represents the thread specific context for POJO Cache operations against a particular cache instance. This is primarily used to change thread specific options. Once set, they remain for the entire lifetime of the thread. Instances of this class can only be obtained by `PojoCache.getThreadContext()`

Since:
  2.1
Author:
  Jason T. Greene

Method Summary
`void` | `clear()` Clears all thread settings stored on this context.
`boolean` | `isGravitationEnabled()` Returns whether or not this thread should trigger gravitation when a cache-miss occurs.
`void` | `setGravitationEnabled(boolean gravitate)` Enables or disables gravitation on cache-miss

Method Detail

### isGravitationEnabled

    boolean isGravitationEnabled()

  Returns whether or not this thread should trigger gravitation when a cache-miss occurs. The default is false.

  Returns:
    true if gravitation should be triggered on cache-miss, false if gravitation should not be triggered

### setGravitationEnabled

    void setGravitationEnabled(boolean gravitate)

  Enables or disables gravitation on cache-miss

  Parameters:
    `gravitate` - true if gravitation should be triggered on cache-miss, false if gravitation should not be triggered

### clear

    void clear()

  Clears all thread settings stored on this context. After invoked, defaults will be returned. This will also reclaim any memory used to store this thread's settings.

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

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