Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final EventListener implmentation = // create actual implementation
- final Disruptor<ProxyMethodInvocation> disruptor = // create disruptor
- final RingBufferProxyGeneratorFactory generatorFactory =
- new RingBufferProxyGeneratorFactory();
- final RingBufferProxyGenerator proxyGenerator =
- generatorFactory.create(GeneratorType.BYTECODE_GENERATION);
- final EventListener proxy = ringBufferProxyGenerator.createRingBufferProxy(
- implementation, EventListener.class, disruptor);
- disruptor.start();
- proxy.onEventA("foo", 42);
- proxy.onEventB(Long.MIN_VALUE, Long.MAX_VALUE);
Add Comment
Please, Sign In to add comment