Package org.jctools.channels.proxy
Class ProxyChannelFactory
- java.lang.Object
-
- org.jctools.channels.proxy.ProxyChannelFactory
-
public class ProxyChannelFactory extends Object
-
-
Constructor Summary
Constructors Constructor Description ProxyChannelFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> ProxyChannel<E>createMpscProxy(int capacity, Class<E> iFace, WaitStrategy waitStrategy)Create a default multi producer single consumer (MPSC) proxy channel.static <E> ProxyChannel<E>createProxy(int capacity, Class<E> iFace, WaitStrategy waitStrategy, Class<? extends ProxyChannelRingBuffer> backendType)Create a proxy channel using a user supplied back end.static <E> ProxyChannel<E>createSpscProxy(int capacity, Class<E> iFace, WaitStrategy waitStrategy)Create a default single producer single consumer (SPSC) proxy channel.static longwriteAcquireWithWaitStrategy(ProxyChannelRingBuffer channelBackend, WaitStrategy waitStrategy)
-
-
-
Method Detail
-
writeAcquireWithWaitStrategy
public static long writeAcquireWithWaitStrategy(ProxyChannelRingBuffer channelBackend, WaitStrategy waitStrategy)
-
createSpscProxy
public static <E> ProxyChannel<E> createSpscProxy(int capacity, Class<E> iFace, WaitStrategy waitStrategy)
Create a default single producer single consumer (SPSC) proxy channel.- Parameters:
capacity- The minimum capacity for unprocessed invocations the channel should supportiFace- Interface the proxy must implementwaitStrategy- A wait strategy to be invoked when the backing data structure is full- Returns:
- A proxy channel instance
-
createMpscProxy
public static <E> ProxyChannel<E> createMpscProxy(int capacity, Class<E> iFace, WaitStrategy waitStrategy)
Create a default multi producer single consumer (MPSC) proxy channel.- Parameters:
capacity- The minimum capacity for unprocessed invocations the channel should supportiFace- Interface the proxy must implementwaitStrategy- A wait strategy to be invoked when the backing data structure is full- Returns:
- A proxy channel instance
-
createProxy
public static <E> ProxyChannel<E> createProxy(int capacity, Class<E> iFace, WaitStrategy waitStrategy, Class<? extends ProxyChannelRingBuffer> backendType)
Create a proxy channel using a user supplied back end.- Parameters:
capacity- The minimum capacity for unprocessed invocations the channel should supportiFace- Interface the proxy must implementwaitStrategy- A wait strategy to be invoked when the backing data structure is fullbackendType- The back end type, the proxy will inherit from this channel type. The back end type must define a constructor with signature:(int capacity, int primitiveMessageSize, int referenceMessageSize)- Returns:
- A proxy channel instance
-
-