Package io.aeron

Class ExclusivePublication

java.lang.Object
io.aeron.Publication
io.aeron.ExclusivePublication
All Implemented Interfaces:
AutoCloseable

public final class ExclusivePublication extends Publication
Aeron publisher API for sending messages to subscribers of a given channel and streamId pair. ExclusivePublications each get their own session id so multiple can be concurrently active on the same media driver as independent streams.

ExclusivePublications are created via the Aeron.addExclusivePublication(String, int) method, and messages are sent via one of the Publication.offer(DirectBuffer) methods, or a tryClaim(int, BufferClaim) and BufferClaim.commit() method combination.

ExclusivePublications have the potential to provide greater throughput than the default Publication which supports concurrent access.

The APIs for tryClaim and offer are non-blocking.

Note: Instances are NOT threadsafe for offer and tryClaim methods but are for the others.

See Also: