Java Code Examples for com.android.camera.async.ConcurrentState

Following code examples demonstrate how to use com.android.camera.async.ConcurrentStatefrom android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use com.android.camera.async.ConcurrentStateand various code implementation of this class.

    public ObservableFrameServer(FrameServer delegate) {
        mDelegate = delegate;
        mClientCount = new AtomicInteger(0);
        mAvailability = new ConcurrentState<>(true);
    } 


    public AvailableTicketCounter(List<Observable<Integer>> inputs) {
        mInputs = new ArrayList<>(inputs);
        mCount = new ConcurrentState<>(0);
        mCounterLocked = new AtomicInteger(0);
    } 

Advertisement
Javadoc
Generic asynchronous state wrapper which supports two methods of interaction: polling for the latest

value and listening for updates.

Read More
Advertisement