org.modeshape.jcr.cache.document

## Class LocalDocumentStore.DocumentOperation

- java.lang.Object
- - org.modeshape.jcr.cache.document.LocalDocumentStore.DocumentOperation

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    LocalDocumentStore

      public abstract static class LocalDocumentStore.DocumentOperation
      extends Object
      implements Serializable

  An operation upon a persisted document.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.infinispan.Cache<String,SchematicEntry>` | `cache`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalDocumentStore.DocumentOperation()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `execute(String key, EditableDocument document)` Execute the operation upon the given `EditableDocument`.
    `void` | `setEnvironment(org.infinispan.Cache<String,SchematicEntry> cache)` Invoked by execution environment after the operation has been migrated for execution to a specific Infinispan node.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cache

          protected org.infinispan.Cache<String,SchematicEntry> cache

  - ### Constructor Detail

    - #### LocalDocumentStore.DocumentOperation

          public LocalDocumentStore.DocumentOperation()

  - ### Method Detail

    - #### setEnvironment

          public void setEnvironment(org.infinispan.Cache<String,SchematicEntry> cache)

      Invoked by execution environment after the operation has been migrated for execution to a specific Infinispan node.
      Parameters:
        `cache` - cache whose keys are used as input data for this DistributedCallable task

    - #### execute

          public abstract boolean execute(String key,
                        EditableDocument document)

      Execute the operation upon the given `EditableDocument`.
      Parameters:
        `key` - the document's key; never null
        `document` - the editable document; never null
      Returns:
        true if the operation modified the document, or false otherwise

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