org.apache.ignite.internal.processors.cache

## Class CacheInvokeResult<T>

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.CacheInvokeResult<T>

All Implemented Interfaces:
  Externalizable, Serializable, javax.cache.processor.EntryProcessorResult<T>

    public class CacheInvokeResult<T>
    extends Object
    implements javax.cache.processor.EntryProcessorResult<T>, Externalizable

Implementation of `EntryProcessorResult`.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`CacheInvokeResult()` Empty constructor required by `Externalizable`.

### Method Summary

Methods
`Exception` `error()` Entry processor error;
`static <T> CacheInvokeResult<T>` `fromError(Exception err)` Static constructor.
`static <T> CacheInvokeResult<T>` `fromResult(T res)` Static constructor.
`T` `get()`
`void` `readExternal(ObjectInput in)`
`T` `result()`
`String` `toString()`
`void` `writeExternal(ObjectOutput out)`

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

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

### Constructor Detail

#### CacheInvokeResult

    public CacheInvokeResult()

Empty constructor required by `Externalizable`.

### Method Detail

#### fromResult

    public static <T> CacheInvokeResult<T> fromResult(T res)

Static constructor.

Parameters:
  `res` - Computed result.
Returns:
  New instance.

#### result

    public T result()

Returns:
  Result.

#### error

    public Exception error()

Entry processor error;

#### fromError

    public static <T> CacheInvokeResult<T> fromError(Exception err)

Static constructor.

Parameters:
  `err` - Exception thrown by `EntryProcessor.process(MutableEntry, Object...)`.
Returns:
  New instance.

#### get

    public T get()
          throws javax.cache.processor.EntryProcessorException

Specified by:
  `get` in interface `javax.cache.processor.EntryProcessorResult<T>`
Throws:
  `javax.cache.processor.EntryProcessorException`

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Throws:
  `IOException`
  `ClassNotFoundException`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017