Class ConcurrentLockedPublisher<T>

java.lang.Object
dev.getelements.elements.sdk.util.ConcurrentLockedPublisher<T>
Type Parameters:
T - the type of event to publish
All Implemented Interfaces:
AsyncPublisher<T>, Publisher<T>, Iterable<Object>

public class ConcurrentLockedPublisher<T> extends Object implements AsyncPublisher<T>, Iterable<Object>
Implements a AsyncPublisher using a Lock to control concurrency. For each published event, the supplied Lock will be acquired and then released when all associated Subscriptions have been notified. This implements Iterable for debugging only. This locks and copies the list of Subscriptions to perform the operation.