Package: groovy.concurrent

## [Java] Enum ActorOptions.StashOverflow

- groovy.concurrent.ActorOptions.StashOverflow

-     public enum ActorOptions.StashOverflow

  Policy applied when ActorContext.stash is called and the actor's bounded stash is already at capacity.

  There is no `BLOCK` variant: the handler running `stash()` is on the actor's only worker thread, so blocking it on stash capacity would deadlock.

  Since:
    6.0.0

- - ### Enum Constants Summary

    Enum constants classes
    Enum constant | Description
    --- | ---
    `DROP_OLDEST` | The oldest stashed message is evicted to make room for the current one.
    `FAIL` | ActorContext.stash throws IllegalStateException.
    `REJECT` | The current message is rejected: any `sendAndGet` reply is bound to IllegalStateException; any pending state change computed by the current handler is discarded; the message is not added to the stash and will not be replayed.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ActorOptions.StashOverflow DROP_OLDEST

      The oldest stashed message is evicted to make room for the current one. If the evicted message originated from Actor.sendAndGet, its reply is bound to IllegalStateException so the caller does not wait forever.

    - #### ActorOptions.StashOverflow FAIL

      ActorContext.stash throws IllegalStateException. The exception propagates out of the handler unless caught; if uncaught, the dispatch treats it as a normal handler failure (reply bound to the exception, `onError` fires).

    - #### ActorOptions.StashOverflow REJECT

      The current message is rejected: any `sendAndGet` reply is bound to IllegalStateException; any pending state change computed by the current handler is discarded; the message is not added to the stash and will not be replayed.