public class AtomicThrowable extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ReentrantReadWriteLock |
lock |
protected Throwable |
t |
| Constructor and Description |
|---|
AtomicThrowable()
This method creates new instance
|
AtomicThrowable(Exception e)
This method creates new instance with given initial state
|
| Modifier and Type | Method and Description |
|---|---|
Throwable |
get()
This method returns current state
|
boolean |
isTriggered()
This method returns TRUE if internal state holds error, FALSE otherwise
|
void |
set(Throwable t)
This method updates state with given Throwable
|
void |
setIfFirst(Throwable t)
This method updates state only if it wasn't set before
|
protected volatile Throwable t
protected ReentrantReadWriteLock lock
public AtomicThrowable()
public AtomicThrowable(Exception e)
e - public Throwable get()
public void set(Throwable t)
t - public void setIfFirst(Throwable t)
t - public boolean isTriggered()
Copyright © 2021. All rights reserved.