Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.grails.async.factory
[Groovy] Class SynchronousPromise

    java.lang.Object
      org.grails.async.factory.SynchronousPromise

All Implemented Interfaces:
  Promise

    @groovy.transform.CompileStatic
    class SynchronousPromise
    extends java.lang.Object

A promise that executes synchronously, in the same thread as the creator

Authors:
  Graeme Rocher

Since:
  2.3

Property Summary
`groovy.lang.Closure` | `callable`
`java.lang.Object` | `value`

Constructor Summary
`SynchronousPromise(groovy.lang.Closure callable)`

Method Summary
`java.lang.Object` | `get()`
`java.lang.Object` | `get(long timeout, java.util.concurrent.TimeUnit units)`
`Promise` | `leftShift(groovy.lang.Closure callable)`
`Promise` | `onComplete(groovy.lang.Closure callable)`
`Promise` | `onError(groovy.lang.Closure callable)`
`Promise` | `then(groovy.lang.Closure callable)`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### callable

    groovy.lang.Closure callable

### value

    java.lang.Object value

Constructor Detail

### SynchronousPromise

    SynchronousPromise(groovy.lang.Closure callable)

Method Detail

### get

    java.lang.Object get()

### get

    java.lang.Object get(long timeout, java.util.concurrent.TimeUnit units)

### leftShift

    Promise leftShift(groovy.lang.Closure callable)

### onComplete

    Promise onComplete(groovy.lang.Closure callable)

### onError

    Promise onError(groovy.lang.Closure callable)

### then

    Promise then(groovy.lang.Closure callable)

Groovy Documentation