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.modeshape.graph.request
Class CacheableRequest

    java.lang.Object
      org.modeshape.graph.request.Request
          org.modeshape.graph.request.CacheableRequest

All Implemented Interfaces:
  Serializable, Cacheable

Direct Known Subclasses:
  GetWorkspacesRequest, ReadAllChildrenRequest, ReadAllPropertiesRequest, ReadBlockOfChildrenRequest, ReadBranchRequest, ReadNextBlockOfChildrenRequest, ReadNodeRequest, ReadPropertyRequest, VerifyNodeExistsRequest

    @ThreadSafe
    public abstract class CacheableRequest

extends Request
implements Cacheable

A request that contains results that may be cached.

See Also:
  Serialized Form

Constructor Summary
`CacheableRequest()`

Method Summary
`CachePolicy` | `getCachePolicy()` Get the caching policy to be used for this object.
`DateTime` | `getTimeLoaded()` Get the time that this node data was originally loaded.
`void` | `setCachePolicy(CachePolicy cachePolicy)` Set the caching policy for this object.
`void` | `setTimeLoaded(DateTime timeLoaded)`

Methods inherited from class org.modeshape.graph.request.Request
`cancel, checkNotFrozen, freeze, getError, getType, hasError, isCancelled, isFrozen, isReadOnly, printable, printable, setError, setLatchForFreezing`

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

Constructor Detail

### CacheableRequest

    public CacheableRequest()

Method Detail

### getCachePolicy

    public CachePolicy getCachePolicy()

  Get the caching policy to be used for this object.

  Note that the values of the policy are relative to the `time the node was loaded`, so the same instance can be used for many nodes.

  Specified by:
    `getCachePolicy` in interface `Cacheable`
  Returns:
    cachePolicy the caching policy, which may not be null
  See Also:
    `Cacheable.getCachePolicy()`

### getTimeLoaded

    public DateTime getTimeLoaded()

  Get the time that this node data was originally loaded.

  Specified by:
    `getTimeLoaded` in interface `Cacheable`
  Returns:
    the system time (in milliseconds) that the node data was loaded
  See Also:
    `Cacheable.getTimeLoaded()`

### setCachePolicy

    public void setCachePolicy(CachePolicy cachePolicy)

  Set the caching policy for this object.

  Specified by:
    `setCachePolicy` in interface `Cacheable`
  Parameters:
    `cachePolicy` - the caching policy to use for this object
  Throws:
    `IllegalStateException` - if the request is frozen
  See Also:
    `Cacheable.setCachePolicy(org.modeshape.graph.cache.CachePolicy)`

### setTimeLoaded

    public void setTimeLoaded(DateTime timeLoaded)

  Parameters:
    `timeLoaded` - Sets timeLoaded to the specified value.
  Throws:
    `IllegalStateException` - if the request is frozen

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-2011 JBoss, a division of Red Hat. All Rights Reserved.