T - public class LockingQueue<T> extends Object
| Constructor and Description |
|---|
LockingQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
Optional<T> |
getNextOrUnlock()
Uses internal lock to be sure that this method cannot be used in the same time as other which also using internal lock
(f.e isLocked)
|
boolean |
isLocked()
Uses internal lock to be sure that this method cannot be used in the same time as other which also using internal lock
(f.e getNextOrUnlock)
|
void |
push(T t) |
boolean |
tryLock() |
void |
unlock() |
public void push(T t)
public boolean tryLock()
public boolean isLocked()
public Optional<T> getNextOrUnlock()
public void clear()
public void unlock()
Copyright © 2018. All rights reserved.