From 2451ef06f5001b8512ad47c45a2c9781362e91af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Prante?= Date: Thu, 11 Jan 2024 18:20:30 +0100 Subject: [PATCH] refactor into subprojects event-api, event-async, event-common, event-loop, event-net-http --- build.gradle | 16 +- event-api/src/main/java/module-info.java | 3 + .../java/org/xbib/event/DefaultEvent.java | 0 .../src}/main/java/org/xbib/event/Event.java | 0 .../java/org/xbib/event/EventConsumer.java | 0 .../src}/test/resources/logging.properties | 0 event-async/build.gradle | 5 + event-async/src/main/java/module-info.java | 11 ++ .../main/java/org/xbib/event/async/Async.java | 0 .../org/xbib/event/async/AsyncOptions.java | 0 .../org/xbib/event/async/AsyncResult.java | 0 .../java/org/xbib/event/async/Closeable.java | 0 .../org/xbib/event/async/CompositeFuture.java | 0 .../java/org/xbib/event/async/Context.java | 0 .../org/xbib/event/async/EventException.java | 0 .../java/org/xbib/event/async/Future.java | 0 .../java/org/xbib/event/async/Handler.java | 0 .../event/async/NoStackTraceThrowable.java | 0 .../java/org/xbib/event/async/Promise.java | 0 .../org/xbib/event/async/TimeoutStream.java | 0 .../org/xbib/event/async/WorkerExecutor.java | 0 .../xbib/event/async/impl/AsyncBuilder.java | 0 .../org/xbib/event/async/impl/AsyncImpl.java | 0 .../xbib/event/async/impl/AsyncInternal.java | 0 .../xbib/event/async/impl/AsyncThread.java | 56 ++++++ .../xbib/event/async/impl/CloseFuture.java | 0 .../xbib/event/async/impl/ContextBase.java | 0 .../event/async/impl/ContextInternal.java | 0 .../event/async/impl/DuplicatedContext.java | 0 .../event/async/impl/EventLoopContext.java | 0 .../event/async/impl/NestedCloseable.java | 0 .../org/xbib/event/async/impl/TaskQueue.java | 0 .../org/xbib/event/async/impl/WorkerPool.java | 0 .../impl/future/CompositeFutureImpl.java | 0 .../event/async/impl/future/Composition.java | 0 .../event/async/impl/future/Eventually.java | 0 .../event/async/impl/future/FailedFuture.java | 0 .../event/async/impl/future/FixedMapping.java | 0 .../async/impl/future/FixedOtherwise.java | 0 .../event/async/impl/future/FutureBase.java | 0 .../event/async/impl/future/FutureImpl.java | 0 .../async/impl/future/FutureInternal.java | 0 .../event/async/impl/future/Listener.java | 0 .../xbib/event/async/impl/future/Mapping.java | 0 .../event/async/impl/future/Operation.java | 0 .../event/async/impl/future/Otherwise.java | 0 .../event/async/impl/future/PromiseImpl.java | 2 +- .../async/impl/future/PromiseInternal.java | 2 +- .../async/impl/future/SucceededFuture.java | 0 .../async/impl/future/Transformation.java | 0 .../io/AbstractAsyncFileReaderLines.java | 2 +- .../xbib/event/async}/io/AddOnComplete.java | 2 +- .../org/xbib/event/async}/io/AddOnError.java | 2 +- .../org/xbib/event/async}/io/AddOnNext.java | 2 +- .../xbib/event/async}/io/AddOnSubscribe.java | 2 +- .../xbib/event/async}/io/AsyncFileQuery.java | 4 +- .../event/async}/io/AsyncFileReaderBytes.java | 2 +- .../event/async}/io/AsyncFileReaderLines.java | 2 +- .../xbib/event/async}/io/AsyncFileWriter.java | 2 +- .../org/xbib/event/async}/io/AsyncFiles.java | 4 +- .../xbib/event/async}/io/EmptySubscriber.java | 2 +- .../event/async}/io/SubscriberBuilder.java | 2 +- .../org/xbib/event/async}/io/Subscribers.java | 2 +- .../event/async/spi/AsyncServiceProvider.java | 0 .../event/async/spi/AsyncThreadFactory.java | 0 .../async/spi/ExecutorServiceFactory.java | 0 .../org/xbib/event/async/streams/Pipe.java | 0 .../xbib/event/async/streams/ReadStream.java | 0 .../xbib/event/async/streams/StreamBase.java | 0 .../xbib/event/async/streams/WriteStream.java | 0 .../event/async/streams/impl/PipeImpl.java | 0 .../org/xbib/event/async}/yield/Advancer.java | 2 +- .../xbib/event/async}/yield/AsyncQuery.java | 24 +-- .../event/async}/yield/AsyncTraverser.java | 2 +- .../org/xbib/event/async}/yield/Query.java | 56 +++--- .../async}/yield/TraversableFinishError.java | 2 +- .../xbib/event/async}/yield/Traverser.java | 2 +- .../org/xbib/event/async}/yield/Yield.java | 2 +- .../yield/async/AsyncQueryDistinct.java | 4 +- .../async}/yield/async/AsyncQueryFilter.java | 4 +- .../yield/async/AsyncQueryFlatMapConcat.java | 4 +- .../yield/async/AsyncQueryFlatMapMerge.java | 4 +- .../async}/yield/async/AsyncQueryFork.java | 6 +- .../async}/yield/async/AsyncQueryMap.java | 4 +- .../async}/yield/async/AsyncQueryOf.java | 6 +- .../yield/async/AsyncQueryOfIterator.java | 4 +- .../async}/yield/async/AsyncQueryOnNext.java | 4 +- .../async}/yield/async/AsyncQuerySkip.java | 6 +- .../yield/async/AsyncQueryTakeWhile.java | 4 +- .../event/async}/yield/boxes/BoolBox.java | 2 +- .../xbib/event/async}/yield/boxes/Box.java | 2 +- .../event/async}/yield/boxes/DoubleBox.java | 2 +- .../xbib/event/async}/yield/boxes/IntBox.java | 2 +- .../event/async}/yield/boxes/LongBox.java | 2 +- .../xbib/event/async}/yield/ops/Concat.java | 10 +- .../xbib/event/async}/yield/ops/Distinct.java | 12 +- .../event/async}/yield/ops/DropWhile.java | 10 +- .../xbib/event/async}/yield/ops/Filter.java | 12 +- .../xbib/event/async}/yield/ops/FlatMap.java | 10 +- .../event/async}/yield/ops/FromArray.java | 8 +- .../xbib/event/async}/yield/ops/FromList.java | 8 +- .../event/async}/yield/ops/FromStream.java | 8 +- .../xbib/event/async}/yield/ops/Generate.java | 8 +- .../xbib/event/async}/yield/ops/Iterate.java | 8 +- .../xbib/event/async}/yield/ops/Limit.java | 10 +- .../xbib/event/async}/yield/ops/Mapping.java | 10 +- .../org/xbib/event/async}/yield/ops/Peek.java | 10 +- .../org/xbib/event/async}/yield/ops/Skip.java | 10 +- .../event/async}/yield/ops/TakeWhile.java | 10 +- .../org/xbib/event/async}/yield/ops/Zip.java | 12 +- .../yield/primitives/dbl/DoubleAdvancer.java | 10 +- .../yield/primitives/dbl/DoubleQuery.java | 56 +++--- .../yield/primitives/dbl/DoubleTraverser.java | 10 +- .../yield/primitives/dbl/DoubleYield.java | 4 +- .../primitives/dbl/ops/DoubleConcat.java | 10 +- .../primitives/dbl/ops/DoubleDistinct.java | 12 +- .../primitives/dbl/ops/DoubleDropWhile.java | 10 +- .../primitives/dbl/ops/DoubleFilter.java | 12 +- .../primitives/dbl/ops/DoubleFlatMap.java | 10 +- .../primitives/dbl/ops/DoubleGenerate.java | 8 +- .../primitives/dbl/ops/DoubleIterate.java | 8 +- .../yield/primitives/dbl/ops/DoubleLimit.java | 10 +- .../primitives/dbl/ops/DoubleMapToObj.java | 10 +- .../primitives/dbl/ops/DoubleMapping.java | 10 +- .../yield/primitives/dbl/ops/DoublePeek.java | 10 +- .../yield/primitives/dbl/ops/DoubleSkip.java | 10 +- .../primitives/dbl/ops/DoubleTakeWhile.java | 12 +- .../yield/primitives/dbl/ops/DoubleZip.java | 14 +- .../primitives/dbl/ops/FromDoubleArray.java | 8 +- .../primitives/dbl/ops/FromDoubleStream.java | 8 +- .../yield/primitives/intgr/IntAdvancer.java | 10 +- .../yield/primitives/intgr/IntQuery.java | 56 +++--- .../yield/primitives/intgr/IntTraverser.java | 10 +- .../yield/primitives/intgr/IntYield.java | 4 +- .../primitives/intgr/ops/FromIntArray.java | 8 +- .../primitives/intgr/ops/FromIntStream.java | 8 +- .../yield/primitives/intgr/ops/IntConcat.java | 10 +- .../primitives/intgr/ops/IntDistinct.java | 12 +- .../primitives/intgr/ops/IntDropWhile.java | 10 +- .../yield/primitives/intgr/ops/IntFilter.java | 12 +- .../primitives/intgr/ops/IntFlatMap.java | 10 +- .../primitives/intgr/ops/IntGenerate.java | 8 +- .../primitives/intgr/ops/IntIterate.java | 8 +- .../yield/primitives/intgr/ops/IntLimit.java | 10 +- .../primitives/intgr/ops/IntMapToObj.java | 10 +- .../primitives/intgr/ops/IntMapping.java | 10 +- .../yield/primitives/intgr/ops/IntPeek.java | 10 +- .../yield/primitives/intgr/ops/IntSkip.java | 10 +- .../primitives/intgr/ops/IntTakeWhile.java | 12 +- .../yield/primitives/intgr/ops/IntZip.java | 14 +- .../yield/primitives/lng/LongAdvancer.java | 10 +- .../yield/primitives/lng/LongQuery.java | 56 +++--- .../yield/primitives/lng/LongTraverser.java | 12 +- .../yield/primitives/lng/LongYield.java | 4 +- .../primitives/lng/ops/FromLongArray.java | 8 +- .../primitives/lng/ops/FromLongStream.java | 8 +- .../yield/primitives/lng/ops/LongConcat.java | 10 +- .../primitives/lng/ops/LongDistinct.java | 12 +- .../primitives/lng/ops/LongDropWhile.java | 10 +- .../yield/primitives/lng/ops/LongFilter.java | 12 +- .../yield/primitives/lng/ops/LongFlatMap.java | 10 +- .../primitives/lng/ops/LongGenerate.java | 8 +- .../yield/primitives/lng/ops/LongIterate.java | 8 +- .../yield/primitives/lng/ops/LongLimit.java | 10 +- .../yield/primitives/lng/ops/LongMap.java | 10 +- .../primitives/lng/ops/LongMapToObj.java | 10 +- .../yield/primitives/lng/ops/LongPeek.java | 10 +- .../yield/primitives/lng/ops/LongSkip.java | 10 +- .../primitives/lng/ops/LongTakeWhile.java | 12 +- .../yield/primitives/lng/ops/LongZip.java | 14 +- .../event/async/io}/AsyncFileReaderTest.java | 7 +- .../event/async/io}/AsyncFileWriterTest.java | 3 +- .../event/async/io}/AsyncFilesFailures.java | 4 +- .../Metamorphosis-by-Franz-Kafka.txt | 0 .../resources/The-Wizard-by-Rider-Haggard.txt | 0 .../src}/test/resources/UTF-8-test.txt | Bin .../src/test/resources/logging.properties | 6 + event-common/build.gradle | 10 ++ .../src}/main/java/module-info.java | 28 ++- .../xbib/event/bus/AllowConcurrentEvents.java | 0 .../org/xbib/event/bus/AsyncEventBus.java | 0 .../java/org/xbib/event/bus/DeadEvent.java | 0 .../java/org/xbib/event/bus/Dispatcher.java | 0 .../java/org/xbib/event/bus/EventBus.java | 0 .../org/xbib/event/bus/LoggingHandler.java | 0 .../java/org/xbib/event/bus/Subscribe.java | 0 .../java/org/xbib/event/bus/Subscriber.java | 0 .../event/bus/SubscriberExceptionContext.java | 0 .../event/bus/SubscriberExceptionHandler.java | 0 .../xbib/event/bus/SubscriberRegistry.java | 0 .../event/bus/util/ConcatenatedIterator.java | 0 .../org/xbib/event/bus/util/TypeToken.java | 0 .../org/xbib/event/bus/util/TypeVisitor.java | 0 .../java/org/xbib/event/clock/ClockEvent.java | 0 .../xbib/event/clock/ClockEventManager.java | 0 .../xbib/event/clock/ClockEventService.java | 0 .../xbib/event/clock/DefaultClockEvent.java | 0 .../event/clock/SimpleClockEventConsumer.java | 0 .../org/xbib/event/common}/EventManager.java | 8 +- .../event/generic/DefaultGenericEvent.java | 0 .../org/xbib/event/generic/GenericEvent.java | 0 .../event/generic/GenericEventManager.java | 0 .../java/org/xbib/event/generic/Listener.java | 0 .../event/log/ByteCountingOutputStream.java | 0 .../xbib/event/log/CharCountingWriter.java | 0 .../main/java/org/xbib/event/log/Clock.java | 0 .../xbib/event/log/DailyRotationPolicy.java | 0 .../event/log/LoggingRotationListener.java | 0 .../java/org/xbib/event/log/Rotatable.java | 0 .../event/log/RotatingFileOutputStream.java | 0 .../xbib/event/log/RotatingFilePattern.java | 0 .../log/RotatingFilePatternException.java | 0 .../xbib/event/log/RotatingFileWriter.java | 0 .../org/xbib/event/log/RotationConfig.java | 0 .../org/xbib/event/log/RotationListener.java | 0 .../org/xbib/event/log/RotationPolicy.java | 0 .../event/log/SizeBasedRotationPolicy.java | 0 .../java/org/xbib/event/log/SystemClock.java | 0 .../event/log/TimeBasedRotationPolicy.java | 0 .../xbib/event/log/WeeklyRotationPolicy.java | 0 .../event/path}/DefaultFileFollowEvent.java | 2 +- .../xbib/event}/path/DefaultPathEvent.java | 2 +- .../org/xbib/event/path}/FileFollowEvent.java | 2 +- .../event/path}/FileFollowEventManager.java | 2 +- .../event/path}/FileFollowEventService.java | 2 +- .../java/org/xbib/event}/path/PathEvent.java | 2 +- .../xbib/event}/path/PathEventManager.java | 2 +- .../xbib/event}/path/PathEventService.java | 2 +- .../persistence/AbstractPersistenceStore.java | 0 .../org/xbib/event/persistence/Codec.java | 0 .../xbib/event/persistence/Durability.java | 0 .../xbib/event/persistence/FileJsonCodec.java | 0 .../persistence/FilePersistenceStore.java | 0 .../org/xbib/event/persistence/Journal.java | 0 .../event/persistence/PersistenceStore.java | 0 .../xbib/event/syslog/CEFMessageParser.java | 0 .../event/syslog/DefaultSyslogMessage.java | 0 .../event/syslog/DefaultSyslogRequest.java | 0 .../org/xbib/event/syslog/EncoderHelper.java | 0 .../java/org/xbib/event/syslog/Message.java | 0 .../org/xbib/event/syslog/MessageEncoder.java | 0 .../org/xbib/event/syslog/MessageKey.java | 0 .../org/xbib/event/syslog/MessageParser.java | 0 .../org/xbib/event/syslog/MessageType.java | 0 .../java/org/xbib/event/syslog/Priority.java | 0 .../event/syslog/RFC3164MessageParser.java | 0 .../event/syslog/RFC5424MessageParser.java | 0 .../xbib/event/syslog/SyslogEventManager.java | 1 - .../xbib/event/syslog/SyslogFrameDecoder.java | 0 .../event/syslog/SyslogIdleStateHandler.java | 0 .../org/xbib/event/syslog/SyslogMessage.java | 0 .../event/syslog/SyslogMessageHandler.java | 0 .../xbib/event/syslog/SyslogMessageKey.java | 0 .../org/xbib/event/syslog/SyslogRequest.java | 0 .../org/xbib/event/syslog/SyslogService.java | 0 .../event/syslog/TCPSyslogMessageDecoder.java | 0 .../event/syslog/UDPSyslogMessageDecoder.java | 0 .../xbib/event/timer/DefaultTimerEvent.java | 0 .../java/org/xbib/event/timer/TimerEvent.java | 0 .../xbib/event/timer/TimerEventManager.java | 0 .../xbib/event/timer/TimerEventService.java | 0 .../org/xbib/event/wal/BlockingQueuePool.java | 0 .../event/wal/ByteArrayDataOutputStream.java | 0 .../event/wal/ByteCountingInputStream.java | 0 .../org/xbib/event/wal/HashMapSnapshot.java | 0 .../org/xbib/event/wal/JournalRecovery.java | 0 .../org/xbib/event/wal/JournalSummary.java | 0 .../event/wal/LengthDelimitedJournal.java | 0 .../xbib/event/wal/LimitingInputStream.java | 0 .../java/org/xbib/event/wal/ObjectPool.java | 0 .../java/org/xbib/event/wal/RecordLookup.java | 0 .../wal/SequentialAccessWriteAheadLog.java | 0 .../main/java/org/xbib/event/wal/SerDe.java | 0 .../java/org/xbib/event/wal/SerDeFactory.java | 0 .../org/xbib/event/wal/SnapshotCapture.java | 0 .../org/xbib/event/wal/SnapshotRecovery.java | 0 .../event/wal/StandardJournalRecovery.java | 0 .../event/wal/StandardJournalSummary.java | 0 .../event/wal/StandardSnapshotRecovery.java | 0 .../java/org/xbib/event/wal/SyncListener.java | 5 +- .../java/org/xbib/event/wal/UpdateType.java | 0 .../org/xbib/event/wal/WriteAheadJournal.java | 0 .../xbib/event/wal/WriteAheadRepository.java | 0 .../xbib/event/wal/WriteAheadSnapshot.java | 0 .../services/org.xbib.settings.SettingsLoader | 0 .../java/org/xbib/event/EventManagerTest.java | 1 + .../org/xbib/event/bus/AsyncEventBusTest.java | 0 .../java/org/xbib/event/bus/EventBusTest.java | 0 .../xbib/event/bus/ReentrantEventsTest.java | 0 .../org/xbib/event/bus/StringCatcher.java | 0 .../event/clock/ClockEventManagerTest.java | 2 +- .../org/xbib/event/clock/TestClockEvent.java | 0 .../event/clock/TestClockEventConsumer.java | 0 .../path}/FileFollowEventManagerTest.java | 4 +- .../xbib/event/path}/TestFileFollowEvent.java | 2 +- .../path}/TestFileFollowEventConsumer.java | 5 +- .../xbib/event/syslog/SyslogServiceTest.java | 0 .../org/xbib/event/timer/TestTimerEvent.java | 0 .../event/timer/TestTimerEventConsumer.java | 0 .../event/timer/TimerEventManagerTest.java | 2 +- .../src/test/resources/logging.properties | 6 + event-loop/src/main/java/module-info.java | 8 + .../event/loop/AbstractEventExecutor.java | 9 - .../loop/AbstractEventExecutorGroup.java | 3 - .../org/xbib/event/loop}/AbstractFuture.java | 2 +- .../loop/AbstractScheduledEventExecutor.java | 8 +- .../loop/BlockingOperationException.java | 0 .../org/xbib/event/loop}/CompleteFuture.java | 2 +- .../DefaultEventExecutorChooserFactory.java | 0 .../event/loop}/DefaultFutureListeners.java | 2 +- .../loop}/DefaultProgressivePromise.java | 2 +- .../org/xbib/event/loop}/DefaultPromise.java | 6 +- .../org/xbib/event/loop/EventExecutor.java | 6 - .../loop/EventExecutorChooserFactory.java | 0 .../xbib/event/loop/EventExecutorGroup.java | 3 - .../java/org/xbib/event/loop/EventLoop.java | 0 .../xbib/event/loop/EventLoopException.java | 0 .../org/xbib/event/loop/EventLoopGroup.java | 0 .../event/loop/EventLoopTaskQueueFactory.java | 0 .../org/xbib/event/loop}/FailedFuture.java | 2 +- .../java/org/xbib/event/loop}/Future.java | 2 +- .../org/xbib/event/loop}/FutureListener.java | 2 +- .../event/loop}/GenericFutureListener.java | 2 +- .../GenericProgressiveFutureListener.java | 2 +- .../xbib/event/loop/GlobalEventExecutor.java | 7 +- .../loop/MultithreadEventExecutorGroup.java | 8 +- .../event/loop/MultithreadEventLoopGroup.java | 2 +- .../xbib/event/loop/OrderedEventExecutor.java | 0 .../xbib/event/loop}/ProgressiveFuture.java | 2 +- .../xbib/event/loop}/ProgressivePromise.java | 2 +- .../java/org/xbib/event/loop}/Promise.java | 2 +- .../org/xbib/event/loop}/PromiseTask.java | 4 +- .../event/loop/RejectedExecutionHandler.java | 0 .../event/loop/RejectedExecutionHandlers.java | 0 .../org/xbib/event/loop}/ScheduledFuture.java | 2 +- .../xbib/event/loop}/ScheduledFutureTask.java | 8 +- .../event/loop/SingleThreadEventExecutor.java | 12 +- .../event/loop/SingleThreadEventLoop.java | 0 .../org/xbib/event/loop}/SucceededFuture.java | 4 +- .../org/xbib/event/loop/nio/NioEventLoop.java | 2 +- .../event/loop/nio/NioEventLoopGroup.java | 0 .../java/org/xbib/event/loop/nio/NioTask.java | 0 .../loop/nio/SelectedSelectionKeySet.java | 0 .../nio/SelectedSelectionKeySetSelector.java | 0 .../loop/selector/DefaultSelectStrategy.java | 2 +- .../DefaultSelectStrategyFactory.java | 0 .../event/loop/selector/SelectStrategy.java | 2 +- .../loop/selector/SelectStrategyFactory.java | 0 .../loop}/thread/DefaultThreadFactory.java | 2 +- .../event/loop}/thread/FastThreadLocal.java | 2 +- .../loop}/thread/FastThreadLocalRunnable.java | 2 +- .../loop}/thread/FastThreadLocalThread.java | 2 +- .../loop}/thread/InternalThreadLocalMap.java | 2 +- .../event/loop}/thread/ThreadExecutorMap.java | 2 +- .../xbib/event/loop}/thread/ThreadInfo.java | 2 +- .../loop}/thread/ThreadPerTaskExecutor.java | 2 +- .../event/loop}/thread/ThreadProperties.java | 2 +- .../loop}/thread/TypeParameterMatcher.java | 2 +- .../loop}/util/DefaultPriorityQueue.java | 4 +- .../xbib/event/loop}/util/IntSupplier.java | 2 +- .../xbib/event/loop}/util/PriorityQueue.java | 2 +- .../event/loop}/util/PriorityQueueNode.java | 2 +- gradle.properties | 2 +- gradle/publish/sonatype.gradle | 12 ++ settings.gradle | 8 +- .../xbib/event/async/impl/AsyncThread.java | 56 ------ .../java/org/xbib/event/queue/QueueEvent.java | 35 ---- .../queue/path/simple/PathQueueEvent.java | 61 ------- .../path/simple/PathQueueEventManager.java | 151 ---------------- .../path/simple/PathQueueEventService.java | 102 ----------- .../queue/path/watch/PathQueueEvent.java | 61 ------- .../path/watch/PathQueueEventManager.java | 168 ------------------ .../path/watch/PathQueueEventService.java | 155 ---------------- 373 files changed, 757 insertions(+), 1473 deletions(-) create mode 100644 event-api/src/main/java/module-info.java rename {src => event-api/src}/main/java/org/xbib/event/DefaultEvent.java (100%) rename {src => event-api/src}/main/java/org/xbib/event/Event.java (100%) rename {src => event-api/src}/main/java/org/xbib/event/EventConsumer.java (100%) rename {src => event-api/src}/test/resources/logging.properties (100%) create mode 100644 event-async/build.gradle create mode 100644 event-async/src/main/java/module-info.java rename {src => event-async/src}/main/java/org/xbib/event/async/Async.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/AsyncOptions.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/AsyncResult.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/Closeable.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/CompositeFuture.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/Context.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/EventException.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/Future.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/Handler.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/NoStackTraceThrowable.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/Promise.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/TimeoutStream.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/WorkerExecutor.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/AsyncBuilder.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/AsyncImpl.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/AsyncInternal.java (100%) create mode 100644 event-async/src/main/java/org/xbib/event/async/impl/AsyncThread.java rename {src => event-async/src}/main/java/org/xbib/event/async/impl/CloseFuture.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/ContextBase.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/ContextInternal.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/DuplicatedContext.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/EventLoopContext.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/NestedCloseable.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/TaskQueue.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/WorkerPool.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/CompositeFutureImpl.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/Composition.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/Eventually.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/FailedFuture.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/FixedMapping.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/FixedOtherwise.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/FutureBase.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/FutureImpl.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/FutureInternal.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/Listener.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/Mapping.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/Operation.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/Otherwise.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/PromiseImpl.java (96%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/PromiseInternal.java (89%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/SucceededFuture.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/impl/future/Transformation.java (100%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AbstractAsyncFileReaderLines.java (99%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AddOnComplete.java (91%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AddOnError.java (95%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AddOnNext.java (92%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AddOnSubscribe.java (94%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AsyncFileQuery.java (96%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AsyncFileReaderBytes.java (98%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AsyncFileReaderLines.java (99%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AsyncFileWriter.java (99%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/AsyncFiles.java (99%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/EmptySubscriber.java (94%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/SubscriberBuilder.java (96%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/io/Subscribers.java (86%) rename {src => event-async/src}/main/java/org/xbib/event/async/spi/AsyncServiceProvider.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/spi/AsyncThreadFactory.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/spi/ExecutorServiceFactory.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/streams/Pipe.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/streams/ReadStream.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/streams/StreamBase.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/streams/WriteStream.java (100%) rename {src => event-async/src}/main/java/org/xbib/event/async/streams/impl/PipeImpl.java (100%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/Advancer.java (91%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/AsyncQuery.java (84%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/AsyncTraverser.java (95%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/Query.java (92%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/TraversableFinishError.java (89%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/Traverser.java (93%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/Yield.java (89%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryDistinct.java (88%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryFilter.java (89%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryFlatMapConcat.java (91%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryFlatMapMerge.java (93%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryFork.java (80%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryMap.java (89%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryOf.java (78%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryOfIterator.java (86%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryOnNext.java (88%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQuerySkip.java (84%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/async/AsyncQueryTakeWhile.java (95%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/boxes/BoolBox.java (90%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/boxes/Box.java (92%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/boxes/DoubleBox.java (94%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/boxes/IntBox.java (93%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/boxes/LongBox.java (93%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Concat.java (72%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Distinct.java (74%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/DropWhile.java (85%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Filter.java (77%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/FlatMap.java (80%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/FromArray.java (82%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/FromList.java (74%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/FromStream.java (75%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Generate.java (73%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Iterate.java (78%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Limit.java (78%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Mapping.java (74%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Peek.java (76%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Skip.java (79%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/TakeWhile.java (82%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/ops/Zip.java (79%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/DoubleAdvancer.java (90%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/DoubleQuery.java (91%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/DoubleTraverser.java (90%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/DoubleYield.java (74%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleConcat.java (64%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleDistinct.java (69%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleDropWhile.java (80%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleFilter.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleFlatMap.java (73%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleGenerate.java (66%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleIterate.java (76%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleLimit.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleMapToObj.java (72%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleMapping.java (67%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoublePeek.java (69%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleSkip.java (72%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleTakeWhile.java (75%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/DoubleZip.java (70%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/FromDoubleArray.java (76%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/dbl/ops/FromDoubleStream.java (72%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/IntAdvancer.java (89%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/IntQuery.java (91%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/IntTraverser.java (89%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/IntYield.java (73%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/FromIntArray.java (75%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/FromIntStream.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntConcat.java (63%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntDistinct.java (68%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntDropWhile.java (80%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntFilter.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntFlatMap.java (72%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntGenerate.java (66%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntIterate.java (75%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntLimit.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntMapToObj.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntMapping.java (66%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntPeek.java (68%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntSkip.java (72%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntTakeWhile.java (74%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/intgr/ops/IntZip.java (69%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/LongAdvancer.java (89%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/LongQuery.java (91%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/LongTraverser.java (88%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/LongYield.java (73%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/FromLongArray.java (76%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/FromLongStream.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongConcat.java (64%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongDistinct.java (69%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongDropWhile.java (80%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongFilter.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongFlatMap.java (73%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongGenerate.java (66%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongIterate.java (75%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongLimit.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongMap.java (66%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongMapToObj.java (71%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongPeek.java (69%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongSkip.java (72%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongTakeWhile.java (75%) rename {src/main/java/org/xbib/event => event-async/src/main/java/org/xbib/event/async}/yield/primitives/lng/ops/LongZip.java (70%) rename {src/test/java/org/xbib/event/io/test => event-async/src/test/java/org/xbib/event/async/io}/AsyncFileReaderTest.java (99%) rename {src/test/java/org/xbib/event/io/test => event-async/src/test/java/org/xbib/event/async/io}/AsyncFileWriterTest.java (98%) rename {src/test/java/org/xbib/event/io/test => event-async/src/test/java/org/xbib/event/async/io}/AsyncFilesFailures.java (98%) rename {src => event-async/src}/test/resources/Metamorphosis-by-Franz-Kafka.txt (100%) rename {src => event-async/src}/test/resources/The-Wizard-by-Rider-Haggard.txt (100%) rename {src => event-async/src}/test/resources/UTF-8-test.txt (100%) create mode 100644 event-async/src/test/resources/logging.properties create mode 100644 event-common/build.gradle rename {src => event-common/src}/main/java/module-info.java (58%) rename {src => event-common/src}/main/java/org/xbib/event/bus/AllowConcurrentEvents.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/AsyncEventBus.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/DeadEvent.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/Dispatcher.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/EventBus.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/LoggingHandler.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/Subscribe.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/Subscriber.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/SubscriberExceptionContext.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/SubscriberExceptionHandler.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/SubscriberRegistry.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/util/ConcatenatedIterator.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/util/TypeToken.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/bus/util/TypeVisitor.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/clock/ClockEvent.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/clock/ClockEventManager.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/clock/ClockEventService.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/clock/DefaultClockEvent.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/clock/SimpleClockEventConsumer.java (100%) rename {src/main/java/org/xbib/event => event-common/src/main/java/org/xbib/event/common}/EventManager.java (97%) rename {src => event-common/src}/main/java/org/xbib/event/generic/DefaultGenericEvent.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/generic/GenericEvent.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/generic/GenericEventManager.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/generic/Listener.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/ByteCountingOutputStream.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/CharCountingWriter.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/Clock.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/DailyRotationPolicy.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/LoggingRotationListener.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/Rotatable.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/RotatingFileOutputStream.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/RotatingFilePattern.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/RotatingFilePatternException.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/RotatingFileWriter.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/RotationConfig.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/RotationListener.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/RotationPolicy.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/SizeBasedRotationPolicy.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/SystemClock.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/TimeBasedRotationPolicy.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/log/WeeklyRotationPolicy.java (100%) rename {src/main/java/org/xbib/event/io/file => event-common/src/main/java/org/xbib/event/path}/DefaultFileFollowEvent.java (94%) rename {src/main/java/org/xbib/event/io => event-common/src/main/java/org/xbib/event}/path/DefaultPathEvent.java (98%) rename {src/main/java/org/xbib/event/io/file => event-common/src/main/java/org/xbib/event/path}/FileFollowEvent.java (87%) rename {src/main/java/org/xbib/event/io/file => event-common/src/main/java/org/xbib/event/path}/FileFollowEventManager.java (98%) rename {src/main/java/org/xbib/event/io/file => event-common/src/main/java/org/xbib/event/path}/FileFollowEventService.java (99%) rename {src/main/java/org/xbib/event/io => event-common/src/main/java/org/xbib/event}/path/PathEvent.java (92%) rename {src/main/java/org/xbib/event/io => event-common/src/main/java/org/xbib/event}/path/PathEventManager.java (99%) rename {src/main/java/org/xbib/event/io => event-common/src/main/java/org/xbib/event}/path/PathEventService.java (99%) rename {src => event-common/src}/main/java/org/xbib/event/persistence/AbstractPersistenceStore.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/persistence/Codec.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/persistence/Durability.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/persistence/FileJsonCodec.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/persistence/FilePersistenceStore.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/persistence/Journal.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/persistence/PersistenceStore.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/CEFMessageParser.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/DefaultSyslogMessage.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/DefaultSyslogRequest.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/EncoderHelper.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/Message.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/MessageEncoder.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/MessageKey.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/MessageParser.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/MessageType.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/Priority.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/RFC3164MessageParser.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/RFC5424MessageParser.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogEventManager.java (96%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogFrameDecoder.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogIdleStateHandler.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogMessage.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogMessageHandler.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogMessageKey.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogRequest.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/SyslogService.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/TCPSyslogMessageDecoder.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/syslog/UDPSyslogMessageDecoder.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/timer/DefaultTimerEvent.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/timer/TimerEvent.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/timer/TimerEventManager.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/timer/TimerEventService.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/BlockingQueuePool.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/ByteArrayDataOutputStream.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/ByteCountingInputStream.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/HashMapSnapshot.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/JournalRecovery.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/JournalSummary.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/LengthDelimitedJournal.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/LimitingInputStream.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/ObjectPool.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/RecordLookup.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/SequentialAccessWriteAheadLog.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/SerDe.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/SerDeFactory.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/SnapshotCapture.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/SnapshotRecovery.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/StandardJournalRecovery.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/StandardJournalSummary.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/StandardSnapshotRecovery.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/SyncListener.java (91%) rename {src => event-common/src}/main/java/org/xbib/event/wal/UpdateType.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/WriteAheadJournal.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/WriteAheadRepository.java (100%) rename {src => event-common/src}/main/java/org/xbib/event/wal/WriteAheadSnapshot.java (100%) rename {src/test => event-common/src/main}/resources/META-INF/services/org.xbib.settings.SettingsLoader (100%) rename {src => event-common/src}/test/java/org/xbib/event/EventManagerTest.java (98%) rename {src => event-common/src}/test/java/org/xbib/event/bus/AsyncEventBusTest.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/bus/EventBusTest.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/bus/ReentrantEventsTest.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/bus/StringCatcher.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/clock/ClockEventManagerTest.java (95%) rename {src => event-common/src}/test/java/org/xbib/event/clock/TestClockEvent.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/clock/TestClockEventConsumer.java (100%) rename {src/test/java/org/xbib/event/io/file => event-common/src/test/java/org/xbib/event/path}/FileFollowEventManagerTest.java (95%) rename {src/test/java/org/xbib/event/io/file => event-common/src/test/java/org/xbib/event/path}/TestFileFollowEvent.java (68%) rename {src/test/java/org/xbib/event/io/file => event-common/src/test/java/org/xbib/event/path}/TestFileFollowEventConsumer.java (81%) rename {src => event-common/src}/test/java/org/xbib/event/syslog/SyslogServiceTest.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/timer/TestTimerEvent.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/timer/TestTimerEventConsumer.java (100%) rename {src => event-common/src}/test/java/org/xbib/event/timer/TimerEventManagerTest.java (95%) create mode 100644 event-common/src/test/resources/logging.properties create mode 100644 event-loop/src/main/java/module-info.java rename {src => event-loop/src}/main/java/org/xbib/event/loop/AbstractEventExecutor.java (93%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/AbstractEventExecutorGroup.java (97%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/AbstractFuture.java (97%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/AbstractScheduledEventExecutor.java (97%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/BlockingOperationException.java (100%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/CompleteFuture.java (99%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/DefaultEventExecutorChooserFactory.java (100%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/DefaultFutureListeners.java (98%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/DefaultProgressivePromise.java (99%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/DefaultPromise.java (99%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/EventExecutor.java (92%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/EventExecutorChooserFactory.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/EventExecutorGroup.java (97%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/EventLoop.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/EventLoopException.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/EventLoopGroup.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/EventLoopTaskQueueFactory.java (100%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/FailedFuture.java (97%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/Future.java (97%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/FutureListener.java (73%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/GenericFutureListener.java (85%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/GenericProgressiveFutureListener.java (94%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/GlobalEventExecutor.java (98%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/MultithreadEventExecutorGroup.java (96%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/MultithreadEventLoopGroup.java (97%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/OrderedEventExecutor.java (100%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/ProgressiveFuture.java (97%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/ProgressivePromise.java (98%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/Promise.java (96%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/PromiseTask.java (98%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/RejectedExecutionHandler.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/RejectedExecutionHandlers.java (100%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/ScheduledFuture.java (87%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/ScheduledFutureTask.java (96%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/SingleThreadEventExecutor.java (99%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/SingleThreadEventLoop.java (100%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/SucceededFuture.java (91%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/nio/NioEventLoop.java (99%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/nio/NioEventLoopGroup.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/nio/NioTask.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySetSelector.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/selector/DefaultSelectStrategy.java (90%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/selector/DefaultSelectStrategyFactory.java (100%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/selector/SelectStrategy.java (96%) rename {src => event-loop/src}/main/java/org/xbib/event/loop/selector/SelectStrategyFactory.java (100%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/DefaultThreadFactory.java (98%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/FastThreadLocal.java (99%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/FastThreadLocalRunnable.java (94%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/FastThreadLocalThread.java (99%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/InternalThreadLocalMap.java (99%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/ThreadExecutorMap.java (98%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/ThreadInfo.java (90%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/ThreadPerTaskExecutor.java (93%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/ThreadProperties.java (94%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/thread/TypeParameterMatcher.java (99%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/util/DefaultPriorityQueue.java (98%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/util/IntSupplier.java (85%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/util/PriorityQueue.java (97%) rename {src/main/java/org/xbib/event => event-loop/src/main/java/org/xbib/event/loop}/util/PriorityQueueNode.java (96%) create mode 100644 gradle/publish/sonatype.gradle delete mode 100644 src/main/java/org/xbib/event/async/impl/AsyncThread.java delete mode 100644 src/main/java/org/xbib/event/queue/QueueEvent.java delete mode 100644 src/main/java/org/xbib/event/queue/path/simple/PathQueueEvent.java delete mode 100644 src/main/java/org/xbib/event/queue/path/simple/PathQueueEventManager.java delete mode 100644 src/main/java/org/xbib/event/queue/path/simple/PathQueueEventService.java delete mode 100644 src/main/java/org/xbib/event/queue/path/watch/PathQueueEvent.java delete mode 100644 src/main/java/org/xbib/event/queue/path/watch/PathQueueEventManager.java delete mode 100644 src/main/java/org/xbib/event/queue/path/watch/PathQueueEventService.java diff --git a/build.gradle b/build.gradle index b63e462..6cdbe89 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { wrapper { gradleVersion = libs.versions.gradle.get() - distributionType = Wrapper.DistributionType.ALL + distributionType = Wrapper.DistributionType.BIN } ext { @@ -24,12 +24,15 @@ ext { licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' } -apply plugin: 'java-library' -apply from: rootProject.file('gradle/compile/java.gradle') -apply from: rootProject.file('gradle/test/junit5.gradle') -apply from: rootProject.file('gradle/repositories/maven.gradle') -apply from: rootProject.file('gradle/publish/maven.gradle') +subprojects { + apply from: rootProject.file('gradle/compile/java.gradle') + apply from: rootProject.file('gradle/test/junit5.gradle') + apply from: rootProject.file('gradle/repositories/maven.gradle') +} +apply from: rootProject.file('gradle/publish/sonatype.gradle') +apply from: rootProject.file('gradle/publish/forgejo.gradle') +/* dependencies { api libs.settings.api implementation libs.net @@ -41,3 +44,4 @@ dependencies { testImplementation libs.rxjava3 testImplementation libs.settings.datastructures.json } +*/ \ No newline at end of file diff --git a/event-api/src/main/java/module-info.java b/event-api/src/main/java/module-info.java new file mode 100644 index 0000000..4c7f790 --- /dev/null +++ b/event-api/src/main/java/module-info.java @@ -0,0 +1,3 @@ +module org.xbib.event.api { + exports org.xbib.event; +} diff --git a/src/main/java/org/xbib/event/DefaultEvent.java b/event-api/src/main/java/org/xbib/event/DefaultEvent.java similarity index 100% rename from src/main/java/org/xbib/event/DefaultEvent.java rename to event-api/src/main/java/org/xbib/event/DefaultEvent.java diff --git a/src/main/java/org/xbib/event/Event.java b/event-api/src/main/java/org/xbib/event/Event.java similarity index 100% rename from src/main/java/org/xbib/event/Event.java rename to event-api/src/main/java/org/xbib/event/Event.java diff --git a/src/main/java/org/xbib/event/EventConsumer.java b/event-api/src/main/java/org/xbib/event/EventConsumer.java similarity index 100% rename from src/main/java/org/xbib/event/EventConsumer.java rename to event-api/src/main/java/org/xbib/event/EventConsumer.java diff --git a/src/test/resources/logging.properties b/event-api/src/test/resources/logging.properties similarity index 100% rename from src/test/resources/logging.properties rename to event-api/src/test/resources/logging.properties diff --git a/event-async/build.gradle b/event-async/build.gradle new file mode 100644 index 0000000..21250f6 --- /dev/null +++ b/event-async/build.gradle @@ -0,0 +1,5 @@ +dependencies { + api project(':event-loop') + implementation libs.reactivestreams + testImplementation libs.rxjava3 +} diff --git a/event-async/src/main/java/module-info.java b/event-async/src/main/java/module-info.java new file mode 100644 index 0000000..eb05bbc --- /dev/null +++ b/event-async/src/main/java/module-info.java @@ -0,0 +1,11 @@ +module org.xbib.event.async { + exports org.xbib.event.async; + exports org.xbib.event.async.impl; + exports org.xbib.event.async.impl.future; + exports org.xbib.event.async.spi; + exports org.xbib.event.async.streams; + exports org.xbib.event.async.streams.impl; + requires org.xbib.event.loop; + requires org.reactivestreams; + requires java.logging; +} diff --git a/src/main/java/org/xbib/event/async/Async.java b/event-async/src/main/java/org/xbib/event/async/Async.java similarity index 100% rename from src/main/java/org/xbib/event/async/Async.java rename to event-async/src/main/java/org/xbib/event/async/Async.java diff --git a/src/main/java/org/xbib/event/async/AsyncOptions.java b/event-async/src/main/java/org/xbib/event/async/AsyncOptions.java similarity index 100% rename from src/main/java/org/xbib/event/async/AsyncOptions.java rename to event-async/src/main/java/org/xbib/event/async/AsyncOptions.java diff --git a/src/main/java/org/xbib/event/async/AsyncResult.java b/event-async/src/main/java/org/xbib/event/async/AsyncResult.java similarity index 100% rename from src/main/java/org/xbib/event/async/AsyncResult.java rename to event-async/src/main/java/org/xbib/event/async/AsyncResult.java diff --git a/src/main/java/org/xbib/event/async/Closeable.java b/event-async/src/main/java/org/xbib/event/async/Closeable.java similarity index 100% rename from src/main/java/org/xbib/event/async/Closeable.java rename to event-async/src/main/java/org/xbib/event/async/Closeable.java diff --git a/src/main/java/org/xbib/event/async/CompositeFuture.java b/event-async/src/main/java/org/xbib/event/async/CompositeFuture.java similarity index 100% rename from src/main/java/org/xbib/event/async/CompositeFuture.java rename to event-async/src/main/java/org/xbib/event/async/CompositeFuture.java diff --git a/src/main/java/org/xbib/event/async/Context.java b/event-async/src/main/java/org/xbib/event/async/Context.java similarity index 100% rename from src/main/java/org/xbib/event/async/Context.java rename to event-async/src/main/java/org/xbib/event/async/Context.java diff --git a/src/main/java/org/xbib/event/async/EventException.java b/event-async/src/main/java/org/xbib/event/async/EventException.java similarity index 100% rename from src/main/java/org/xbib/event/async/EventException.java rename to event-async/src/main/java/org/xbib/event/async/EventException.java diff --git a/src/main/java/org/xbib/event/async/Future.java b/event-async/src/main/java/org/xbib/event/async/Future.java similarity index 100% rename from src/main/java/org/xbib/event/async/Future.java rename to event-async/src/main/java/org/xbib/event/async/Future.java diff --git a/src/main/java/org/xbib/event/async/Handler.java b/event-async/src/main/java/org/xbib/event/async/Handler.java similarity index 100% rename from src/main/java/org/xbib/event/async/Handler.java rename to event-async/src/main/java/org/xbib/event/async/Handler.java diff --git a/src/main/java/org/xbib/event/async/NoStackTraceThrowable.java b/event-async/src/main/java/org/xbib/event/async/NoStackTraceThrowable.java similarity index 100% rename from src/main/java/org/xbib/event/async/NoStackTraceThrowable.java rename to event-async/src/main/java/org/xbib/event/async/NoStackTraceThrowable.java diff --git a/src/main/java/org/xbib/event/async/Promise.java b/event-async/src/main/java/org/xbib/event/async/Promise.java similarity index 100% rename from src/main/java/org/xbib/event/async/Promise.java rename to event-async/src/main/java/org/xbib/event/async/Promise.java diff --git a/src/main/java/org/xbib/event/async/TimeoutStream.java b/event-async/src/main/java/org/xbib/event/async/TimeoutStream.java similarity index 100% rename from src/main/java/org/xbib/event/async/TimeoutStream.java rename to event-async/src/main/java/org/xbib/event/async/TimeoutStream.java diff --git a/src/main/java/org/xbib/event/async/WorkerExecutor.java b/event-async/src/main/java/org/xbib/event/async/WorkerExecutor.java similarity index 100% rename from src/main/java/org/xbib/event/async/WorkerExecutor.java rename to event-async/src/main/java/org/xbib/event/async/WorkerExecutor.java diff --git a/src/main/java/org/xbib/event/async/impl/AsyncBuilder.java b/event-async/src/main/java/org/xbib/event/async/impl/AsyncBuilder.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/AsyncBuilder.java rename to event-async/src/main/java/org/xbib/event/async/impl/AsyncBuilder.java diff --git a/src/main/java/org/xbib/event/async/impl/AsyncImpl.java b/event-async/src/main/java/org/xbib/event/async/impl/AsyncImpl.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/AsyncImpl.java rename to event-async/src/main/java/org/xbib/event/async/impl/AsyncImpl.java diff --git a/src/main/java/org/xbib/event/async/impl/AsyncInternal.java b/event-async/src/main/java/org/xbib/event/async/impl/AsyncInternal.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/AsyncInternal.java rename to event-async/src/main/java/org/xbib/event/async/impl/AsyncInternal.java diff --git a/event-async/src/main/java/org/xbib/event/async/impl/AsyncThread.java b/event-async/src/main/java/org/xbib/event/async/impl/AsyncThread.java new file mode 100644 index 0000000..247f642 --- /dev/null +++ b/event-async/src/main/java/org/xbib/event/async/impl/AsyncThread.java @@ -0,0 +1,56 @@ +package org.xbib.event.async.impl; + +import org.xbib.event.loop.thread.FastThreadLocalThread; +import org.xbib.event.loop.thread.ThreadInfo; + +import java.util.concurrent.TimeUnit; + +public class AsyncThread extends FastThreadLocalThread { + + private final boolean worker; + final ThreadInfo info; + ContextInternal context; + ClassLoader topLevelTCCL; + + public AsyncThread(Runnable target, String name, boolean worker, long maxExecTime, TimeUnit maxExecTimeUnit) { + super(target, name); + this.worker = worker; + this.info = new ThreadInfo(maxExecTimeUnit, maxExecTime); + } + + /** + * @return the current context of this thread, this method must be called from the current thread + */ + ContextInternal context() { + return context; + } + + void executeStart() { + if (context == null) { + info.startTime = System.nanoTime(); + } + } + + void executeEnd() { + if (context == null) { + info.startTime = 0; + } + } + + public long startTime() { + return info.startTime; + } + + public boolean isWorker() { + return worker; + } + + public long maxExecTime() { + return info.maxExecTime; + } + + public TimeUnit maxExecTimeUnit() { + return info.maxExecTimeUnit; + } + +} diff --git a/src/main/java/org/xbib/event/async/impl/CloseFuture.java b/event-async/src/main/java/org/xbib/event/async/impl/CloseFuture.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/CloseFuture.java rename to event-async/src/main/java/org/xbib/event/async/impl/CloseFuture.java diff --git a/src/main/java/org/xbib/event/async/impl/ContextBase.java b/event-async/src/main/java/org/xbib/event/async/impl/ContextBase.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/ContextBase.java rename to event-async/src/main/java/org/xbib/event/async/impl/ContextBase.java diff --git a/src/main/java/org/xbib/event/async/impl/ContextInternal.java b/event-async/src/main/java/org/xbib/event/async/impl/ContextInternal.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/ContextInternal.java rename to event-async/src/main/java/org/xbib/event/async/impl/ContextInternal.java diff --git a/src/main/java/org/xbib/event/async/impl/DuplicatedContext.java b/event-async/src/main/java/org/xbib/event/async/impl/DuplicatedContext.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/DuplicatedContext.java rename to event-async/src/main/java/org/xbib/event/async/impl/DuplicatedContext.java diff --git a/src/main/java/org/xbib/event/async/impl/EventLoopContext.java b/event-async/src/main/java/org/xbib/event/async/impl/EventLoopContext.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/EventLoopContext.java rename to event-async/src/main/java/org/xbib/event/async/impl/EventLoopContext.java diff --git a/src/main/java/org/xbib/event/async/impl/NestedCloseable.java b/event-async/src/main/java/org/xbib/event/async/impl/NestedCloseable.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/NestedCloseable.java rename to event-async/src/main/java/org/xbib/event/async/impl/NestedCloseable.java diff --git a/src/main/java/org/xbib/event/async/impl/TaskQueue.java b/event-async/src/main/java/org/xbib/event/async/impl/TaskQueue.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/TaskQueue.java rename to event-async/src/main/java/org/xbib/event/async/impl/TaskQueue.java diff --git a/src/main/java/org/xbib/event/async/impl/WorkerPool.java b/event-async/src/main/java/org/xbib/event/async/impl/WorkerPool.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/WorkerPool.java rename to event-async/src/main/java/org/xbib/event/async/impl/WorkerPool.java diff --git a/src/main/java/org/xbib/event/async/impl/future/CompositeFutureImpl.java b/event-async/src/main/java/org/xbib/event/async/impl/future/CompositeFutureImpl.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/CompositeFutureImpl.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/CompositeFutureImpl.java diff --git a/src/main/java/org/xbib/event/async/impl/future/Composition.java b/event-async/src/main/java/org/xbib/event/async/impl/future/Composition.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/Composition.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/Composition.java diff --git a/src/main/java/org/xbib/event/async/impl/future/Eventually.java b/event-async/src/main/java/org/xbib/event/async/impl/future/Eventually.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/Eventually.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/Eventually.java diff --git a/src/main/java/org/xbib/event/async/impl/future/FailedFuture.java b/event-async/src/main/java/org/xbib/event/async/impl/future/FailedFuture.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/FailedFuture.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/FailedFuture.java diff --git a/src/main/java/org/xbib/event/async/impl/future/FixedMapping.java b/event-async/src/main/java/org/xbib/event/async/impl/future/FixedMapping.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/FixedMapping.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/FixedMapping.java diff --git a/src/main/java/org/xbib/event/async/impl/future/FixedOtherwise.java b/event-async/src/main/java/org/xbib/event/async/impl/future/FixedOtherwise.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/FixedOtherwise.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/FixedOtherwise.java diff --git a/src/main/java/org/xbib/event/async/impl/future/FutureBase.java b/event-async/src/main/java/org/xbib/event/async/impl/future/FutureBase.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/FutureBase.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/FutureBase.java diff --git a/src/main/java/org/xbib/event/async/impl/future/FutureImpl.java b/event-async/src/main/java/org/xbib/event/async/impl/future/FutureImpl.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/FutureImpl.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/FutureImpl.java diff --git a/src/main/java/org/xbib/event/async/impl/future/FutureInternal.java b/event-async/src/main/java/org/xbib/event/async/impl/future/FutureInternal.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/FutureInternal.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/FutureInternal.java diff --git a/src/main/java/org/xbib/event/async/impl/future/Listener.java b/event-async/src/main/java/org/xbib/event/async/impl/future/Listener.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/Listener.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/Listener.java diff --git a/src/main/java/org/xbib/event/async/impl/future/Mapping.java b/event-async/src/main/java/org/xbib/event/async/impl/future/Mapping.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/Mapping.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/Mapping.java diff --git a/src/main/java/org/xbib/event/async/impl/future/Operation.java b/event-async/src/main/java/org/xbib/event/async/impl/future/Operation.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/Operation.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/Operation.java diff --git a/src/main/java/org/xbib/event/async/impl/future/Otherwise.java b/event-async/src/main/java/org/xbib/event/async/impl/future/Otherwise.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/Otherwise.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/Otherwise.java diff --git a/src/main/java/org/xbib/event/async/impl/future/PromiseImpl.java b/event-async/src/main/java/org/xbib/event/async/impl/future/PromiseImpl.java similarity index 96% rename from src/main/java/org/xbib/event/async/impl/future/PromiseImpl.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/PromiseImpl.java index d2f5f29..4849dbc 100644 --- a/src/main/java/org/xbib/event/async/impl/future/PromiseImpl.java +++ b/event-async/src/main/java/org/xbib/event/async/impl/future/PromiseImpl.java @@ -1,6 +1,6 @@ package org.xbib.event.async.impl.future; -import org.xbib.event.Future; +import org.xbib.event.loop.Future; import org.xbib.event.async.AsyncResult; import org.xbib.event.async.impl.ContextInternal; diff --git a/src/main/java/org/xbib/event/async/impl/future/PromiseInternal.java b/event-async/src/main/java/org/xbib/event/async/impl/future/PromiseInternal.java similarity index 89% rename from src/main/java/org/xbib/event/async/impl/future/PromiseInternal.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/PromiseInternal.java index dde8ebe..dc452b6 100644 --- a/src/main/java/org/xbib/event/async/impl/future/PromiseInternal.java +++ b/event-async/src/main/java/org/xbib/event/async/impl/future/PromiseInternal.java @@ -1,6 +1,6 @@ package org.xbib.event.async.impl.future; -import org.xbib.event.FutureListener; +import org.xbib.event.loop.FutureListener; import org.xbib.event.async.Promise; import org.xbib.event.async.impl.ContextInternal; diff --git a/src/main/java/org/xbib/event/async/impl/future/SucceededFuture.java b/event-async/src/main/java/org/xbib/event/async/impl/future/SucceededFuture.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/SucceededFuture.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/SucceededFuture.java diff --git a/src/main/java/org/xbib/event/async/impl/future/Transformation.java b/event-async/src/main/java/org/xbib/event/async/impl/future/Transformation.java similarity index 100% rename from src/main/java/org/xbib/event/async/impl/future/Transformation.java rename to event-async/src/main/java/org/xbib/event/async/impl/future/Transformation.java diff --git a/src/main/java/org/xbib/event/io/AbstractAsyncFileReaderLines.java b/event-async/src/main/java/org/xbib/event/async/io/AbstractAsyncFileReaderLines.java similarity index 99% rename from src/main/java/org/xbib/event/io/AbstractAsyncFileReaderLines.java rename to event-async/src/main/java/org/xbib/event/async/io/AbstractAsyncFileReaderLines.java index 4ef887d..5e5c16d 100644 --- a/src/main/java/org/xbib/event/io/AbstractAsyncFileReaderLines.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AbstractAsyncFileReaderLines.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/src/main/java/org/xbib/event/io/AddOnComplete.java b/event-async/src/main/java/org/xbib/event/async/io/AddOnComplete.java similarity index 91% rename from src/main/java/org/xbib/event/io/AddOnComplete.java rename to event-async/src/main/java/org/xbib/event/async/io/AddOnComplete.java index 601f7a6..981628e 100644 --- a/src/main/java/org/xbib/event/io/AddOnComplete.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AddOnComplete.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Subscriber; diff --git a/src/main/java/org/xbib/event/io/AddOnError.java b/event-async/src/main/java/org/xbib/event/async/io/AddOnError.java similarity index 95% rename from src/main/java/org/xbib/event/io/AddOnError.java rename to event-async/src/main/java/org/xbib/event/async/io/AddOnError.java index ce13ac8..9b86192 100644 --- a/src/main/java/org/xbib/event/io/AddOnError.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AddOnError.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Subscriber; diff --git a/src/main/java/org/xbib/event/io/AddOnNext.java b/event-async/src/main/java/org/xbib/event/async/io/AddOnNext.java similarity index 92% rename from src/main/java/org/xbib/event/io/AddOnNext.java rename to event-async/src/main/java/org/xbib/event/async/io/AddOnNext.java index c8b6638..ad951a9 100644 --- a/src/main/java/org/xbib/event/io/AddOnNext.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AddOnNext.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Subscriber; diff --git a/src/main/java/org/xbib/event/io/AddOnSubscribe.java b/event-async/src/main/java/org/xbib/event/async/io/AddOnSubscribe.java similarity index 94% rename from src/main/java/org/xbib/event/io/AddOnSubscribe.java rename to event-async/src/main/java/org/xbib/event/async/io/AddOnSubscribe.java index af6967b..3287527 100644 --- a/src/main/java/org/xbib/event/io/AddOnSubscribe.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AddOnSubscribe.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; diff --git a/src/main/java/org/xbib/event/io/AsyncFileQuery.java b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileQuery.java similarity index 96% rename from src/main/java/org/xbib/event/io/AsyncFileQuery.java rename to event-async/src/main/java/org/xbib/event/async/io/AsyncFileQuery.java index d7dd29b..bcb95e5 100644 --- a/src/main/java/org/xbib/event/io/AsyncFileQuery.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileQuery.java @@ -1,6 +1,6 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.io.IOException; import java.nio.file.Path; diff --git a/src/main/java/org/xbib/event/io/AsyncFileReaderBytes.java b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileReaderBytes.java similarity index 98% rename from src/main/java/org/xbib/event/io/AsyncFileReaderBytes.java rename to event-async/src/main/java/org/xbib/event/async/io/AsyncFileReaderBytes.java index ae621b6..db72def 100644 --- a/src/main/java/org/xbib/event/io/AsyncFileReaderBytes.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileReaderBytes.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/main/java/org/xbib/event/io/AsyncFileReaderLines.java b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileReaderLines.java similarity index 99% rename from src/main/java/org/xbib/event/io/AsyncFileReaderLines.java rename to event-async/src/main/java/org/xbib/event/async/io/AsyncFileReaderLines.java index 8b9e3a2..3cc1638 100644 --- a/src/main/java/org/xbib/event/io/AsyncFileReaderLines.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileReaderLines.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; diff --git a/src/main/java/org/xbib/event/io/AsyncFileWriter.java b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileWriter.java similarity index 99% rename from src/main/java/org/xbib/event/io/AsyncFileWriter.java rename to event-async/src/main/java/org/xbib/event/async/io/AsyncFileWriter.java index 145658e..7b331ac 100644 --- a/src/main/java/org/xbib/event/io/AsyncFileWriter.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AsyncFileWriter.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/src/main/java/org/xbib/event/io/AsyncFiles.java b/event-async/src/main/java/org/xbib/event/async/io/AsyncFiles.java similarity index 99% rename from src/main/java/org/xbib/event/io/AsyncFiles.java rename to event-async/src/main/java/org/xbib/event/async/io/AsyncFiles.java index 229283c..ff0c494 100644 --- a/src/main/java/org/xbib/event/io/AsyncFiles.java +++ b/event-async/src/main/java/org/xbib/event/async/io/AsyncFiles.java @@ -1,7 +1,7 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Publisher; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/main/java/org/xbib/event/io/EmptySubscriber.java b/event-async/src/main/java/org/xbib/event/async/io/EmptySubscriber.java similarity index 94% rename from src/main/java/org/xbib/event/io/EmptySubscriber.java rename to event-async/src/main/java/org/xbib/event/async/io/EmptySubscriber.java index bafd59e..1fb1adf 100644 --- a/src/main/java/org/xbib/event/io/EmptySubscriber.java +++ b/event-async/src/main/java/org/xbib/event/async/io/EmptySubscriber.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Subscription; diff --git a/src/main/java/org/xbib/event/io/SubscriberBuilder.java b/event-async/src/main/java/org/xbib/event/async/io/SubscriberBuilder.java similarity index 96% rename from src/main/java/org/xbib/event/io/SubscriberBuilder.java rename to event-async/src/main/java/org/xbib/event/async/io/SubscriberBuilder.java index dadb044..01aa4f0 100644 --- a/src/main/java/org/xbib/event/io/SubscriberBuilder.java +++ b/event-async/src/main/java/org/xbib/event/async/io/SubscriberBuilder.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; diff --git a/src/main/java/org/xbib/event/io/Subscribers.java b/event-async/src/main/java/org/xbib/event/async/io/Subscribers.java similarity index 86% rename from src/main/java/org/xbib/event/io/Subscribers.java rename to event-async/src/main/java/org/xbib/event/async/io/Subscribers.java index fbd8614..577e69c 100644 --- a/src/main/java/org/xbib/event/io/Subscribers.java +++ b/event-async/src/main/java/org/xbib/event/async/io/Subscribers.java @@ -1,4 +1,4 @@ -package org.xbib.event.io; +package org.xbib.event.async.io; import java.util.function.Consumer; diff --git a/src/main/java/org/xbib/event/async/spi/AsyncServiceProvider.java b/event-async/src/main/java/org/xbib/event/async/spi/AsyncServiceProvider.java similarity index 100% rename from src/main/java/org/xbib/event/async/spi/AsyncServiceProvider.java rename to event-async/src/main/java/org/xbib/event/async/spi/AsyncServiceProvider.java diff --git a/src/main/java/org/xbib/event/async/spi/AsyncThreadFactory.java b/event-async/src/main/java/org/xbib/event/async/spi/AsyncThreadFactory.java similarity index 100% rename from src/main/java/org/xbib/event/async/spi/AsyncThreadFactory.java rename to event-async/src/main/java/org/xbib/event/async/spi/AsyncThreadFactory.java diff --git a/src/main/java/org/xbib/event/async/spi/ExecutorServiceFactory.java b/event-async/src/main/java/org/xbib/event/async/spi/ExecutorServiceFactory.java similarity index 100% rename from src/main/java/org/xbib/event/async/spi/ExecutorServiceFactory.java rename to event-async/src/main/java/org/xbib/event/async/spi/ExecutorServiceFactory.java diff --git a/src/main/java/org/xbib/event/async/streams/Pipe.java b/event-async/src/main/java/org/xbib/event/async/streams/Pipe.java similarity index 100% rename from src/main/java/org/xbib/event/async/streams/Pipe.java rename to event-async/src/main/java/org/xbib/event/async/streams/Pipe.java diff --git a/src/main/java/org/xbib/event/async/streams/ReadStream.java b/event-async/src/main/java/org/xbib/event/async/streams/ReadStream.java similarity index 100% rename from src/main/java/org/xbib/event/async/streams/ReadStream.java rename to event-async/src/main/java/org/xbib/event/async/streams/ReadStream.java diff --git a/src/main/java/org/xbib/event/async/streams/StreamBase.java b/event-async/src/main/java/org/xbib/event/async/streams/StreamBase.java similarity index 100% rename from src/main/java/org/xbib/event/async/streams/StreamBase.java rename to event-async/src/main/java/org/xbib/event/async/streams/StreamBase.java diff --git a/src/main/java/org/xbib/event/async/streams/WriteStream.java b/event-async/src/main/java/org/xbib/event/async/streams/WriteStream.java similarity index 100% rename from src/main/java/org/xbib/event/async/streams/WriteStream.java rename to event-async/src/main/java/org/xbib/event/async/streams/WriteStream.java diff --git a/src/main/java/org/xbib/event/async/streams/impl/PipeImpl.java b/event-async/src/main/java/org/xbib/event/async/streams/impl/PipeImpl.java similarity index 100% rename from src/main/java/org/xbib/event/async/streams/impl/PipeImpl.java rename to event-async/src/main/java/org/xbib/event/async/streams/impl/PipeImpl.java diff --git a/src/main/java/org/xbib/event/yield/Advancer.java b/event-async/src/main/java/org/xbib/event/async/yield/Advancer.java similarity index 91% rename from src/main/java/org/xbib/event/yield/Advancer.java rename to event-async/src/main/java/org/xbib/event/async/yield/Advancer.java index 352871f..a38b395 100644 --- a/src/main/java/org/xbib/event/yield/Advancer.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/Advancer.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield; +package org.xbib.event.async.yield; /** * Sequential traverser with internal and individually step approach. diff --git a/src/main/java/org/xbib/event/yield/AsyncQuery.java b/event-async/src/main/java/org/xbib/event/async/yield/AsyncQuery.java similarity index 84% rename from src/main/java/org/xbib/event/yield/AsyncQuery.java rename to event-async/src/main/java/org/xbib/event/async/yield/AsyncQuery.java index 03dda60..ca6b27e 100644 --- a/src/main/java/org/xbib/event/yield/AsyncQuery.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/AsyncQuery.java @@ -1,16 +1,16 @@ -package org.xbib.event.yield; +package org.xbib.event.async.yield; -import org.xbib.event.yield.async.AsyncQueryDistinct; -import org.xbib.event.yield.async.AsyncQueryFilter; -import org.xbib.event.yield.async.AsyncQueryFlatMapConcat; -import org.xbib.event.yield.async.AsyncQueryFlatMapMerge; -import org.xbib.event.yield.async.AsyncQueryFork; -import org.xbib.event.yield.async.AsyncQueryMap; -import org.xbib.event.yield.async.AsyncQueryOf; -import org.xbib.event.yield.async.AsyncQueryOfIterator; -import org.xbib.event.yield.async.AsyncQueryOnNext; -import org.xbib.event.yield.async.AsyncQuerySkip; -import org.xbib.event.yield.async.AsyncQueryTakeWhile; +import org.xbib.event.async.yield.async.AsyncQueryDistinct; +import org.xbib.event.async.yield.async.AsyncQueryFilter; +import org.xbib.event.async.yield.async.AsyncQueryFlatMapConcat; +import org.xbib.event.async.yield.async.AsyncQueryFlatMapMerge; +import org.xbib.event.async.yield.async.AsyncQueryFork; +import org.xbib.event.async.yield.async.AsyncQueryMap; +import org.xbib.event.async.yield.async.AsyncQueryOf; +import org.xbib.event.async.yield.async.AsyncQueryOfIterator; +import org.xbib.event.async.yield.async.AsyncQueryOnNext; +import org.xbib.event.async.yield.async.AsyncQuerySkip; +import org.xbib.event.async.yield.async.AsyncQueryTakeWhile; import java.util.Iterator; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/AsyncTraverser.java b/event-async/src/main/java/org/xbib/event/async/yield/AsyncTraverser.java similarity index 95% rename from src/main/java/org/xbib/event/yield/AsyncTraverser.java rename to event-async/src/main/java/org/xbib/event/async/yield/AsyncTraverser.java index 383b979..91baa09 100644 --- a/src/main/java/org/xbib/event/yield/AsyncTraverser.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/AsyncTraverser.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield; +package org.xbib.event.async.yield; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/Query.java b/event-async/src/main/java/org/xbib/event/async/yield/Query.java similarity index 92% rename from src/main/java/org/xbib/event/yield/Query.java rename to event-async/src/main/java/org/xbib/event/async/yield/Query.java index 3194017..99ab0ac 100644 --- a/src/main/java/org/xbib/event/yield/Query.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/Query.java @@ -1,32 +1,32 @@ -package org.xbib.event.yield; +package org.xbib.event.async.yield; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.boxes.Box; -import org.xbib.event.yield.ops.Concat; -import org.xbib.event.yield.ops.Distinct; -import org.xbib.event.yield.ops.DropWhile; -import org.xbib.event.yield.ops.Filter; -import org.xbib.event.yield.ops.FlatMap; -import org.xbib.event.yield.ops.FromArray; -import org.xbib.event.yield.ops.FromList; -import org.xbib.event.yield.ops.FromStream; -import org.xbib.event.yield.ops.Generate; -import org.xbib.event.yield.ops.Iterate; -import org.xbib.event.yield.ops.Limit; -import org.xbib.event.yield.ops.Mapping; -import org.xbib.event.yield.ops.Peek; -import org.xbib.event.yield.ops.Skip; -import org.xbib.event.yield.ops.TakeWhile; -import org.xbib.event.yield.ops.Zip; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.boxes.Box; +import org.xbib.event.async.yield.ops.Concat; +import org.xbib.event.async.yield.ops.Distinct; +import org.xbib.event.async.yield.ops.DropWhile; +import org.xbib.event.async.yield.ops.Filter; +import org.xbib.event.async.yield.ops.FlatMap; +import org.xbib.event.async.yield.ops.FromArray; +import org.xbib.event.async.yield.ops.FromList; +import org.xbib.event.async.yield.ops.FromStream; +import org.xbib.event.async.yield.ops.Generate; +import org.xbib.event.async.yield.ops.Iterate; +import org.xbib.event.async.yield.ops.Limit; +import org.xbib.event.async.yield.ops.Mapping; +import org.xbib.event.async.yield.ops.Peek; +import org.xbib.event.async.yield.ops.Skip; +import org.xbib.event.async.yield.ops.TakeWhile; +import org.xbib.event.async.yield.ops.Zip; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/org/xbib/event/yield/TraversableFinishError.java b/event-async/src/main/java/org/xbib/event/async/yield/TraversableFinishError.java similarity index 89% rename from src/main/java/org/xbib/event/yield/TraversableFinishError.java rename to event-async/src/main/java/org/xbib/event/async/yield/TraversableFinishError.java index e9d4fe1..06a9454 100644 --- a/src/main/java/org/xbib/event/yield/TraversableFinishError.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/TraversableFinishError.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield; +package org.xbib.event.async.yield; @SuppressWarnings("serial") public class TraversableFinishError extends Error { diff --git a/src/main/java/org/xbib/event/yield/Traverser.java b/event-async/src/main/java/org/xbib/event/async/yield/Traverser.java similarity index 93% rename from src/main/java/org/xbib/event/yield/Traverser.java rename to event-async/src/main/java/org/xbib/event/async/yield/Traverser.java index 7e71f0c..82e9ebf 100644 --- a/src/main/java/org/xbib/event/yield/Traverser.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/Traverser.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield; +package org.xbib.event.async.yield; /** * Bulk traversal. diff --git a/src/main/java/org/xbib/event/yield/Yield.java b/event-async/src/main/java/org/xbib/event/async/yield/Yield.java similarity index 89% rename from src/main/java/org/xbib/event/yield/Yield.java rename to event-async/src/main/java/org/xbib/event/async/yield/Yield.java index f99e9f1..81810e4 100644 --- a/src/main/java/org/xbib/event/yield/Yield.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/Yield.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield; +package org.xbib.event.async.yield; /** * Equivalent to {@code Consumer} with a yield semantics. diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryDistinct.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryDistinct.java similarity index 88% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryDistinct.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryDistinct.java index 405ab1b..e4c1df1 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryDistinct.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryDistinct.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.HashSet; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryFilter.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFilter.java similarity index 89% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryFilter.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFilter.java index b76285e..787907d 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryFilter.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFilter.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryFlatMapConcat.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFlatMapConcat.java similarity index 91% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryFlatMapConcat.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFlatMapConcat.java index 9d64164..d29c996 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryFlatMapConcat.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFlatMapConcat.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryFlatMapMerge.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFlatMapMerge.java similarity index 93% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryFlatMapMerge.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFlatMapMerge.java index 32af2c2..29cb766 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryFlatMapMerge.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFlatMapMerge.java @@ -1,7 +1,7 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryFork.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFork.java similarity index 80% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryFork.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFork.java index 791f559..8ce524f 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryFork.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryFork.java @@ -1,7 +1,7 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; -import org.xbib.event.yield.Query; +import org.xbib.event.async.yield.AsyncQuery; +import org.xbib.event.async.yield.Query; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryMap.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryMap.java similarity index 89% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryMap.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryMap.java index 4491cd7..263e939 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryMap.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryMap.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryOf.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOf.java similarity index 78% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryOf.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOf.java index c03e2fb..8317580 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryOf.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOf.java @@ -1,7 +1,7 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; -import org.xbib.event.yield.Query; +import org.xbib.event.async.yield.AsyncQuery; +import org.xbib.event.async.yield.Query; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryOfIterator.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOfIterator.java similarity index 86% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryOfIterator.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOfIterator.java index 5b74558..67d16d1 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryOfIterator.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOfIterator.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.Iterator; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryOnNext.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOnNext.java similarity index 88% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryOnNext.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOnNext.java index ab0ec70..adf54f9 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryOnNext.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryOnNext.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQuerySkip.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQuerySkip.java similarity index 84% rename from src/main/java/org/xbib/event/yield/async/AsyncQuerySkip.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQuerySkip.java index 7f092eb..c520e31 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQuerySkip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQuerySkip.java @@ -1,7 +1,7 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; -import org.xbib.event.yield.AsyncTraverser; +import org.xbib.event.async.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncTraverser; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/async/AsyncQueryTakeWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryTakeWhile.java similarity index 95% rename from src/main/java/org/xbib/event/yield/async/AsyncQueryTakeWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryTakeWhile.java index 439dc0f..1806afd 100644 --- a/src/main/java/org/xbib/event/yield/async/AsyncQueryTakeWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/async/AsyncQueryTakeWhile.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.async; +package org.xbib.event.async.yield.async; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.util.concurrent.CompletableFuture; import java.util.function.BiConsumer; diff --git a/src/main/java/org/xbib/event/yield/boxes/BoolBox.java b/event-async/src/main/java/org/xbib/event/async/yield/boxes/BoolBox.java similarity index 90% rename from src/main/java/org/xbib/event/yield/boxes/BoolBox.java rename to event-async/src/main/java/org/xbib/event/async/yield/boxes/BoolBox.java index deb98a7..14718af 100644 --- a/src/main/java/org/xbib/event/yield/boxes/BoolBox.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/boxes/BoolBox.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield.boxes; +package org.xbib.event.async.yield.boxes; public class BoolBox { diff --git a/src/main/java/org/xbib/event/yield/boxes/Box.java b/event-async/src/main/java/org/xbib/event/async/yield/boxes/Box.java similarity index 92% rename from src/main/java/org/xbib/event/yield/boxes/Box.java rename to event-async/src/main/java/org/xbib/event/async/yield/boxes/Box.java index 345c274..4472a6b 100644 --- a/src/main/java/org/xbib/event/yield/boxes/Box.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/boxes/Box.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield.boxes; +package org.xbib.event.async.yield.boxes; public class Box { diff --git a/src/main/java/org/xbib/event/yield/boxes/DoubleBox.java b/event-async/src/main/java/org/xbib/event/async/yield/boxes/DoubleBox.java similarity index 94% rename from src/main/java/org/xbib/event/yield/boxes/DoubleBox.java rename to event-async/src/main/java/org/xbib/event/async/yield/boxes/DoubleBox.java index ff13d55..1fbb45c 100644 --- a/src/main/java/org/xbib/event/yield/boxes/DoubleBox.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/boxes/DoubleBox.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield.boxes; +package org.xbib.event.async.yield.boxes; public class DoubleBox { diff --git a/src/main/java/org/xbib/event/yield/boxes/IntBox.java b/event-async/src/main/java/org/xbib/event/async/yield/boxes/IntBox.java similarity index 93% rename from src/main/java/org/xbib/event/yield/boxes/IntBox.java rename to event-async/src/main/java/org/xbib/event/async/yield/boxes/IntBox.java index ba4c04f..36f0187 100644 --- a/src/main/java/org/xbib/event/yield/boxes/IntBox.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/boxes/IntBox.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield.boxes; +package org.xbib.event.async.yield.boxes; public class IntBox { diff --git a/src/main/java/org/xbib/event/yield/boxes/LongBox.java b/event-async/src/main/java/org/xbib/event/async/yield/boxes/LongBox.java similarity index 93% rename from src/main/java/org/xbib/event/yield/boxes/LongBox.java rename to event-async/src/main/java/org/xbib/event/async/yield/boxes/LongBox.java index 81c4ed7..2cd26aa 100644 --- a/src/main/java/org/xbib/event/yield/boxes/LongBox.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/boxes/LongBox.java @@ -1,4 +1,4 @@ -package org.xbib.event.yield.boxes; +package org.xbib.event.async.yield.boxes; public class LongBox { diff --git a/src/main/java/org/xbib/event/yield/ops/Concat.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Concat.java similarity index 72% rename from src/main/java/org/xbib/event/yield/ops/Concat.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Concat.java index 84d7d68..eeb5a37 100644 --- a/src/main/java/org/xbib/event/yield/ops/Concat.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Concat.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; public class Concat implements Advancer, Traverser { diff --git a/src/main/java/org/xbib/event/yield/ops/Distinct.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Distinct.java similarity index 74% rename from src/main/java/org/xbib/event/yield/ops/Distinct.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Distinct.java index c6f87de..d0ca62c 100644 --- a/src/main/java/org/xbib/event/yield/ops/Distinct.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Distinct.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; import java.util.HashSet; diff --git a/src/main/java/org/xbib/event/yield/ops/DropWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/DropWhile.java similarity index 85% rename from src/main/java/org/xbib/event/yield/ops/DropWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/DropWhile.java index 4bda465..b1d72ce 100644 --- a/src/main/java/org/xbib/event/yield/ops/DropWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/DropWhile.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.function.Predicate; diff --git a/src/main/java/org/xbib/event/yield/ops/Filter.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Filter.java similarity index 77% rename from src/main/java/org/xbib/event/yield/ops/Filter.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Filter.java index a1ec5d0..c558ab5 100644 --- a/src/main/java/org/xbib/event/yield/ops/Filter.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Filter.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; import java.util.function.Predicate; diff --git a/src/main/java/org/xbib/event/yield/ops/FlatMap.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/FlatMap.java similarity index 80% rename from src/main/java/org/xbib/event/yield/ops/FlatMap.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/FlatMap.java index 9c119e2..0ad844e 100644 --- a/src/main/java/org/xbib/event/yield/ops/FlatMap.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/FlatMap.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.function.Function; diff --git a/src/main/java/org/xbib/event/yield/ops/FromArray.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/FromArray.java similarity index 82% rename from src/main/java/org/xbib/event/yield/ops/FromArray.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/FromArray.java index 3561849..4633ea1 100644 --- a/src/main/java/org/xbib/event/yield/ops/FromArray.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/FromArray.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; public class FromArray implements Advancer, Traverser { diff --git a/src/main/java/org/xbib/event/yield/ops/FromList.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/FromList.java similarity index 74% rename from src/main/java/org/xbib/event/yield/ops/FromList.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/FromList.java index 6113c8a..5986615 100644 --- a/src/main/java/org/xbib/event/yield/ops/FromList.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/FromList.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.List; import java.util.Spliterator; diff --git a/src/main/java/org/xbib/event/yield/ops/FromStream.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/FromStream.java similarity index 75% rename from src/main/java/org/xbib/event/yield/ops/FromStream.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/FromStream.java index 8297d8b..105ec26 100644 --- a/src/main/java/org/xbib/event/yield/ops/FromStream.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/FromStream.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.Spliterator; import java.util.stream.Stream; diff --git a/src/main/java/org/xbib/event/yield/ops/Generate.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Generate.java similarity index 73% rename from src/main/java/org/xbib/event/yield/ops/Generate.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Generate.java index 582902b..6930f71 100644 --- a/src/main/java/org/xbib/event/yield/ops/Generate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Generate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.function.Supplier; diff --git a/src/main/java/org/xbib/event/yield/ops/Iterate.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Iterate.java similarity index 78% rename from src/main/java/org/xbib/event/yield/ops/Iterate.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Iterate.java index f198635..bcfa4e5 100644 --- a/src/main/java/org/xbib/event/yield/ops/Iterate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Iterate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.function.UnaryOperator; diff --git a/src/main/java/org/xbib/event/yield/ops/Limit.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Limit.java similarity index 78% rename from src/main/java/org/xbib/event/yield/ops/Limit.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Limit.java index 1e23547..63665d2 100644 --- a/src/main/java/org/xbib/event/yield/ops/Limit.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Limit.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; public class Limit implements Advancer, Traverser { diff --git a/src/main/java/org/xbib/event/yield/ops/Mapping.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Mapping.java similarity index 74% rename from src/main/java/org/xbib/event/yield/ops/Mapping.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Mapping.java index 8c2e4ae..244f806 100644 --- a/src/main/java/org/xbib/event/yield/ops/Mapping.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Mapping.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.function.Function; diff --git a/src/main/java/org/xbib/event/yield/ops/Peek.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Peek.java similarity index 76% rename from src/main/java/org/xbib/event/yield/ops/Peek.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Peek.java index fcb5a1c..b192a55 100644 --- a/src/main/java/org/xbib/event/yield/ops/Peek.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Peek.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.function.Consumer; diff --git a/src/main/java/org/xbib/event/yield/ops/Skip.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Skip.java similarity index 79% rename from src/main/java/org/xbib/event/yield/ops/Skip.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Skip.java index 3e51e85..317fcfd 100644 --- a/src/main/java/org/xbib/event/yield/ops/Skip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Skip.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; public class Skip implements Advancer, Traverser { diff --git a/src/main/java/org/xbib/event/yield/ops/TakeWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/TakeWhile.java similarity index 82% rename from src/main/java/org/xbib/event/yield/ops/TakeWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/TakeWhile.java index 83cebdd..2a07583 100644 --- a/src/main/java/org/xbib/event/yield/ops/TakeWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/TakeWhile.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; import java.util.function.Predicate; diff --git a/src/main/java/org/xbib/event/yield/ops/Zip.java b/event-async/src/main/java/org/xbib/event/async/yield/ops/Zip.java similarity index 79% rename from src/main/java/org/xbib/event/yield/ops/Zip.java rename to event-async/src/main/java/org/xbib/event/async/yield/ops/Zip.java index afa21c1..2994bf2 100644 --- a/src/main/java/org/xbib/event/yield/ops/Zip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/ops/Zip.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.ops; +package org.xbib.event.async.yield.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; import java.util.function.BiFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleAdvancer.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleAdvancer.java similarity index 90% rename from src/main/java/org/xbib/event/yield/primitives/dbl/DoubleAdvancer.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleAdvancer.java index fd59ff2..0fac052 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleAdvancer.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleAdvancer.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl; +package org.xbib.event.async.yield.primitives.dbl; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; import java.util.function.DoubleToLongFunction; import java.util.function.IntToDoubleFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleQuery.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleQuery.java similarity index 91% rename from src/main/java/org/xbib/event/yield/primitives/dbl/DoubleQuery.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleQuery.java index 8519f44..9e91eba 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleQuery.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleQuery.java @@ -1,32 +1,32 @@ -package org.xbib.event.yield.primitives.dbl; +package org.xbib.event.async.yield.primitives.dbl; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.TraversableFinishError; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.boxes.DoubleBox; -import org.xbib.event.yield.primitives.dbl.ops.DoubleConcat; -import org.xbib.event.yield.primitives.dbl.ops.DoubleDistinct; -import org.xbib.event.yield.primitives.dbl.ops.DoubleDropWhile; -import org.xbib.event.yield.primitives.dbl.ops.DoubleFilter; -import org.xbib.event.yield.primitives.dbl.ops.DoubleFlatMap; -import org.xbib.event.yield.primitives.dbl.ops.DoubleGenerate; -import org.xbib.event.yield.primitives.dbl.ops.DoubleIterate; -import org.xbib.event.yield.primitives.dbl.ops.DoubleLimit; -import org.xbib.event.yield.primitives.dbl.ops.DoubleMapToObj; -import org.xbib.event.yield.primitives.dbl.ops.DoubleMapping; -import org.xbib.event.yield.primitives.dbl.ops.DoublePeek; -import org.xbib.event.yield.primitives.dbl.ops.DoubleSkip; -import org.xbib.event.yield.primitives.dbl.ops.DoubleTakeWhile; -import org.xbib.event.yield.primitives.dbl.ops.DoubleZip; -import org.xbib.event.yield.primitives.dbl.ops.FromDoubleArray; -import org.xbib.event.yield.primitives.dbl.ops.FromDoubleStream; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.TraversableFinishError; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.boxes.DoubleBox; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleConcat; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleDistinct; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleDropWhile; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleFilter; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleFlatMap; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleGenerate; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleIterate; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleLimit; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleMapToObj; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleMapping; +import org.xbib.event.async.yield.primitives.dbl.ops.DoublePeek; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleSkip; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleTakeWhile; +import org.xbib.event.async.yield.primitives.dbl.ops.DoubleZip; +import org.xbib.event.async.yield.primitives.dbl.ops.FromDoubleArray; +import org.xbib.event.async.yield.primitives.dbl.ops.FromDoubleStream; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleTraverser.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleTraverser.java similarity index 90% rename from src/main/java/org/xbib/event/yield/primitives/dbl/DoubleTraverser.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleTraverser.java index ff2634a..4741639 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleTraverser.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleTraverser.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl; +package org.xbib.event.async.yield.primitives.dbl; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; import java.util.function.DoubleToLongFunction; import java.util.function.IntToDoubleFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleYield.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleYield.java similarity index 74% rename from src/main/java/org/xbib/event/yield/primitives/dbl/DoubleYield.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleYield.java index b7bb9b8..b470dcf 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/DoubleYield.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/DoubleYield.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.primitives.dbl; +package org.xbib.event.async.yield.primitives.dbl; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Yield; /** * Equivalent to {@code DoubleConsumer} with a yield semantics. diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleConcat.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleConcat.java similarity index 64% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleConcat.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleConcat.java index 2750455..a5a62b3 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleConcat.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleConcat.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; public class DoubleConcat implements DoubleAdvancer, DoubleTraverser { diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleDistinct.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleDistinct.java similarity index 69% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleDistinct.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleDistinct.java index 8e0e93e..234bd66 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleDistinct.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleDistinct.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.HashSet; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleDropWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleDropWhile.java similarity index 80% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleDropWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleDropWhile.java index 2ddf56c..7c4c10f 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleDropWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleDropWhile.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoublePredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleFilter.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleFilter.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleFilter.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleFilter.java index e8a0c8b..644d706 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleFilter.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleFilter.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoublePredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleFlatMap.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleFlatMap.java similarity index 73% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleFlatMap.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleFlatMap.java index 668be1c..e10f172 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleFlatMap.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleFlatMap.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoubleFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleGenerate.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleGenerate.java similarity index 66% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleGenerate.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleGenerate.java index c656a59..199edf8 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleGenerate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleGenerate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoubleSupplier; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleIterate.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleIterate.java similarity index 76% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleIterate.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleIterate.java index 919f93d..d05445f 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleIterate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleIterate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoubleUnaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleLimit.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleLimit.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleLimit.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleLimit.java index de79b2c..90524ef 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleLimit.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleLimit.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; public class DoubleLimit implements DoubleAdvancer, DoubleTraverser { diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleMapToObj.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleMapToObj.java similarity index 72% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleMapToObj.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleMapToObj.java index ca9c553..9ac6290 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleMapToObj.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleMapToObj.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; import java.util.function.DoubleFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleMapping.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleMapping.java similarity index 67% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleMapping.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleMapping.java index 8652277..41f8293 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleMapping.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleMapping.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoubleUnaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoublePeek.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoublePeek.java similarity index 69% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoublePeek.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoublePeek.java index 41413a6..45360a4 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoublePeek.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoublePeek.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoubleConsumer; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleSkip.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleSkip.java similarity index 72% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleSkip.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleSkip.java index ce88329..1d79e6c 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleSkip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleSkip.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; public class DoubleSkip implements DoubleAdvancer, DoubleTraverser { diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleTakeWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleTakeWhile.java similarity index 75% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleTakeWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleTakeWhile.java index 985e59d..dc3ec0d 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleTakeWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleTakeWhile.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoublePredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleZip.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleZip.java similarity index 70% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleZip.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleZip.java index 4f4f0e6..7903133 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/DoubleZip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/DoubleZip.java @@ -1,11 +1,11 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.function.DoubleBinaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/FromDoubleArray.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/FromDoubleArray.java similarity index 76% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/FromDoubleArray.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/FromDoubleArray.java index 0f4f1ac..f91ed5a 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/FromDoubleArray.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/FromDoubleArray.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; public class FromDoubleArray implements DoubleAdvancer, DoubleTraverser { diff --git a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/FromDoubleStream.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/FromDoubleStream.java similarity index 72% rename from src/main/java/org/xbib/event/yield/primitives/dbl/ops/FromDoubleStream.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/FromDoubleStream.java index 9db10bb..71b27a9 100644 --- a/src/main/java/org/xbib/event/yield/primitives/dbl/ops/FromDoubleStream.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/dbl/ops/FromDoubleStream.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.dbl.ops; +package org.xbib.event.async.yield.primitives.dbl.ops; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.dbl.DoubleYield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.dbl.DoubleYield; import java.util.Spliterator; import java.util.function.DoubleConsumer; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/IntAdvancer.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntAdvancer.java similarity index 89% rename from src/main/java/org/xbib/event/yield/primitives/intgr/IntAdvancer.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntAdvancer.java index 4ae04ec..022576a 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/IntAdvancer.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntAdvancer.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr; +package org.xbib.event.async.yield.primitives.intgr; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; import java.util.function.DoubleToIntFunction; import java.util.function.LongToIntFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/IntQuery.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntQuery.java similarity index 91% rename from src/main/java/org/xbib/event/yield/primitives/intgr/IntQuery.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntQuery.java index 15f9579..a507f76 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/IntQuery.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntQuery.java @@ -1,32 +1,32 @@ -package org.xbib.event.yield.primitives.intgr; +package org.xbib.event.async.yield.primitives.intgr; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.TraversableFinishError; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.boxes.IntBox; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.intgr.ops.FromIntArray; -import org.xbib.event.yield.primitives.intgr.ops.FromIntStream; -import org.xbib.event.yield.primitives.intgr.ops.IntConcat; -import org.xbib.event.yield.primitives.intgr.ops.IntDistinct; -import org.xbib.event.yield.primitives.intgr.ops.IntDropWhile; -import org.xbib.event.yield.primitives.intgr.ops.IntFilter; -import org.xbib.event.yield.primitives.intgr.ops.IntFlatMap; -import org.xbib.event.yield.primitives.intgr.ops.IntGenerate; -import org.xbib.event.yield.primitives.intgr.ops.IntIterate; -import org.xbib.event.yield.primitives.intgr.ops.IntLimit; -import org.xbib.event.yield.primitives.intgr.ops.IntMapToObj; -import org.xbib.event.yield.primitives.intgr.ops.IntMapping; -import org.xbib.event.yield.primitives.intgr.ops.IntPeek; -import org.xbib.event.yield.primitives.intgr.ops.IntSkip; -import org.xbib.event.yield.primitives.intgr.ops.IntTakeWhile; -import org.xbib.event.yield.primitives.intgr.ops.IntZip; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.TraversableFinishError; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.boxes.IntBox; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.intgr.ops.FromIntArray; +import org.xbib.event.async.yield.primitives.intgr.ops.FromIntStream; +import org.xbib.event.async.yield.primitives.intgr.ops.IntConcat; +import org.xbib.event.async.yield.primitives.intgr.ops.IntDistinct; +import org.xbib.event.async.yield.primitives.intgr.ops.IntDropWhile; +import org.xbib.event.async.yield.primitives.intgr.ops.IntFilter; +import org.xbib.event.async.yield.primitives.intgr.ops.IntFlatMap; +import org.xbib.event.async.yield.primitives.intgr.ops.IntGenerate; +import org.xbib.event.async.yield.primitives.intgr.ops.IntIterate; +import org.xbib.event.async.yield.primitives.intgr.ops.IntLimit; +import org.xbib.event.async.yield.primitives.intgr.ops.IntMapToObj; +import org.xbib.event.async.yield.primitives.intgr.ops.IntMapping; +import org.xbib.event.async.yield.primitives.intgr.ops.IntPeek; +import org.xbib.event.async.yield.primitives.intgr.ops.IntSkip; +import org.xbib.event.async.yield.primitives.intgr.ops.IntTakeWhile; +import org.xbib.event.async.yield.primitives.intgr.ops.IntZip; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/IntTraverser.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntTraverser.java similarity index 89% rename from src/main/java/org/xbib/event/yield/primitives/intgr/IntTraverser.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntTraverser.java index 2589c0e..140b7b6 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/IntTraverser.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntTraverser.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr; +package org.xbib.event.async.yield.primitives.intgr; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; import java.util.function.DoubleToIntFunction; import java.util.function.LongToIntFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/IntYield.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntYield.java similarity index 73% rename from src/main/java/org/xbib/event/yield/primitives/intgr/IntYield.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntYield.java index 0b98827..d6fcd7f 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/IntYield.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/IntYield.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.primitives.intgr; +package org.xbib.event.async.yield.primitives.intgr; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Yield; /** * Equivalent to {@code IntConsumer} with a yield semantics. diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/FromIntArray.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/FromIntArray.java similarity index 75% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/FromIntArray.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/FromIntArray.java index 3b58933..7219a1a 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/FromIntArray.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/FromIntArray.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; public class FromIntArray implements IntAdvancer, IntTraverser { diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/FromIntStream.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/FromIntStream.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/FromIntStream.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/FromIntStream.java index fa2dfc3..c4a8bca 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/FromIntStream.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/FromIntStream.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.Spliterator; import java.util.function.IntConsumer; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntConcat.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntConcat.java similarity index 63% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntConcat.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntConcat.java index 5661dc6..5ee8204 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntConcat.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntConcat.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; public class IntConcat implements IntAdvancer, IntTraverser { private final IntQuery first; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntDistinct.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntDistinct.java similarity index 68% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntDistinct.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntDistinct.java index 6d66b66..0a16530 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntDistinct.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntDistinct.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.HashSet; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntDropWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntDropWhile.java similarity index 80% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntDropWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntDropWhile.java index 0b56b93..bb1b0e1 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntDropWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntDropWhile.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntPredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntFilter.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntFilter.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntFilter.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntFilter.java index 4b104dd..3968767 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntFilter.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntFilter.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntPredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntFlatMap.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntFlatMap.java similarity index 72% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntFlatMap.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntFlatMap.java index bb03427..70d86e9 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntFlatMap.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntFlatMap.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntGenerate.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntGenerate.java similarity index 66% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntGenerate.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntGenerate.java index ff08ff7..9ede4fa 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntGenerate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntGenerate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntSupplier; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntIterate.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntIterate.java similarity index 75% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntIterate.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntIterate.java index b6c8816..ad75aa1 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntIterate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntIterate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntUnaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntLimit.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntLimit.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntLimit.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntLimit.java index 1259d91..46d0b9a 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntLimit.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntLimit.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; public class IntLimit implements IntAdvancer, IntTraverser { private final IntQuery upstream; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntMapToObj.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntMapToObj.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntMapToObj.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntMapToObj.java index 7a18e73..4b4ca35 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntMapToObj.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntMapToObj.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; import java.util.function.IntFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntMapping.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntMapping.java similarity index 66% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntMapping.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntMapping.java index 94cfa78..55b4b96 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntMapping.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntMapping.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntUnaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntPeek.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntPeek.java similarity index 68% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntPeek.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntPeek.java index 3b37a15..06d13f5 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntPeek.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntPeek.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntConsumer; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntSkip.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntSkip.java similarity index 72% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntSkip.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntSkip.java index 6a2d020..c10295e 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntSkip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntSkip.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; public class IntSkip implements IntAdvancer, IntTraverser { diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntTakeWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntTakeWhile.java similarity index 74% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntTakeWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntTakeWhile.java index 3435157..f3cc162 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntTakeWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntTakeWhile.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntPredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntZip.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntZip.java similarity index 69% rename from src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntZip.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntZip.java index 9d469ff..f819c28 100644 --- a/src/main/java/org/xbib/event/yield/primitives/intgr/ops/IntZip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/intgr/ops/IntZip.java @@ -1,11 +1,11 @@ -package org.xbib.event.yield.primitives.intgr.ops; +package org.xbib.event.async.yield.primitives.intgr.ops; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.intgr.IntYield; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntYield; import java.util.function.IntBinaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/LongAdvancer.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongAdvancer.java similarity index 89% rename from src/main/java/org/xbib/event/yield/primitives/lng/LongAdvancer.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongAdvancer.java index 65c49f2..0e6396d 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/LongAdvancer.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongAdvancer.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng; +package org.xbib.event.async.yield.primitives.lng; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; import java.util.function.DoubleToLongFunction; import java.util.function.IntToLongFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/LongQuery.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongQuery.java similarity index 91% rename from src/main/java/org/xbib/event/yield/primitives/lng/LongQuery.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongQuery.java index c77b153..90c1f34 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/LongQuery.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongQuery.java @@ -1,32 +1,32 @@ -package org.xbib.event.yield.primitives.lng; +package org.xbib.event.async.yield.primitives.lng; -import org.xbib.event.yield.Query; -import org.xbib.event.yield.TraversableFinishError; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.boxes.LongBox; -import org.xbib.event.yield.primitives.dbl.DoubleAdvancer; -import org.xbib.event.yield.primitives.dbl.DoubleQuery; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntQuery; -import org.xbib.event.yield.primitives.intgr.IntTraverser; -import org.xbib.event.yield.primitives.lng.ops.FromLongArray; -import org.xbib.event.yield.primitives.lng.ops.FromLongStream; -import org.xbib.event.yield.primitives.lng.ops.LongConcat; -import org.xbib.event.yield.primitives.lng.ops.LongDistinct; -import org.xbib.event.yield.primitives.lng.ops.LongDropWhile; -import org.xbib.event.yield.primitives.lng.ops.LongFilter; -import org.xbib.event.yield.primitives.lng.ops.LongFlatMap; -import org.xbib.event.yield.primitives.lng.ops.LongGenerate; -import org.xbib.event.yield.primitives.lng.ops.LongIterate; -import org.xbib.event.yield.primitives.lng.ops.LongLimit; -import org.xbib.event.yield.primitives.lng.ops.LongMap; -import org.xbib.event.yield.primitives.lng.ops.LongMapToObj; -import org.xbib.event.yield.primitives.lng.ops.LongPeek; -import org.xbib.event.yield.primitives.lng.ops.LongSkip; -import org.xbib.event.yield.primitives.lng.ops.LongTakeWhile; -import org.xbib.event.yield.primitives.lng.ops.LongZip; +import org.xbib.event.async.yield.Query; +import org.xbib.event.async.yield.TraversableFinishError; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.boxes.LongBox; +import org.xbib.event.async.yield.primitives.dbl.DoubleAdvancer; +import org.xbib.event.async.yield.primitives.dbl.DoubleQuery; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntQuery; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.primitives.lng.ops.FromLongArray; +import org.xbib.event.async.yield.primitives.lng.ops.FromLongStream; +import org.xbib.event.async.yield.primitives.lng.ops.LongConcat; +import org.xbib.event.async.yield.primitives.lng.ops.LongDistinct; +import org.xbib.event.async.yield.primitives.lng.ops.LongDropWhile; +import org.xbib.event.async.yield.primitives.lng.ops.LongFilter; +import org.xbib.event.async.yield.primitives.lng.ops.LongFlatMap; +import org.xbib.event.async.yield.primitives.lng.ops.LongGenerate; +import org.xbib.event.async.yield.primitives.lng.ops.LongIterate; +import org.xbib.event.async.yield.primitives.lng.ops.LongLimit; +import org.xbib.event.async.yield.primitives.lng.ops.LongMap; +import org.xbib.event.async.yield.primitives.lng.ops.LongMapToObj; +import org.xbib.event.async.yield.primitives.lng.ops.LongPeek; +import org.xbib.event.async.yield.primitives.lng.ops.LongSkip; +import org.xbib.event.async.yield.primitives.lng.ops.LongTakeWhile; +import org.xbib.event.async.yield.primitives.lng.ops.LongZip; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/LongTraverser.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongTraverser.java similarity index 88% rename from src/main/java/org/xbib/event/yield/primitives/lng/LongTraverser.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongTraverser.java index a2b14d4..a493657 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/LongTraverser.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongTraverser.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.lng; +package org.xbib.event.async.yield.primitives.lng; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.dbl.DoubleTraverser; -import org.xbib.event.yield.primitives.intgr.IntAdvancer; -import org.xbib.event.yield.primitives.intgr.IntTraverser; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.dbl.DoubleTraverser; +import org.xbib.event.async.yield.primitives.intgr.IntAdvancer; +import org.xbib.event.async.yield.primitives.intgr.IntTraverser; import java.util.function.DoubleToLongFunction; import java.util.function.IntToLongFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/LongYield.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongYield.java similarity index 73% rename from src/main/java/org/xbib/event/yield/primitives/lng/LongYield.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongYield.java index 6288075..305ca89 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/LongYield.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/LongYield.java @@ -1,6 +1,6 @@ -package org.xbib.event.yield.primitives.lng; +package org.xbib.event.async.yield.primitives.lng; -import org.xbib.event.yield.Yield; +import org.xbib.event.async.yield.Yield; /** * Equivalent to {@code LongConsumer} with a yield semantics. diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/FromLongArray.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/FromLongArray.java similarity index 76% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/FromLongArray.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/FromLongArray.java index e45a7fd..ea7dc3f 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/FromLongArray.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/FromLongArray.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; public class FromLongArray implements LongAdvancer, LongTraverser { diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/FromLongStream.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/FromLongStream.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/FromLongStream.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/FromLongStream.java index 0e87757..30ebc0d 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/FromLongStream.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/FromLongStream.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.Spliterator; import java.util.function.LongConsumer; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongConcat.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongConcat.java similarity index 64% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongConcat.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongConcat.java index 478b102..e70e23d 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongConcat.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongConcat.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; public class LongConcat implements LongAdvancer, LongTraverser { private final LongQuery first; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongDistinct.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongDistinct.java similarity index 69% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongDistinct.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongDistinct.java index 83dbd76..c6879cb 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongDistinct.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongDistinct.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.HashSet; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongDropWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongDropWhile.java similarity index 80% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongDropWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongDropWhile.java index 7293fd2..49dae0d 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongDropWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongDropWhile.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongPredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongFilter.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongFilter.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongFilter.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongFilter.java index 828ccdd..1958e73 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongFilter.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongFilter.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongPredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongFlatMap.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongFlatMap.java similarity index 73% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongFlatMap.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongFlatMap.java index 45e7d5f..14fc9a5 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongFlatMap.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongFlatMap.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongGenerate.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongGenerate.java similarity index 66% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongGenerate.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongGenerate.java index f6162c6..7e8659a 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongGenerate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongGenerate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongSupplier; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongIterate.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongIterate.java similarity index 75% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongIterate.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongIterate.java index 5ffb6de..2121407 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongIterate.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongIterate.java @@ -1,8 +1,8 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongUnaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongLimit.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongLimit.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongLimit.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongLimit.java index fc9619d..24451f6 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongLimit.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongLimit.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; public class LongLimit implements LongAdvancer, LongTraverser { private final LongQuery upstream; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongMap.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongMap.java similarity index 66% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongMap.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongMap.java index 73d34dc..97c1323 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongMap.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongMap.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongUnaryOperator; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongMapToObj.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongMapToObj.java similarity index 71% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongMapToObj.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongMapToObj.java index b10fddf..fb8066d 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongMapToObj.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongMapToObj.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.Advancer; -import org.xbib.event.yield.Traverser; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.Advancer; +import org.xbib.event.async.yield.Traverser; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.lng.LongQuery; import java.util.function.LongFunction; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongPeek.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongPeek.java similarity index 69% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongPeek.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongPeek.java index 1fc0636..801b320 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongPeek.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongPeek.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongConsumer; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongSkip.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongSkip.java similarity index 72% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongSkip.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongSkip.java index a40e3e9..638d29e 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongSkip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongSkip.java @@ -1,9 +1,9 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; public class LongSkip implements LongAdvancer, LongTraverser { private final LongQuery upstream; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongTakeWhile.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongTakeWhile.java similarity index 75% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongTakeWhile.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongTakeWhile.java index 6e776f8..cc6827f 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongTakeWhile.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongTakeWhile.java @@ -1,10 +1,10 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongPredicate; diff --git a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongZip.java b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongZip.java similarity index 70% rename from src/main/java/org/xbib/event/yield/primitives/lng/ops/LongZip.java rename to event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongZip.java index 6e540f5..282e202 100644 --- a/src/main/java/org/xbib/event/yield/primitives/lng/ops/LongZip.java +++ b/event-async/src/main/java/org/xbib/event/async/yield/primitives/lng/ops/LongZip.java @@ -1,11 +1,11 @@ -package org.xbib.event.yield.primitives.lng.ops; +package org.xbib.event.async.yield.primitives.lng.ops; -import org.xbib.event.yield.Yield; -import org.xbib.event.yield.boxes.BoolBox; -import org.xbib.event.yield.primitives.lng.LongAdvancer; -import org.xbib.event.yield.primitives.lng.LongQuery; -import org.xbib.event.yield.primitives.lng.LongTraverser; -import org.xbib.event.yield.primitives.lng.LongYield; +import org.xbib.event.async.yield.Yield; +import org.xbib.event.async.yield.boxes.BoolBox; +import org.xbib.event.async.yield.primitives.lng.LongAdvancer; +import org.xbib.event.async.yield.primitives.lng.LongQuery; +import org.xbib.event.async.yield.primitives.lng.LongTraverser; +import org.xbib.event.async.yield.primitives.lng.LongYield; import java.util.function.LongBinaryOperator; diff --git a/src/test/java/org/xbib/event/io/test/AsyncFileReaderTest.java b/event-async/src/test/java/org/xbib/event/async/io/AsyncFileReaderTest.java similarity index 99% rename from src/test/java/org/xbib/event/io/test/AsyncFileReaderTest.java rename to event-async/src/test/java/org/xbib/event/async/io/AsyncFileReaderTest.java index c6a8035..e704a64 100644 --- a/src/test/java/org/xbib/event/io/test/AsyncFileReaderTest.java +++ b/event-async/src/test/java/org/xbib/event/async/io/AsyncFileReaderTest.java @@ -1,11 +1,10 @@ -package org.xbib.event.io.test; +package org.xbib.event.async.io; import io.reactivex.rxjava3.core.Observable; import org.junit.jupiter.api.Test; import org.reactivestreams.Publisher; import org.reactivestreams.Subscription; -import org.xbib.event.io.AsyncFiles; -import org.xbib.event.yield.AsyncQuery; +import org.xbib.event.async.yield.AsyncQuery; import java.io.FileWriter; import java.io.IOException; @@ -37,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -import static org.xbib.event.io.Subscribers.doOnNext; +import static org.xbib.event.async.io.Subscribers.doOnNext; public class AsyncFileReaderTest { diff --git a/src/test/java/org/xbib/event/io/test/AsyncFileWriterTest.java b/event-async/src/test/java/org/xbib/event/async/io/AsyncFileWriterTest.java similarity index 98% rename from src/test/java/org/xbib/event/io/test/AsyncFileWriterTest.java rename to event-async/src/test/java/org/xbib/event/async/io/AsyncFileWriterTest.java index 148ddb3..83dbf43 100644 --- a/src/test/java/org/xbib/event/io/test/AsyncFileWriterTest.java +++ b/event-async/src/test/java/org/xbib/event/async/io/AsyncFileWriterTest.java @@ -1,7 +1,6 @@ -package org.xbib.event.io.test; +package org.xbib.event.async.io; import org.junit.jupiter.api.Test; -import org.xbib.event.io.AsyncFiles; import java.io.IOException; import java.net.URISyntaxException; diff --git a/src/test/java/org/xbib/event/io/test/AsyncFilesFailures.java b/event-async/src/test/java/org/xbib/event/async/io/AsyncFilesFailures.java similarity index 98% rename from src/test/java/org/xbib/event/io/test/AsyncFilesFailures.java rename to event-async/src/test/java/org/xbib/event/async/io/AsyncFilesFailures.java index d2e452b..bcb8b25 100644 --- a/src/test/java/org/xbib/event/io/test/AsyncFilesFailures.java +++ b/event-async/src/test/java/org/xbib/event/async/io/AsyncFilesFailures.java @@ -1,9 +1,7 @@ -package org.xbib.event.io.test; +package org.xbib.event.async.io; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.xbib.event.io.AsyncFiles; -import org.xbib.event.io.Subscribers; import java.io.IOException; import java.net.URISyntaxException; diff --git a/src/test/resources/Metamorphosis-by-Franz-Kafka.txt b/event-async/src/test/resources/Metamorphosis-by-Franz-Kafka.txt similarity index 100% rename from src/test/resources/Metamorphosis-by-Franz-Kafka.txt rename to event-async/src/test/resources/Metamorphosis-by-Franz-Kafka.txt diff --git a/src/test/resources/The-Wizard-by-Rider-Haggard.txt b/event-async/src/test/resources/The-Wizard-by-Rider-Haggard.txt similarity index 100% rename from src/test/resources/The-Wizard-by-Rider-Haggard.txt rename to event-async/src/test/resources/The-Wizard-by-Rider-Haggard.txt diff --git a/src/test/resources/UTF-8-test.txt b/event-async/src/test/resources/UTF-8-test.txt similarity index 100% rename from src/test/resources/UTF-8-test.txt rename to event-async/src/test/resources/UTF-8-test.txt diff --git a/event-async/src/test/resources/logging.properties b/event-async/src/test/resources/logging.properties new file mode 100644 index 0000000..039cb05 --- /dev/null +++ b/event-async/src/test/resources/logging.properties @@ -0,0 +1,6 @@ +handlers=java.util.logging.ConsoleHandler +.level=ALL +java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL %4$-7s [%3$s] %5$s %6$s%n +java.util.logging.ConsoleHandler.level=ALL +java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter +jdk.event.security.level=INFO diff --git a/event-common/build.gradle b/event-common/build.gradle new file mode 100644 index 0000000..25e5dcf --- /dev/null +++ b/event-common/build.gradle @@ -0,0 +1,10 @@ +dependencies { + api project(':event-api') + api libs.settings.api + implementation libs.settings.datastructures.json + implementation libs.net + implementation libs.time + implementation libs.datastructures.common + implementation libs.datastructures.json.tiny + implementation libs.netty.handler +} diff --git a/src/main/java/module-info.java b/event-common/src/main/java/module-info.java similarity index 58% rename from src/main/java/module-info.java rename to event-common/src/main/java/module-info.java index 30e3b92..9d554a4 100644 --- a/src/main/java/module-info.java +++ b/event-common/src/main/java/module-info.java @@ -1,33 +1,25 @@ -module org.xbib.event { - uses org.xbib.event.EventConsumer; +module org.xbib.event.common { exports org.xbib.event.bus; exports org.xbib.event.clock; + exports org.xbib.event.common; exports org.xbib.event.generic; - exports org.xbib.event.io; - exports org.xbib.event.io.file; - exports org.xbib.event.io.path; exports org.xbib.event.log; - exports org.xbib.event.loop.selector; - exports org.xbib.event.loop; + exports org.xbib.event.path; exports org.xbib.event.persistence; - exports org.xbib.event.queue; exports org.xbib.event.syslog; exports org.xbib.event.timer; - exports org.xbib.event.util; exports org.xbib.event.wal; - exports org.xbib.event.yield; - exports org.xbib.event; + requires org.xbib.event.api; + requires org.xbib.settings.api; + requires org.xbib.settings.datastructures.json; + requires org.xbib.net; + requires org.xbib.time; + requires org.xbib.datastructures.common; + requires org.xbib.datastructures.json.tiny; requires io.netty.buffer; requires io.netty.common; requires io.netty.transport; requires io.netty.handler; requires io.netty.codec; - requires org.xbib.datastructures.api; - requires org.xbib.datastructures.common; - requires org.xbib.datastructures.json.tiny; - requires org.xbib.settings.api; - requires org.xbib.time; - requires org.xbib.net; - requires org.reactivestreams; requires java.logging; } diff --git a/src/main/java/org/xbib/event/bus/AllowConcurrentEvents.java b/event-common/src/main/java/org/xbib/event/bus/AllowConcurrentEvents.java similarity index 100% rename from src/main/java/org/xbib/event/bus/AllowConcurrentEvents.java rename to event-common/src/main/java/org/xbib/event/bus/AllowConcurrentEvents.java diff --git a/src/main/java/org/xbib/event/bus/AsyncEventBus.java b/event-common/src/main/java/org/xbib/event/bus/AsyncEventBus.java similarity index 100% rename from src/main/java/org/xbib/event/bus/AsyncEventBus.java rename to event-common/src/main/java/org/xbib/event/bus/AsyncEventBus.java diff --git a/src/main/java/org/xbib/event/bus/DeadEvent.java b/event-common/src/main/java/org/xbib/event/bus/DeadEvent.java similarity index 100% rename from src/main/java/org/xbib/event/bus/DeadEvent.java rename to event-common/src/main/java/org/xbib/event/bus/DeadEvent.java diff --git a/src/main/java/org/xbib/event/bus/Dispatcher.java b/event-common/src/main/java/org/xbib/event/bus/Dispatcher.java similarity index 100% rename from src/main/java/org/xbib/event/bus/Dispatcher.java rename to event-common/src/main/java/org/xbib/event/bus/Dispatcher.java diff --git a/src/main/java/org/xbib/event/bus/EventBus.java b/event-common/src/main/java/org/xbib/event/bus/EventBus.java similarity index 100% rename from src/main/java/org/xbib/event/bus/EventBus.java rename to event-common/src/main/java/org/xbib/event/bus/EventBus.java diff --git a/src/main/java/org/xbib/event/bus/LoggingHandler.java b/event-common/src/main/java/org/xbib/event/bus/LoggingHandler.java similarity index 100% rename from src/main/java/org/xbib/event/bus/LoggingHandler.java rename to event-common/src/main/java/org/xbib/event/bus/LoggingHandler.java diff --git a/src/main/java/org/xbib/event/bus/Subscribe.java b/event-common/src/main/java/org/xbib/event/bus/Subscribe.java similarity index 100% rename from src/main/java/org/xbib/event/bus/Subscribe.java rename to event-common/src/main/java/org/xbib/event/bus/Subscribe.java diff --git a/src/main/java/org/xbib/event/bus/Subscriber.java b/event-common/src/main/java/org/xbib/event/bus/Subscriber.java similarity index 100% rename from src/main/java/org/xbib/event/bus/Subscriber.java rename to event-common/src/main/java/org/xbib/event/bus/Subscriber.java diff --git a/src/main/java/org/xbib/event/bus/SubscriberExceptionContext.java b/event-common/src/main/java/org/xbib/event/bus/SubscriberExceptionContext.java similarity index 100% rename from src/main/java/org/xbib/event/bus/SubscriberExceptionContext.java rename to event-common/src/main/java/org/xbib/event/bus/SubscriberExceptionContext.java diff --git a/src/main/java/org/xbib/event/bus/SubscriberExceptionHandler.java b/event-common/src/main/java/org/xbib/event/bus/SubscriberExceptionHandler.java similarity index 100% rename from src/main/java/org/xbib/event/bus/SubscriberExceptionHandler.java rename to event-common/src/main/java/org/xbib/event/bus/SubscriberExceptionHandler.java diff --git a/src/main/java/org/xbib/event/bus/SubscriberRegistry.java b/event-common/src/main/java/org/xbib/event/bus/SubscriberRegistry.java similarity index 100% rename from src/main/java/org/xbib/event/bus/SubscriberRegistry.java rename to event-common/src/main/java/org/xbib/event/bus/SubscriberRegistry.java diff --git a/src/main/java/org/xbib/event/bus/util/ConcatenatedIterator.java b/event-common/src/main/java/org/xbib/event/bus/util/ConcatenatedIterator.java similarity index 100% rename from src/main/java/org/xbib/event/bus/util/ConcatenatedIterator.java rename to event-common/src/main/java/org/xbib/event/bus/util/ConcatenatedIterator.java diff --git a/src/main/java/org/xbib/event/bus/util/TypeToken.java b/event-common/src/main/java/org/xbib/event/bus/util/TypeToken.java similarity index 100% rename from src/main/java/org/xbib/event/bus/util/TypeToken.java rename to event-common/src/main/java/org/xbib/event/bus/util/TypeToken.java diff --git a/src/main/java/org/xbib/event/bus/util/TypeVisitor.java b/event-common/src/main/java/org/xbib/event/bus/util/TypeVisitor.java similarity index 100% rename from src/main/java/org/xbib/event/bus/util/TypeVisitor.java rename to event-common/src/main/java/org/xbib/event/bus/util/TypeVisitor.java diff --git a/src/main/java/org/xbib/event/clock/ClockEvent.java b/event-common/src/main/java/org/xbib/event/clock/ClockEvent.java similarity index 100% rename from src/main/java/org/xbib/event/clock/ClockEvent.java rename to event-common/src/main/java/org/xbib/event/clock/ClockEvent.java diff --git a/src/main/java/org/xbib/event/clock/ClockEventManager.java b/event-common/src/main/java/org/xbib/event/clock/ClockEventManager.java similarity index 100% rename from src/main/java/org/xbib/event/clock/ClockEventManager.java rename to event-common/src/main/java/org/xbib/event/clock/ClockEventManager.java diff --git a/src/main/java/org/xbib/event/clock/ClockEventService.java b/event-common/src/main/java/org/xbib/event/clock/ClockEventService.java similarity index 100% rename from src/main/java/org/xbib/event/clock/ClockEventService.java rename to event-common/src/main/java/org/xbib/event/clock/ClockEventService.java diff --git a/src/main/java/org/xbib/event/clock/DefaultClockEvent.java b/event-common/src/main/java/org/xbib/event/clock/DefaultClockEvent.java similarity index 100% rename from src/main/java/org/xbib/event/clock/DefaultClockEvent.java rename to event-common/src/main/java/org/xbib/event/clock/DefaultClockEvent.java diff --git a/src/main/java/org/xbib/event/clock/SimpleClockEventConsumer.java b/event-common/src/main/java/org/xbib/event/clock/SimpleClockEventConsumer.java similarity index 100% rename from src/main/java/org/xbib/event/clock/SimpleClockEventConsumer.java rename to event-common/src/main/java/org/xbib/event/clock/SimpleClockEventConsumer.java diff --git a/src/main/java/org/xbib/event/EventManager.java b/event-common/src/main/java/org/xbib/event/common/EventManager.java similarity index 97% rename from src/main/java/org/xbib/event/EventManager.java rename to event-common/src/main/java/org/xbib/event/common/EventManager.java index ccd27cc..e23135a 100644 --- a/src/main/java/org/xbib/event/EventManager.java +++ b/event-common/src/main/java/org/xbib/event/common/EventManager.java @@ -1,13 +1,15 @@ -package org.xbib.event; +package org.xbib.event.common; import java.util.ServiceLoader; + +import org.xbib.event.EventConsumer; import org.xbib.event.bus.AsyncEventBus; import org.xbib.event.bus.SubscriberExceptionContext; import org.xbib.event.bus.SubscriberExceptionHandler; import org.xbib.event.clock.ClockEventManager; import org.xbib.event.generic.GenericEventManager; -import org.xbib.event.io.file.FileFollowEventManager; -import org.xbib.event.io.path.PathEventManager; +import org.xbib.event.path.FileFollowEventManager; +import org.xbib.event.path.PathEventManager; import org.xbib.event.syslog.SyslogEventManager; import org.xbib.event.timer.TimerEventManager; import org.xbib.settings.Settings; diff --git a/src/main/java/org/xbib/event/generic/DefaultGenericEvent.java b/event-common/src/main/java/org/xbib/event/generic/DefaultGenericEvent.java similarity index 100% rename from src/main/java/org/xbib/event/generic/DefaultGenericEvent.java rename to event-common/src/main/java/org/xbib/event/generic/DefaultGenericEvent.java diff --git a/src/main/java/org/xbib/event/generic/GenericEvent.java b/event-common/src/main/java/org/xbib/event/generic/GenericEvent.java similarity index 100% rename from src/main/java/org/xbib/event/generic/GenericEvent.java rename to event-common/src/main/java/org/xbib/event/generic/GenericEvent.java diff --git a/src/main/java/org/xbib/event/generic/GenericEventManager.java b/event-common/src/main/java/org/xbib/event/generic/GenericEventManager.java similarity index 100% rename from src/main/java/org/xbib/event/generic/GenericEventManager.java rename to event-common/src/main/java/org/xbib/event/generic/GenericEventManager.java diff --git a/src/main/java/org/xbib/event/generic/Listener.java b/event-common/src/main/java/org/xbib/event/generic/Listener.java similarity index 100% rename from src/main/java/org/xbib/event/generic/Listener.java rename to event-common/src/main/java/org/xbib/event/generic/Listener.java diff --git a/src/main/java/org/xbib/event/log/ByteCountingOutputStream.java b/event-common/src/main/java/org/xbib/event/log/ByteCountingOutputStream.java similarity index 100% rename from src/main/java/org/xbib/event/log/ByteCountingOutputStream.java rename to event-common/src/main/java/org/xbib/event/log/ByteCountingOutputStream.java diff --git a/src/main/java/org/xbib/event/log/CharCountingWriter.java b/event-common/src/main/java/org/xbib/event/log/CharCountingWriter.java similarity index 100% rename from src/main/java/org/xbib/event/log/CharCountingWriter.java rename to event-common/src/main/java/org/xbib/event/log/CharCountingWriter.java diff --git a/src/main/java/org/xbib/event/log/Clock.java b/event-common/src/main/java/org/xbib/event/log/Clock.java similarity index 100% rename from src/main/java/org/xbib/event/log/Clock.java rename to event-common/src/main/java/org/xbib/event/log/Clock.java diff --git a/src/main/java/org/xbib/event/log/DailyRotationPolicy.java b/event-common/src/main/java/org/xbib/event/log/DailyRotationPolicy.java similarity index 100% rename from src/main/java/org/xbib/event/log/DailyRotationPolicy.java rename to event-common/src/main/java/org/xbib/event/log/DailyRotationPolicy.java diff --git a/src/main/java/org/xbib/event/log/LoggingRotationListener.java b/event-common/src/main/java/org/xbib/event/log/LoggingRotationListener.java similarity index 100% rename from src/main/java/org/xbib/event/log/LoggingRotationListener.java rename to event-common/src/main/java/org/xbib/event/log/LoggingRotationListener.java diff --git a/src/main/java/org/xbib/event/log/Rotatable.java b/event-common/src/main/java/org/xbib/event/log/Rotatable.java similarity index 100% rename from src/main/java/org/xbib/event/log/Rotatable.java rename to event-common/src/main/java/org/xbib/event/log/Rotatable.java diff --git a/src/main/java/org/xbib/event/log/RotatingFileOutputStream.java b/event-common/src/main/java/org/xbib/event/log/RotatingFileOutputStream.java similarity index 100% rename from src/main/java/org/xbib/event/log/RotatingFileOutputStream.java rename to event-common/src/main/java/org/xbib/event/log/RotatingFileOutputStream.java diff --git a/src/main/java/org/xbib/event/log/RotatingFilePattern.java b/event-common/src/main/java/org/xbib/event/log/RotatingFilePattern.java similarity index 100% rename from src/main/java/org/xbib/event/log/RotatingFilePattern.java rename to event-common/src/main/java/org/xbib/event/log/RotatingFilePattern.java diff --git a/src/main/java/org/xbib/event/log/RotatingFilePatternException.java b/event-common/src/main/java/org/xbib/event/log/RotatingFilePatternException.java similarity index 100% rename from src/main/java/org/xbib/event/log/RotatingFilePatternException.java rename to event-common/src/main/java/org/xbib/event/log/RotatingFilePatternException.java diff --git a/src/main/java/org/xbib/event/log/RotatingFileWriter.java b/event-common/src/main/java/org/xbib/event/log/RotatingFileWriter.java similarity index 100% rename from src/main/java/org/xbib/event/log/RotatingFileWriter.java rename to event-common/src/main/java/org/xbib/event/log/RotatingFileWriter.java diff --git a/src/main/java/org/xbib/event/log/RotationConfig.java b/event-common/src/main/java/org/xbib/event/log/RotationConfig.java similarity index 100% rename from src/main/java/org/xbib/event/log/RotationConfig.java rename to event-common/src/main/java/org/xbib/event/log/RotationConfig.java diff --git a/src/main/java/org/xbib/event/log/RotationListener.java b/event-common/src/main/java/org/xbib/event/log/RotationListener.java similarity index 100% rename from src/main/java/org/xbib/event/log/RotationListener.java rename to event-common/src/main/java/org/xbib/event/log/RotationListener.java diff --git a/src/main/java/org/xbib/event/log/RotationPolicy.java b/event-common/src/main/java/org/xbib/event/log/RotationPolicy.java similarity index 100% rename from src/main/java/org/xbib/event/log/RotationPolicy.java rename to event-common/src/main/java/org/xbib/event/log/RotationPolicy.java diff --git a/src/main/java/org/xbib/event/log/SizeBasedRotationPolicy.java b/event-common/src/main/java/org/xbib/event/log/SizeBasedRotationPolicy.java similarity index 100% rename from src/main/java/org/xbib/event/log/SizeBasedRotationPolicy.java rename to event-common/src/main/java/org/xbib/event/log/SizeBasedRotationPolicy.java diff --git a/src/main/java/org/xbib/event/log/SystemClock.java b/event-common/src/main/java/org/xbib/event/log/SystemClock.java similarity index 100% rename from src/main/java/org/xbib/event/log/SystemClock.java rename to event-common/src/main/java/org/xbib/event/log/SystemClock.java diff --git a/src/main/java/org/xbib/event/log/TimeBasedRotationPolicy.java b/event-common/src/main/java/org/xbib/event/log/TimeBasedRotationPolicy.java similarity index 100% rename from src/main/java/org/xbib/event/log/TimeBasedRotationPolicy.java rename to event-common/src/main/java/org/xbib/event/log/TimeBasedRotationPolicy.java diff --git a/src/main/java/org/xbib/event/log/WeeklyRotationPolicy.java b/event-common/src/main/java/org/xbib/event/log/WeeklyRotationPolicy.java similarity index 100% rename from src/main/java/org/xbib/event/log/WeeklyRotationPolicy.java rename to event-common/src/main/java/org/xbib/event/log/WeeklyRotationPolicy.java diff --git a/src/main/java/org/xbib/event/io/file/DefaultFileFollowEvent.java b/event-common/src/main/java/org/xbib/event/path/DefaultFileFollowEvent.java similarity index 94% rename from src/main/java/org/xbib/event/io/file/DefaultFileFollowEvent.java rename to event-common/src/main/java/org/xbib/event/path/DefaultFileFollowEvent.java index 553561d..0b06347 100644 --- a/src/main/java/org/xbib/event/io/file/DefaultFileFollowEvent.java +++ b/event-common/src/main/java/org/xbib/event/path/DefaultFileFollowEvent.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.file; +package org.xbib.event.path; import org.xbib.event.DefaultEvent; diff --git a/src/main/java/org/xbib/event/io/path/DefaultPathEvent.java b/event-common/src/main/java/org/xbib/event/path/DefaultPathEvent.java similarity index 98% rename from src/main/java/org/xbib/event/io/path/DefaultPathEvent.java rename to event-common/src/main/java/org/xbib/event/path/DefaultPathEvent.java index 383951d..b28b571 100644 --- a/src/main/java/org/xbib/event/io/path/DefaultPathEvent.java +++ b/event-common/src/main/java/org/xbib/event/path/DefaultPathEvent.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.path; +package org.xbib.event.path; import org.xbib.event.DefaultEvent; diff --git a/src/main/java/org/xbib/event/io/file/FileFollowEvent.java b/event-common/src/main/java/org/xbib/event/path/FileFollowEvent.java similarity index 87% rename from src/main/java/org/xbib/event/io/file/FileFollowEvent.java rename to event-common/src/main/java/org/xbib/event/path/FileFollowEvent.java index 0abf8c8..4bc25e2 100644 --- a/src/main/java/org/xbib/event/io/file/FileFollowEvent.java +++ b/event-common/src/main/java/org/xbib/event/path/FileFollowEvent.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.file; +package org.xbib.event.path; import org.xbib.event.Event; diff --git a/src/main/java/org/xbib/event/io/file/FileFollowEventManager.java b/event-common/src/main/java/org/xbib/event/path/FileFollowEventManager.java similarity index 98% rename from src/main/java/org/xbib/event/io/file/FileFollowEventManager.java rename to event-common/src/main/java/org/xbib/event/path/FileFollowEventManager.java index affaf07..87dc08a 100644 --- a/src/main/java/org/xbib/event/io/file/FileFollowEventManager.java +++ b/event-common/src/main/java/org/xbib/event/path/FileFollowEventManager.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.file; +package org.xbib.event.path; import org.xbib.event.bus.AsyncEventBus; import org.xbib.settings.Settings; diff --git a/src/main/java/org/xbib/event/io/file/FileFollowEventService.java b/event-common/src/main/java/org/xbib/event/path/FileFollowEventService.java similarity index 99% rename from src/main/java/org/xbib/event/io/file/FileFollowEventService.java rename to event-common/src/main/java/org/xbib/event/path/FileFollowEventService.java index 79295c4..40e230c 100644 --- a/src/main/java/org/xbib/event/io/file/FileFollowEventService.java +++ b/event-common/src/main/java/org/xbib/event/path/FileFollowEventService.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.file; +package org.xbib.event.path; import org.xbib.event.bus.EventBus; import org.xbib.settings.Settings; diff --git a/src/main/java/org/xbib/event/io/path/PathEvent.java b/event-common/src/main/java/org/xbib/event/path/PathEvent.java similarity index 92% rename from src/main/java/org/xbib/event/io/path/PathEvent.java rename to event-common/src/main/java/org/xbib/event/path/PathEvent.java index b2597c9..dca3e83 100644 --- a/src/main/java/org/xbib/event/io/path/PathEvent.java +++ b/event-common/src/main/java/org/xbib/event/path/PathEvent.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.path; +package org.xbib.event.path; import org.xbib.event.Event; diff --git a/src/main/java/org/xbib/event/io/path/PathEventManager.java b/event-common/src/main/java/org/xbib/event/path/PathEventManager.java similarity index 99% rename from src/main/java/org/xbib/event/io/path/PathEventManager.java rename to event-common/src/main/java/org/xbib/event/path/PathEventManager.java index 6bef364..1a3491c 100644 --- a/src/main/java/org/xbib/event/io/path/PathEventManager.java +++ b/event-common/src/main/java/org/xbib/event/path/PathEventManager.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.path; +package org.xbib.event.path; import org.xbib.datastructures.api.TimeValue; import org.xbib.datastructures.json.tiny.Json; diff --git a/src/main/java/org/xbib/event/io/path/PathEventService.java b/event-common/src/main/java/org/xbib/event/path/PathEventService.java similarity index 99% rename from src/main/java/org/xbib/event/io/path/PathEventService.java rename to event-common/src/main/java/org/xbib/event/path/PathEventService.java index 9a80ec9..2cb8eae 100644 --- a/src/main/java/org/xbib/event/io/path/PathEventService.java +++ b/event-common/src/main/java/org/xbib/event/path/PathEventService.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.path; +package org.xbib.event.path; import org.xbib.datastructures.api.TimeValue; import org.xbib.datastructures.json.tiny.Json; diff --git a/src/main/java/org/xbib/event/persistence/AbstractPersistenceStore.java b/event-common/src/main/java/org/xbib/event/persistence/AbstractPersistenceStore.java similarity index 100% rename from src/main/java/org/xbib/event/persistence/AbstractPersistenceStore.java rename to event-common/src/main/java/org/xbib/event/persistence/AbstractPersistenceStore.java diff --git a/src/main/java/org/xbib/event/persistence/Codec.java b/event-common/src/main/java/org/xbib/event/persistence/Codec.java similarity index 100% rename from src/main/java/org/xbib/event/persistence/Codec.java rename to event-common/src/main/java/org/xbib/event/persistence/Codec.java diff --git a/src/main/java/org/xbib/event/persistence/Durability.java b/event-common/src/main/java/org/xbib/event/persistence/Durability.java similarity index 100% rename from src/main/java/org/xbib/event/persistence/Durability.java rename to event-common/src/main/java/org/xbib/event/persistence/Durability.java diff --git a/src/main/java/org/xbib/event/persistence/FileJsonCodec.java b/event-common/src/main/java/org/xbib/event/persistence/FileJsonCodec.java similarity index 100% rename from src/main/java/org/xbib/event/persistence/FileJsonCodec.java rename to event-common/src/main/java/org/xbib/event/persistence/FileJsonCodec.java diff --git a/src/main/java/org/xbib/event/persistence/FilePersistenceStore.java b/event-common/src/main/java/org/xbib/event/persistence/FilePersistenceStore.java similarity index 100% rename from src/main/java/org/xbib/event/persistence/FilePersistenceStore.java rename to event-common/src/main/java/org/xbib/event/persistence/FilePersistenceStore.java diff --git a/src/main/java/org/xbib/event/persistence/Journal.java b/event-common/src/main/java/org/xbib/event/persistence/Journal.java similarity index 100% rename from src/main/java/org/xbib/event/persistence/Journal.java rename to event-common/src/main/java/org/xbib/event/persistence/Journal.java diff --git a/src/main/java/org/xbib/event/persistence/PersistenceStore.java b/event-common/src/main/java/org/xbib/event/persistence/PersistenceStore.java similarity index 100% rename from src/main/java/org/xbib/event/persistence/PersistenceStore.java rename to event-common/src/main/java/org/xbib/event/persistence/PersistenceStore.java diff --git a/src/main/java/org/xbib/event/syslog/CEFMessageParser.java b/event-common/src/main/java/org/xbib/event/syslog/CEFMessageParser.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/CEFMessageParser.java rename to event-common/src/main/java/org/xbib/event/syslog/CEFMessageParser.java diff --git a/src/main/java/org/xbib/event/syslog/DefaultSyslogMessage.java b/event-common/src/main/java/org/xbib/event/syslog/DefaultSyslogMessage.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/DefaultSyslogMessage.java rename to event-common/src/main/java/org/xbib/event/syslog/DefaultSyslogMessage.java diff --git a/src/main/java/org/xbib/event/syslog/DefaultSyslogRequest.java b/event-common/src/main/java/org/xbib/event/syslog/DefaultSyslogRequest.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/DefaultSyslogRequest.java rename to event-common/src/main/java/org/xbib/event/syslog/DefaultSyslogRequest.java diff --git a/src/main/java/org/xbib/event/syslog/EncoderHelper.java b/event-common/src/main/java/org/xbib/event/syslog/EncoderHelper.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/EncoderHelper.java rename to event-common/src/main/java/org/xbib/event/syslog/EncoderHelper.java diff --git a/src/main/java/org/xbib/event/syslog/Message.java b/event-common/src/main/java/org/xbib/event/syslog/Message.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/Message.java rename to event-common/src/main/java/org/xbib/event/syslog/Message.java diff --git a/src/main/java/org/xbib/event/syslog/MessageEncoder.java b/event-common/src/main/java/org/xbib/event/syslog/MessageEncoder.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/MessageEncoder.java rename to event-common/src/main/java/org/xbib/event/syslog/MessageEncoder.java diff --git a/src/main/java/org/xbib/event/syslog/MessageKey.java b/event-common/src/main/java/org/xbib/event/syslog/MessageKey.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/MessageKey.java rename to event-common/src/main/java/org/xbib/event/syslog/MessageKey.java diff --git a/src/main/java/org/xbib/event/syslog/MessageParser.java b/event-common/src/main/java/org/xbib/event/syslog/MessageParser.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/MessageParser.java rename to event-common/src/main/java/org/xbib/event/syslog/MessageParser.java diff --git a/src/main/java/org/xbib/event/syslog/MessageType.java b/event-common/src/main/java/org/xbib/event/syslog/MessageType.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/MessageType.java rename to event-common/src/main/java/org/xbib/event/syslog/MessageType.java diff --git a/src/main/java/org/xbib/event/syslog/Priority.java b/event-common/src/main/java/org/xbib/event/syslog/Priority.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/Priority.java rename to event-common/src/main/java/org/xbib/event/syslog/Priority.java diff --git a/src/main/java/org/xbib/event/syslog/RFC3164MessageParser.java b/event-common/src/main/java/org/xbib/event/syslog/RFC3164MessageParser.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/RFC3164MessageParser.java rename to event-common/src/main/java/org/xbib/event/syslog/RFC3164MessageParser.java diff --git a/src/main/java/org/xbib/event/syslog/RFC5424MessageParser.java b/event-common/src/main/java/org/xbib/event/syslog/RFC5424MessageParser.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/RFC5424MessageParser.java rename to event-common/src/main/java/org/xbib/event/syslog/RFC5424MessageParser.java diff --git a/src/main/java/org/xbib/event/syslog/SyslogEventManager.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogEventManager.java similarity index 96% rename from src/main/java/org/xbib/event/syslog/SyslogEventManager.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogEventManager.java index 46047a8..f667c5d 100644 --- a/src/main/java/org/xbib/event/syslog/SyslogEventManager.java +++ b/event-common/src/main/java/org/xbib/event/syslog/SyslogEventManager.java @@ -1,7 +1,6 @@ package org.xbib.event.syslog; import org.xbib.event.bus.AsyncEventBus; -import org.xbib.event.io.file.FileFollowEventService; import org.xbib.settings.Settings; import java.io.Closeable; diff --git a/src/main/java/org/xbib/event/syslog/SyslogFrameDecoder.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogFrameDecoder.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/SyslogFrameDecoder.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogFrameDecoder.java diff --git a/src/main/java/org/xbib/event/syslog/SyslogIdleStateHandler.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogIdleStateHandler.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/SyslogIdleStateHandler.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogIdleStateHandler.java diff --git a/src/main/java/org/xbib/event/syslog/SyslogMessage.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogMessage.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/SyslogMessage.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogMessage.java diff --git a/src/main/java/org/xbib/event/syslog/SyslogMessageHandler.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogMessageHandler.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/SyslogMessageHandler.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogMessageHandler.java diff --git a/src/main/java/org/xbib/event/syslog/SyslogMessageKey.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogMessageKey.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/SyslogMessageKey.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogMessageKey.java diff --git a/src/main/java/org/xbib/event/syslog/SyslogRequest.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogRequest.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/SyslogRequest.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogRequest.java diff --git a/src/main/java/org/xbib/event/syslog/SyslogService.java b/event-common/src/main/java/org/xbib/event/syslog/SyslogService.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/SyslogService.java rename to event-common/src/main/java/org/xbib/event/syslog/SyslogService.java diff --git a/src/main/java/org/xbib/event/syslog/TCPSyslogMessageDecoder.java b/event-common/src/main/java/org/xbib/event/syslog/TCPSyslogMessageDecoder.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/TCPSyslogMessageDecoder.java rename to event-common/src/main/java/org/xbib/event/syslog/TCPSyslogMessageDecoder.java diff --git a/src/main/java/org/xbib/event/syslog/UDPSyslogMessageDecoder.java b/event-common/src/main/java/org/xbib/event/syslog/UDPSyslogMessageDecoder.java similarity index 100% rename from src/main/java/org/xbib/event/syslog/UDPSyslogMessageDecoder.java rename to event-common/src/main/java/org/xbib/event/syslog/UDPSyslogMessageDecoder.java diff --git a/src/main/java/org/xbib/event/timer/DefaultTimerEvent.java b/event-common/src/main/java/org/xbib/event/timer/DefaultTimerEvent.java similarity index 100% rename from src/main/java/org/xbib/event/timer/DefaultTimerEvent.java rename to event-common/src/main/java/org/xbib/event/timer/DefaultTimerEvent.java diff --git a/src/main/java/org/xbib/event/timer/TimerEvent.java b/event-common/src/main/java/org/xbib/event/timer/TimerEvent.java similarity index 100% rename from src/main/java/org/xbib/event/timer/TimerEvent.java rename to event-common/src/main/java/org/xbib/event/timer/TimerEvent.java diff --git a/src/main/java/org/xbib/event/timer/TimerEventManager.java b/event-common/src/main/java/org/xbib/event/timer/TimerEventManager.java similarity index 100% rename from src/main/java/org/xbib/event/timer/TimerEventManager.java rename to event-common/src/main/java/org/xbib/event/timer/TimerEventManager.java diff --git a/src/main/java/org/xbib/event/timer/TimerEventService.java b/event-common/src/main/java/org/xbib/event/timer/TimerEventService.java similarity index 100% rename from src/main/java/org/xbib/event/timer/TimerEventService.java rename to event-common/src/main/java/org/xbib/event/timer/TimerEventService.java diff --git a/src/main/java/org/xbib/event/wal/BlockingQueuePool.java b/event-common/src/main/java/org/xbib/event/wal/BlockingQueuePool.java similarity index 100% rename from src/main/java/org/xbib/event/wal/BlockingQueuePool.java rename to event-common/src/main/java/org/xbib/event/wal/BlockingQueuePool.java diff --git a/src/main/java/org/xbib/event/wal/ByteArrayDataOutputStream.java b/event-common/src/main/java/org/xbib/event/wal/ByteArrayDataOutputStream.java similarity index 100% rename from src/main/java/org/xbib/event/wal/ByteArrayDataOutputStream.java rename to event-common/src/main/java/org/xbib/event/wal/ByteArrayDataOutputStream.java diff --git a/src/main/java/org/xbib/event/wal/ByteCountingInputStream.java b/event-common/src/main/java/org/xbib/event/wal/ByteCountingInputStream.java similarity index 100% rename from src/main/java/org/xbib/event/wal/ByteCountingInputStream.java rename to event-common/src/main/java/org/xbib/event/wal/ByteCountingInputStream.java diff --git a/src/main/java/org/xbib/event/wal/HashMapSnapshot.java b/event-common/src/main/java/org/xbib/event/wal/HashMapSnapshot.java similarity index 100% rename from src/main/java/org/xbib/event/wal/HashMapSnapshot.java rename to event-common/src/main/java/org/xbib/event/wal/HashMapSnapshot.java diff --git a/src/main/java/org/xbib/event/wal/JournalRecovery.java b/event-common/src/main/java/org/xbib/event/wal/JournalRecovery.java similarity index 100% rename from src/main/java/org/xbib/event/wal/JournalRecovery.java rename to event-common/src/main/java/org/xbib/event/wal/JournalRecovery.java diff --git a/src/main/java/org/xbib/event/wal/JournalSummary.java b/event-common/src/main/java/org/xbib/event/wal/JournalSummary.java similarity index 100% rename from src/main/java/org/xbib/event/wal/JournalSummary.java rename to event-common/src/main/java/org/xbib/event/wal/JournalSummary.java diff --git a/src/main/java/org/xbib/event/wal/LengthDelimitedJournal.java b/event-common/src/main/java/org/xbib/event/wal/LengthDelimitedJournal.java similarity index 100% rename from src/main/java/org/xbib/event/wal/LengthDelimitedJournal.java rename to event-common/src/main/java/org/xbib/event/wal/LengthDelimitedJournal.java diff --git a/src/main/java/org/xbib/event/wal/LimitingInputStream.java b/event-common/src/main/java/org/xbib/event/wal/LimitingInputStream.java similarity index 100% rename from src/main/java/org/xbib/event/wal/LimitingInputStream.java rename to event-common/src/main/java/org/xbib/event/wal/LimitingInputStream.java diff --git a/src/main/java/org/xbib/event/wal/ObjectPool.java b/event-common/src/main/java/org/xbib/event/wal/ObjectPool.java similarity index 100% rename from src/main/java/org/xbib/event/wal/ObjectPool.java rename to event-common/src/main/java/org/xbib/event/wal/ObjectPool.java diff --git a/src/main/java/org/xbib/event/wal/RecordLookup.java b/event-common/src/main/java/org/xbib/event/wal/RecordLookup.java similarity index 100% rename from src/main/java/org/xbib/event/wal/RecordLookup.java rename to event-common/src/main/java/org/xbib/event/wal/RecordLookup.java diff --git a/src/main/java/org/xbib/event/wal/SequentialAccessWriteAheadLog.java b/event-common/src/main/java/org/xbib/event/wal/SequentialAccessWriteAheadLog.java similarity index 100% rename from src/main/java/org/xbib/event/wal/SequentialAccessWriteAheadLog.java rename to event-common/src/main/java/org/xbib/event/wal/SequentialAccessWriteAheadLog.java diff --git a/src/main/java/org/xbib/event/wal/SerDe.java b/event-common/src/main/java/org/xbib/event/wal/SerDe.java similarity index 100% rename from src/main/java/org/xbib/event/wal/SerDe.java rename to event-common/src/main/java/org/xbib/event/wal/SerDe.java diff --git a/src/main/java/org/xbib/event/wal/SerDeFactory.java b/event-common/src/main/java/org/xbib/event/wal/SerDeFactory.java similarity index 100% rename from src/main/java/org/xbib/event/wal/SerDeFactory.java rename to event-common/src/main/java/org/xbib/event/wal/SerDeFactory.java diff --git a/src/main/java/org/xbib/event/wal/SnapshotCapture.java b/event-common/src/main/java/org/xbib/event/wal/SnapshotCapture.java similarity index 100% rename from src/main/java/org/xbib/event/wal/SnapshotCapture.java rename to event-common/src/main/java/org/xbib/event/wal/SnapshotCapture.java diff --git a/src/main/java/org/xbib/event/wal/SnapshotRecovery.java b/event-common/src/main/java/org/xbib/event/wal/SnapshotRecovery.java similarity index 100% rename from src/main/java/org/xbib/event/wal/SnapshotRecovery.java rename to event-common/src/main/java/org/xbib/event/wal/SnapshotRecovery.java diff --git a/src/main/java/org/xbib/event/wal/StandardJournalRecovery.java b/event-common/src/main/java/org/xbib/event/wal/StandardJournalRecovery.java similarity index 100% rename from src/main/java/org/xbib/event/wal/StandardJournalRecovery.java rename to event-common/src/main/java/org/xbib/event/wal/StandardJournalRecovery.java diff --git a/src/main/java/org/xbib/event/wal/StandardJournalSummary.java b/event-common/src/main/java/org/xbib/event/wal/StandardJournalSummary.java similarity index 100% rename from src/main/java/org/xbib/event/wal/StandardJournalSummary.java rename to event-common/src/main/java/org/xbib/event/wal/StandardJournalSummary.java diff --git a/src/main/java/org/xbib/event/wal/StandardSnapshotRecovery.java b/event-common/src/main/java/org/xbib/event/wal/StandardSnapshotRecovery.java similarity index 100% rename from src/main/java/org/xbib/event/wal/StandardSnapshotRecovery.java rename to event-common/src/main/java/org/xbib/event/wal/StandardSnapshotRecovery.java diff --git a/src/main/java/org/xbib/event/wal/SyncListener.java b/event-common/src/main/java/org/xbib/event/wal/SyncListener.java similarity index 91% rename from src/main/java/org/xbib/event/wal/SyncListener.java rename to event-common/src/main/java/org/xbib/event/wal/SyncListener.java index 6081b82..3bce902 100644 --- a/src/main/java/org/xbib/event/wal/SyncListener.java +++ b/event-common/src/main/java/org/xbib/event/wal/SyncListener.java @@ -4,7 +4,8 @@ package org.xbib.event.wal; *

* Provides a callback mechanism by which applicable listeners can be notified * when a WriteAheadRepository is synched (via the - * {@link WriteAheadRepository#sync()} method) or one of its partitions is + * {@link WriteAheadRepository#checkpoint()} + * method) or one of its partitions is * synched via * {@link WriteAheadRepository#update(java.util.Collection, boolean)} with a * value of true for the second argument. @@ -40,7 +41,7 @@ public interface SyncListener { /** * This method is called whenever the entire * WriteAheadRepository is synched via the - * {@link WriteAheadRepository#sync()} method. + * {@link WriteAheadRepository#checkpoint()} method. */ void onGlobalSync(); diff --git a/src/main/java/org/xbib/event/wal/UpdateType.java b/event-common/src/main/java/org/xbib/event/wal/UpdateType.java similarity index 100% rename from src/main/java/org/xbib/event/wal/UpdateType.java rename to event-common/src/main/java/org/xbib/event/wal/UpdateType.java diff --git a/src/main/java/org/xbib/event/wal/WriteAheadJournal.java b/event-common/src/main/java/org/xbib/event/wal/WriteAheadJournal.java similarity index 100% rename from src/main/java/org/xbib/event/wal/WriteAheadJournal.java rename to event-common/src/main/java/org/xbib/event/wal/WriteAheadJournal.java diff --git a/src/main/java/org/xbib/event/wal/WriteAheadRepository.java b/event-common/src/main/java/org/xbib/event/wal/WriteAheadRepository.java similarity index 100% rename from src/main/java/org/xbib/event/wal/WriteAheadRepository.java rename to event-common/src/main/java/org/xbib/event/wal/WriteAheadRepository.java diff --git a/src/main/java/org/xbib/event/wal/WriteAheadSnapshot.java b/event-common/src/main/java/org/xbib/event/wal/WriteAheadSnapshot.java similarity index 100% rename from src/main/java/org/xbib/event/wal/WriteAheadSnapshot.java rename to event-common/src/main/java/org/xbib/event/wal/WriteAheadSnapshot.java diff --git a/src/test/resources/META-INF/services/org.xbib.settings.SettingsLoader b/event-common/src/main/resources/META-INF/services/org.xbib.settings.SettingsLoader similarity index 100% rename from src/test/resources/META-INF/services/org.xbib.settings.SettingsLoader rename to event-common/src/main/resources/META-INF/services/org.xbib.settings.SettingsLoader diff --git a/src/test/java/org/xbib/event/EventManagerTest.java b/event-common/src/test/java/org/xbib/event/EventManagerTest.java similarity index 98% rename from src/test/java/org/xbib/event/EventManagerTest.java rename to event-common/src/test/java/org/xbib/event/EventManagerTest.java index cd99a8f..2d63318 100644 --- a/src/test/java/org/xbib/event/EventManagerTest.java +++ b/event-common/src/test/java/org/xbib/event/EventManagerTest.java @@ -2,6 +2,7 @@ package org.xbib.event; import org.junit.jupiter.api.Test; import org.xbib.event.bus.Subscribe; +import org.xbib.event.common.EventManager; import org.xbib.event.generic.DefaultGenericEvent; import org.xbib.event.generic.GenericEvent; import org.xbib.settings.Settings; diff --git a/src/test/java/org/xbib/event/bus/AsyncEventBusTest.java b/event-common/src/test/java/org/xbib/event/bus/AsyncEventBusTest.java similarity index 100% rename from src/test/java/org/xbib/event/bus/AsyncEventBusTest.java rename to event-common/src/test/java/org/xbib/event/bus/AsyncEventBusTest.java diff --git a/src/test/java/org/xbib/event/bus/EventBusTest.java b/event-common/src/test/java/org/xbib/event/bus/EventBusTest.java similarity index 100% rename from src/test/java/org/xbib/event/bus/EventBusTest.java rename to event-common/src/test/java/org/xbib/event/bus/EventBusTest.java diff --git a/src/test/java/org/xbib/event/bus/ReentrantEventsTest.java b/event-common/src/test/java/org/xbib/event/bus/ReentrantEventsTest.java similarity index 100% rename from src/test/java/org/xbib/event/bus/ReentrantEventsTest.java rename to event-common/src/test/java/org/xbib/event/bus/ReentrantEventsTest.java diff --git a/src/test/java/org/xbib/event/bus/StringCatcher.java b/event-common/src/test/java/org/xbib/event/bus/StringCatcher.java similarity index 100% rename from src/test/java/org/xbib/event/bus/StringCatcher.java rename to event-common/src/test/java/org/xbib/event/bus/StringCatcher.java diff --git a/src/test/java/org/xbib/event/clock/ClockEventManagerTest.java b/event-common/src/test/java/org/xbib/event/clock/ClockEventManagerTest.java similarity index 95% rename from src/test/java/org/xbib/event/clock/ClockEventManagerTest.java rename to event-common/src/test/java/org/xbib/event/clock/ClockEventManagerTest.java index 52d5e13..357e01c 100644 --- a/src/test/java/org/xbib/event/clock/ClockEventManagerTest.java +++ b/event-common/src/test/java/org/xbib/event/clock/ClockEventManagerTest.java @@ -1,7 +1,7 @@ package org.xbib.event.clock; import org.junit.jupiter.api.Test; -import org.xbib.event.EventManager; +import org.xbib.event.common.EventManager; import org.xbib.settings.Settings; import java.io.IOException; diff --git a/src/test/java/org/xbib/event/clock/TestClockEvent.java b/event-common/src/test/java/org/xbib/event/clock/TestClockEvent.java similarity index 100% rename from src/test/java/org/xbib/event/clock/TestClockEvent.java rename to event-common/src/test/java/org/xbib/event/clock/TestClockEvent.java diff --git a/src/test/java/org/xbib/event/clock/TestClockEventConsumer.java b/event-common/src/test/java/org/xbib/event/clock/TestClockEventConsumer.java similarity index 100% rename from src/test/java/org/xbib/event/clock/TestClockEventConsumer.java rename to event-common/src/test/java/org/xbib/event/clock/TestClockEventConsumer.java diff --git a/src/test/java/org/xbib/event/io/file/FileFollowEventManagerTest.java b/event-common/src/test/java/org/xbib/event/path/FileFollowEventManagerTest.java similarity index 95% rename from src/test/java/org/xbib/event/io/file/FileFollowEventManagerTest.java rename to event-common/src/test/java/org/xbib/event/path/FileFollowEventManagerTest.java index 2faedcc..564285f 100644 --- a/src/test/java/org/xbib/event/io/file/FileFollowEventManagerTest.java +++ b/event-common/src/test/java/org/xbib/event/path/FileFollowEventManagerTest.java @@ -1,7 +1,7 @@ -package org.xbib.event.io.file; +package org.xbib.event.path; import org.junit.jupiter.api.Test; -import org.xbib.event.EventManager; +import org.xbib.event.common.EventManager; import org.xbib.settings.Settings; import java.io.BufferedWriter; diff --git a/src/test/java/org/xbib/event/io/file/TestFileFollowEvent.java b/event-common/src/test/java/org/xbib/event/path/TestFileFollowEvent.java similarity index 68% rename from src/test/java/org/xbib/event/io/file/TestFileFollowEvent.java rename to event-common/src/test/java/org/xbib/event/path/TestFileFollowEvent.java index 8ce49ce..499543b 100644 --- a/src/test/java/org/xbib/event/io/file/TestFileFollowEvent.java +++ b/event-common/src/test/java/org/xbib/event/path/TestFileFollowEvent.java @@ -1,4 +1,4 @@ -package org.xbib.event.io.file; +package org.xbib.event.path; public class TestFileFollowEvent extends DefaultFileFollowEvent { } diff --git a/src/test/java/org/xbib/event/io/file/TestFileFollowEventConsumer.java b/event-common/src/test/java/org/xbib/event/path/TestFileFollowEventConsumer.java similarity index 81% rename from src/test/java/org/xbib/event/io/file/TestFileFollowEventConsumer.java rename to event-common/src/test/java/org/xbib/event/path/TestFileFollowEventConsumer.java index 4833723..9437d92 100644 --- a/src/test/java/org/xbib/event/io/file/TestFileFollowEventConsumer.java +++ b/event-common/src/test/java/org/xbib/event/path/TestFileFollowEventConsumer.java @@ -1,12 +1,9 @@ -package org.xbib.event.io.file; +package org.xbib.event.path; import org.xbib.event.EventConsumer; import org.xbib.event.bus.AllowConcurrentEvents; import org.xbib.event.bus.Subscribe; -import org.xbib.event.timer.TestTimerEvent; -import java.io.IOException; -import java.time.Instant; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/src/test/java/org/xbib/event/syslog/SyslogServiceTest.java b/event-common/src/test/java/org/xbib/event/syslog/SyslogServiceTest.java similarity index 100% rename from src/test/java/org/xbib/event/syslog/SyslogServiceTest.java rename to event-common/src/test/java/org/xbib/event/syslog/SyslogServiceTest.java diff --git a/src/test/java/org/xbib/event/timer/TestTimerEvent.java b/event-common/src/test/java/org/xbib/event/timer/TestTimerEvent.java similarity index 100% rename from src/test/java/org/xbib/event/timer/TestTimerEvent.java rename to event-common/src/test/java/org/xbib/event/timer/TestTimerEvent.java diff --git a/src/test/java/org/xbib/event/timer/TestTimerEventConsumer.java b/event-common/src/test/java/org/xbib/event/timer/TestTimerEventConsumer.java similarity index 100% rename from src/test/java/org/xbib/event/timer/TestTimerEventConsumer.java rename to event-common/src/test/java/org/xbib/event/timer/TestTimerEventConsumer.java diff --git a/src/test/java/org/xbib/event/timer/TimerEventManagerTest.java b/event-common/src/test/java/org/xbib/event/timer/TimerEventManagerTest.java similarity index 95% rename from src/test/java/org/xbib/event/timer/TimerEventManagerTest.java rename to event-common/src/test/java/org/xbib/event/timer/TimerEventManagerTest.java index 8a8b867..35bcda1 100644 --- a/src/test/java/org/xbib/event/timer/TimerEventManagerTest.java +++ b/event-common/src/test/java/org/xbib/event/timer/TimerEventManagerTest.java @@ -1,7 +1,7 @@ package org.xbib.event.timer; import org.junit.jupiter.api.Test; -import org.xbib.event.EventManager; +import org.xbib.event.common.EventManager; import org.xbib.settings.Settings; import java.io.IOException; diff --git a/event-common/src/test/resources/logging.properties b/event-common/src/test/resources/logging.properties new file mode 100644 index 0000000..039cb05 --- /dev/null +++ b/event-common/src/test/resources/logging.properties @@ -0,0 +1,6 @@ +handlers=java.util.logging.ConsoleHandler +.level=ALL +java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL %4$-7s [%3$s] %5$s %6$s%n +java.util.logging.ConsoleHandler.level=ALL +java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter +jdk.event.security.level=INFO diff --git a/event-loop/src/main/java/module-info.java b/event-loop/src/main/java/module-info.java new file mode 100644 index 0000000..dd2b5a3 --- /dev/null +++ b/event-loop/src/main/java/module-info.java @@ -0,0 +1,8 @@ +module org.xbib.event.loop { + exports org.xbib.event.loop; + exports org.xbib.event.loop.nio; + exports org.xbib.event.loop.selector; + exports org.xbib.event.loop.thread; + exports org.xbib.event.loop.util; + requires java.logging; +} diff --git a/src/main/java/org/xbib/event/loop/AbstractEventExecutor.java b/event-loop/src/main/java/org/xbib/event/loop/AbstractEventExecutor.java similarity index 93% rename from src/main/java/org/xbib/event/loop/AbstractEventExecutor.java rename to event-loop/src/main/java/org/xbib/event/loop/AbstractEventExecutor.java index 5dd7817..b362989 100644 --- a/src/main/java/org/xbib/event/loop/AbstractEventExecutor.java +++ b/event-loop/src/main/java/org/xbib/event/loop/AbstractEventExecutor.java @@ -1,14 +1,5 @@ package org.xbib.event.loop; -import org.xbib.event.DefaultProgressivePromise; -import org.xbib.event.DefaultPromise; -import org.xbib.event.FailedFuture; -import org.xbib.event.Future; -import org.xbib.event.ProgressivePromise; -import org.xbib.event.Promise; -import org.xbib.event.PromiseTask; -import org.xbib.event.ScheduledFuture; -import org.xbib.event.SucceededFuture; import java.util.Collection; import java.util.Collections; diff --git a/src/main/java/org/xbib/event/loop/AbstractEventExecutorGroup.java b/event-loop/src/main/java/org/xbib/event/loop/AbstractEventExecutorGroup.java similarity index 97% rename from src/main/java/org/xbib/event/loop/AbstractEventExecutorGroup.java rename to event-loop/src/main/java/org/xbib/event/loop/AbstractEventExecutorGroup.java index 6b2c8d0..f46ca3e 100644 --- a/src/main/java/org/xbib/event/loop/AbstractEventExecutorGroup.java +++ b/event-loop/src/main/java/org/xbib/event/loop/AbstractEventExecutorGroup.java @@ -1,8 +1,5 @@ package org.xbib.event.loop; -import org.xbib.event.Future; -import org.xbib.event.ScheduledFuture; - import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; diff --git a/src/main/java/org/xbib/event/AbstractFuture.java b/event-loop/src/main/java/org/xbib/event/loop/AbstractFuture.java similarity index 97% rename from src/main/java/org/xbib/event/AbstractFuture.java rename to event-loop/src/main/java/org/xbib/event/loop/AbstractFuture.java index 6652544..9b06078 100644 --- a/src/main/java/org/xbib/event/AbstractFuture.java +++ b/event-loop/src/main/java/org/xbib/event/loop/AbstractFuture.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; diff --git a/src/main/java/org/xbib/event/loop/AbstractScheduledEventExecutor.java b/event-loop/src/main/java/org/xbib/event/loop/AbstractScheduledEventExecutor.java similarity index 97% rename from src/main/java/org/xbib/event/loop/AbstractScheduledEventExecutor.java rename to event-loop/src/main/java/org/xbib/event/loop/AbstractScheduledEventExecutor.java index 058dead..f2bc48e 100644 --- a/src/main/java/org/xbib/event/loop/AbstractScheduledEventExecutor.java +++ b/event-loop/src/main/java/org/xbib/event/loop/AbstractScheduledEventExecutor.java @@ -1,9 +1,7 @@ package org.xbib.event.loop; -import org.xbib.event.ScheduledFuture; -import org.xbib.event.ScheduledFutureTask; -import org.xbib.event.util.DefaultPriorityQueue; -import org.xbib.event.util.PriorityQueue; +import org.xbib.event.loop.util.DefaultPriorityQueue; +import org.xbib.event.loop.util.PriorityQueue; import java.util.Comparator; import java.util.Objects; @@ -11,7 +9,7 @@ import java.util.Queue; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; -import static org.xbib.event.ScheduledFutureTask.deadlineNanos; +import static org.xbib.event.loop.ScheduledFutureTask.deadlineNanos; /** * Abstract base class for {@link EventExecutor}s that want to support scheduling. diff --git a/src/main/java/org/xbib/event/loop/BlockingOperationException.java b/event-loop/src/main/java/org/xbib/event/loop/BlockingOperationException.java similarity index 100% rename from src/main/java/org/xbib/event/loop/BlockingOperationException.java rename to event-loop/src/main/java/org/xbib/event/loop/BlockingOperationException.java diff --git a/src/main/java/org/xbib/event/CompleteFuture.java b/event-loop/src/main/java/org/xbib/event/loop/CompleteFuture.java similarity index 99% rename from src/main/java/org/xbib/event/CompleteFuture.java rename to event-loop/src/main/java/org/xbib/event/loop/CompleteFuture.java index d1a507b..e18c6ff 100644 --- a/src/main/java/org/xbib/event/CompleteFuture.java +++ b/event-loop/src/main/java/org/xbib/event/loop/CompleteFuture.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; import org.xbib.event.loop.EventExecutor; diff --git a/src/main/java/org/xbib/event/loop/DefaultEventExecutorChooserFactory.java b/event-loop/src/main/java/org/xbib/event/loop/DefaultEventExecutorChooserFactory.java similarity index 100% rename from src/main/java/org/xbib/event/loop/DefaultEventExecutorChooserFactory.java rename to event-loop/src/main/java/org/xbib/event/loop/DefaultEventExecutorChooserFactory.java diff --git a/src/main/java/org/xbib/event/DefaultFutureListeners.java b/event-loop/src/main/java/org/xbib/event/loop/DefaultFutureListeners.java similarity index 98% rename from src/main/java/org/xbib/event/DefaultFutureListeners.java rename to event-loop/src/main/java/org/xbib/event/loop/DefaultFutureListeners.java index 07d9395..da71244 100644 --- a/src/main/java/org/xbib/event/DefaultFutureListeners.java +++ b/event-loop/src/main/java/org/xbib/event/loop/DefaultFutureListeners.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; import java.util.Arrays; diff --git a/src/main/java/org/xbib/event/DefaultProgressivePromise.java b/event-loop/src/main/java/org/xbib/event/loop/DefaultProgressivePromise.java similarity index 99% rename from src/main/java/org/xbib/event/DefaultProgressivePromise.java rename to event-loop/src/main/java/org/xbib/event/loop/DefaultProgressivePromise.java index c4ec00e..84b1927 100644 --- a/src/main/java/org/xbib/event/DefaultProgressivePromise.java +++ b/event-loop/src/main/java/org/xbib/event/loop/DefaultProgressivePromise.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; import org.xbib.event.loop.EventExecutor; diff --git a/src/main/java/org/xbib/event/DefaultPromise.java b/event-loop/src/main/java/org/xbib/event/loop/DefaultPromise.java similarity index 99% rename from src/main/java/org/xbib/event/DefaultPromise.java rename to event-loop/src/main/java/org/xbib/event/loop/DefaultPromise.java index 510e7fd..3c3274c 100644 --- a/src/main/java/org/xbib/event/DefaultPromise.java +++ b/event-loop/src/main/java/org/xbib/event/loop/DefaultPromise.java @@ -1,8 +1,6 @@ -package org.xbib.event; +package org.xbib.event.loop; -import org.xbib.event.loop.BlockingOperationException; -import org.xbib.event.loop.EventExecutor; -import org.xbib.event.thread.InternalThreadLocalMap; +import org.xbib.event.loop.thread.InternalThreadLocalMap; import java.util.Objects; import java.util.concurrent.CancellationException; diff --git a/src/main/java/org/xbib/event/loop/EventExecutor.java b/event-loop/src/main/java/org/xbib/event/loop/EventExecutor.java similarity index 92% rename from src/main/java/org/xbib/event/loop/EventExecutor.java rename to event-loop/src/main/java/org/xbib/event/loop/EventExecutor.java index ec41e5a..087a537 100644 --- a/src/main/java/org/xbib/event/loop/EventExecutor.java +++ b/event-loop/src/main/java/org/xbib/event/loop/EventExecutor.java @@ -1,11 +1,5 @@ - package org.xbib.event.loop; -import org.xbib.event.Future; -import org.xbib.event.FutureListener; -import org.xbib.event.ProgressivePromise; -import org.xbib.event.Promise; - /** * The {@link EventExecutor} is a special {@link EventExecutorGroup} which comes * with some handy methods to see if a {@link Thread} is executed in a event loop. diff --git a/src/main/java/org/xbib/event/loop/EventExecutorChooserFactory.java b/event-loop/src/main/java/org/xbib/event/loop/EventExecutorChooserFactory.java similarity index 100% rename from src/main/java/org/xbib/event/loop/EventExecutorChooserFactory.java rename to event-loop/src/main/java/org/xbib/event/loop/EventExecutorChooserFactory.java diff --git a/src/main/java/org/xbib/event/loop/EventExecutorGroup.java b/event-loop/src/main/java/org/xbib/event/loop/EventExecutorGroup.java similarity index 97% rename from src/main/java/org/xbib/event/loop/EventExecutorGroup.java rename to event-loop/src/main/java/org/xbib/event/loop/EventExecutorGroup.java index b2f6589..c2f89f1 100644 --- a/src/main/java/org/xbib/event/loop/EventExecutorGroup.java +++ b/event-loop/src/main/java/org/xbib/event/loop/EventExecutorGroup.java @@ -1,8 +1,5 @@ package org.xbib.event.loop; -import org.xbib.event.Future; -import org.xbib.event.ScheduledFuture; - import java.util.Iterator; import java.util.concurrent.Callable; import java.util.concurrent.ScheduledExecutorService; diff --git a/src/main/java/org/xbib/event/loop/EventLoop.java b/event-loop/src/main/java/org/xbib/event/loop/EventLoop.java similarity index 100% rename from src/main/java/org/xbib/event/loop/EventLoop.java rename to event-loop/src/main/java/org/xbib/event/loop/EventLoop.java diff --git a/src/main/java/org/xbib/event/loop/EventLoopException.java b/event-loop/src/main/java/org/xbib/event/loop/EventLoopException.java similarity index 100% rename from src/main/java/org/xbib/event/loop/EventLoopException.java rename to event-loop/src/main/java/org/xbib/event/loop/EventLoopException.java diff --git a/src/main/java/org/xbib/event/loop/EventLoopGroup.java b/event-loop/src/main/java/org/xbib/event/loop/EventLoopGroup.java similarity index 100% rename from src/main/java/org/xbib/event/loop/EventLoopGroup.java rename to event-loop/src/main/java/org/xbib/event/loop/EventLoopGroup.java diff --git a/src/main/java/org/xbib/event/loop/EventLoopTaskQueueFactory.java b/event-loop/src/main/java/org/xbib/event/loop/EventLoopTaskQueueFactory.java similarity index 100% rename from src/main/java/org/xbib/event/loop/EventLoopTaskQueueFactory.java rename to event-loop/src/main/java/org/xbib/event/loop/EventLoopTaskQueueFactory.java diff --git a/src/main/java/org/xbib/event/FailedFuture.java b/event-loop/src/main/java/org/xbib/event/loop/FailedFuture.java similarity index 97% rename from src/main/java/org/xbib/event/FailedFuture.java rename to event-loop/src/main/java/org/xbib/event/loop/FailedFuture.java index 7377bc8..9d85de5 100644 --- a/src/main/java/org/xbib/event/FailedFuture.java +++ b/event-loop/src/main/java/org/xbib/event/loop/FailedFuture.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; import org.xbib.event.loop.EventExecutor; diff --git a/src/main/java/org/xbib/event/Future.java b/event-loop/src/main/java/org/xbib/event/loop/Future.java similarity index 97% rename from src/main/java/org/xbib/event/Future.java rename to event-loop/src/main/java/org/xbib/event/loop/Future.java index ecb35cd..34da291 100644 --- a/src/main/java/org/xbib/event/Future.java +++ b/event-loop/src/main/java/org/xbib/event/loop/Future.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; import java.util.concurrent.TimeUnit; diff --git a/src/main/java/org/xbib/event/FutureListener.java b/event-loop/src/main/java/org/xbib/event/loop/FutureListener.java similarity index 73% rename from src/main/java/org/xbib/event/FutureListener.java rename to event-loop/src/main/java/org/xbib/event/loop/FutureListener.java index e4b2513..0d2fe00 100644 --- a/src/main/java/org/xbib/event/FutureListener.java +++ b/event-loop/src/main/java/org/xbib/event/loop/FutureListener.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; public interface FutureListener extends GenericFutureListener> { } diff --git a/src/main/java/org/xbib/event/GenericFutureListener.java b/event-loop/src/main/java/org/xbib/event/loop/GenericFutureListener.java similarity index 85% rename from src/main/java/org/xbib/event/GenericFutureListener.java rename to event-loop/src/main/java/org/xbib/event/loop/GenericFutureListener.java index 935cf1e..6e179ba 100644 --- a/src/main/java/org/xbib/event/GenericFutureListener.java +++ b/event-loop/src/main/java/org/xbib/event/loop/GenericFutureListener.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; import java.util.EventListener; diff --git a/src/main/java/org/xbib/event/GenericProgressiveFutureListener.java b/event-loop/src/main/java/org/xbib/event/loop/GenericProgressiveFutureListener.java similarity index 94% rename from src/main/java/org/xbib/event/GenericProgressiveFutureListener.java rename to event-loop/src/main/java/org/xbib/event/loop/GenericProgressiveFutureListener.java index a1805ed..a48b848 100644 --- a/src/main/java/org/xbib/event/GenericProgressiveFutureListener.java +++ b/event-loop/src/main/java/org/xbib/event/loop/GenericProgressiveFutureListener.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; public interface GenericProgressiveFutureListener> extends GenericFutureListener { /** diff --git a/src/main/java/org/xbib/event/loop/GlobalEventExecutor.java b/event-loop/src/main/java/org/xbib/event/loop/GlobalEventExecutor.java similarity index 98% rename from src/main/java/org/xbib/event/loop/GlobalEventExecutor.java rename to event-loop/src/main/java/org/xbib/event/loop/GlobalEventExecutor.java index 50a5bdb..b47dfce 100644 --- a/src/main/java/org/xbib/event/loop/GlobalEventExecutor.java +++ b/event-loop/src/main/java/org/xbib/event/loop/GlobalEventExecutor.java @@ -1,10 +1,7 @@ package org.xbib.event.loop; -import org.xbib.event.FailedFuture; -import org.xbib.event.Future; -import org.xbib.event.ScheduledFutureTask; -import org.xbib.event.thread.DefaultThreadFactory; -import org.xbib.event.thread.ThreadExecutorMap; +import org.xbib.event.loop.thread.DefaultThreadFactory; +import org.xbib.event.loop.thread.ThreadExecutorMap; import java.util.Objects; import java.util.Queue; diff --git a/src/main/java/org/xbib/event/loop/MultithreadEventExecutorGroup.java b/event-loop/src/main/java/org/xbib/event/loop/MultithreadEventExecutorGroup.java similarity index 96% rename from src/main/java/org/xbib/event/loop/MultithreadEventExecutorGroup.java rename to event-loop/src/main/java/org/xbib/event/loop/MultithreadEventExecutorGroup.java index f0c4172..0cd668a 100644 --- a/src/main/java/org/xbib/event/loop/MultithreadEventExecutorGroup.java +++ b/event-loop/src/main/java/org/xbib/event/loop/MultithreadEventExecutorGroup.java @@ -1,11 +1,7 @@ package org.xbib.event.loop; -import org.xbib.event.DefaultPromise; -import org.xbib.event.Future; -import org.xbib.event.FutureListener; -import org.xbib.event.Promise; -import org.xbib.event.thread.DefaultThreadFactory; -import org.xbib.event.thread.ThreadPerTaskExecutor; +import org.xbib.event.loop.thread.DefaultThreadFactory; +import org.xbib.event.loop.thread.ThreadPerTaskExecutor; import java.util.Collections; import java.util.Iterator; diff --git a/src/main/java/org/xbib/event/loop/MultithreadEventLoopGroup.java b/event-loop/src/main/java/org/xbib/event/loop/MultithreadEventLoopGroup.java similarity index 97% rename from src/main/java/org/xbib/event/loop/MultithreadEventLoopGroup.java rename to event-loop/src/main/java/org/xbib/event/loop/MultithreadEventLoopGroup.java index 94fba29..2957ffc 100644 --- a/src/main/java/org/xbib/event/loop/MultithreadEventLoopGroup.java +++ b/event-loop/src/main/java/org/xbib/event/loop/MultithreadEventLoopGroup.java @@ -1,6 +1,6 @@ package org.xbib.event.loop; -import org.xbib.event.thread.DefaultThreadFactory; +import org.xbib.event.loop.thread.DefaultThreadFactory; import java.util.concurrent.Executor; import java.util.concurrent.ThreadFactory; diff --git a/src/main/java/org/xbib/event/loop/OrderedEventExecutor.java b/event-loop/src/main/java/org/xbib/event/loop/OrderedEventExecutor.java similarity index 100% rename from src/main/java/org/xbib/event/loop/OrderedEventExecutor.java rename to event-loop/src/main/java/org/xbib/event/loop/OrderedEventExecutor.java diff --git a/src/main/java/org/xbib/event/ProgressiveFuture.java b/event-loop/src/main/java/org/xbib/event/loop/ProgressiveFuture.java similarity index 97% rename from src/main/java/org/xbib/event/ProgressiveFuture.java rename to event-loop/src/main/java/org/xbib/event/loop/ProgressiveFuture.java index 997e14e..40b3ba8 100644 --- a/src/main/java/org/xbib/event/ProgressiveFuture.java +++ b/event-loop/src/main/java/org/xbib/event/loop/ProgressiveFuture.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; /** * A {@link Future} which is used to indicate the progress of an operation. diff --git a/src/main/java/org/xbib/event/ProgressivePromise.java b/event-loop/src/main/java/org/xbib/event/loop/ProgressivePromise.java similarity index 98% rename from src/main/java/org/xbib/event/ProgressivePromise.java rename to event-loop/src/main/java/org/xbib/event/loop/ProgressivePromise.java index 6cb84c4..0528886 100644 --- a/src/main/java/org/xbib/event/ProgressivePromise.java +++ b/event-loop/src/main/java/org/xbib/event/loop/ProgressivePromise.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; /** * Special {@link ProgressiveFuture} which is writable. diff --git a/src/main/java/org/xbib/event/Promise.java b/event-loop/src/main/java/org/xbib/event/loop/Promise.java similarity index 96% rename from src/main/java/org/xbib/event/Promise.java rename to event-loop/src/main/java/org/xbib/event/loop/Promise.java index 0bebac2..8271327 100644 --- a/src/main/java/org/xbib/event/Promise.java +++ b/event-loop/src/main/java/org/xbib/event/loop/Promise.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; public interface Promise extends Future { Promise setSuccess(V value); diff --git a/src/main/java/org/xbib/event/PromiseTask.java b/event-loop/src/main/java/org/xbib/event/loop/PromiseTask.java similarity index 98% rename from src/main/java/org/xbib/event/PromiseTask.java rename to event-loop/src/main/java/org/xbib/event/loop/PromiseTask.java index e2c9f38..6995b36 100644 --- a/src/main/java/org/xbib/event/PromiseTask.java +++ b/event-loop/src/main/java/org/xbib/event/loop/PromiseTask.java @@ -1,6 +1,4 @@ -package org.xbib.event; - -import org.xbib.event.loop.EventExecutor; +package org.xbib.event.loop; import java.util.concurrent.Callable; import java.util.concurrent.RunnableFuture; diff --git a/src/main/java/org/xbib/event/loop/RejectedExecutionHandler.java b/event-loop/src/main/java/org/xbib/event/loop/RejectedExecutionHandler.java similarity index 100% rename from src/main/java/org/xbib/event/loop/RejectedExecutionHandler.java rename to event-loop/src/main/java/org/xbib/event/loop/RejectedExecutionHandler.java diff --git a/src/main/java/org/xbib/event/loop/RejectedExecutionHandlers.java b/event-loop/src/main/java/org/xbib/event/loop/RejectedExecutionHandlers.java similarity index 100% rename from src/main/java/org/xbib/event/loop/RejectedExecutionHandlers.java rename to event-loop/src/main/java/org/xbib/event/loop/RejectedExecutionHandlers.java diff --git a/src/main/java/org/xbib/event/ScheduledFuture.java b/event-loop/src/main/java/org/xbib/event/loop/ScheduledFuture.java similarity index 87% rename from src/main/java/org/xbib/event/ScheduledFuture.java rename to event-loop/src/main/java/org/xbib/event/loop/ScheduledFuture.java index 2eb7f0b..3d66f5a 100644 --- a/src/main/java/org/xbib/event/ScheduledFuture.java +++ b/event-loop/src/main/java/org/xbib/event/loop/ScheduledFuture.java @@ -1,4 +1,4 @@ -package org.xbib.event; +package org.xbib.event.loop; /** * The result of a scheduled asynchronous operation. diff --git a/src/main/java/org/xbib/event/ScheduledFutureTask.java b/event-loop/src/main/java/org/xbib/event/loop/ScheduledFutureTask.java similarity index 96% rename from src/main/java/org/xbib/event/ScheduledFutureTask.java rename to event-loop/src/main/java/org/xbib/event/loop/ScheduledFutureTask.java index 596cee7..05a518e 100644 --- a/src/main/java/org/xbib/event/ScheduledFutureTask.java +++ b/event-loop/src/main/java/org/xbib/event/loop/ScheduledFutureTask.java @@ -1,9 +1,7 @@ -package org.xbib.event; +package org.xbib.event.loop; -import org.xbib.event.loop.AbstractScheduledEventExecutor; -import org.xbib.event.loop.EventExecutor; -import org.xbib.event.util.DefaultPriorityQueue; -import org.xbib.event.util.PriorityQueueNode; +import org.xbib.event.loop.util.DefaultPriorityQueue; +import org.xbib.event.loop.util.PriorityQueueNode; import java.util.concurrent.Callable; import java.util.concurrent.Delayed; diff --git a/src/main/java/org/xbib/event/loop/SingleThreadEventExecutor.java b/event-loop/src/main/java/org/xbib/event/loop/SingleThreadEventExecutor.java similarity index 99% rename from src/main/java/org/xbib/event/loop/SingleThreadEventExecutor.java rename to event-loop/src/main/java/org/xbib/event/loop/SingleThreadEventExecutor.java index 513d820..82bd304 100644 --- a/src/main/java/org/xbib/event/loop/SingleThreadEventExecutor.java +++ b/event-loop/src/main/java/org/xbib/event/loop/SingleThreadEventExecutor.java @@ -1,13 +1,9 @@ package org.xbib.event.loop; -import org.xbib.event.DefaultPromise; -import org.xbib.event.Future; -import org.xbib.event.Promise; -import org.xbib.event.ScheduledFutureTask; -import org.xbib.event.thread.FastThreadLocal; -import org.xbib.event.thread.ThreadExecutorMap; -import org.xbib.event.thread.ThreadPerTaskExecutor; -import org.xbib.event.thread.ThreadProperties; +import org.xbib.event.loop.thread.FastThreadLocal; +import org.xbib.event.loop.thread.ThreadExecutorMap; +import org.xbib.event.loop.thread.ThreadPerTaskExecutor; +import org.xbib.event.loop.thread.ThreadProperties; import java.lang.Thread.State; import java.util.ArrayList; diff --git a/src/main/java/org/xbib/event/loop/SingleThreadEventLoop.java b/event-loop/src/main/java/org/xbib/event/loop/SingleThreadEventLoop.java similarity index 100% rename from src/main/java/org/xbib/event/loop/SingleThreadEventLoop.java rename to event-loop/src/main/java/org/xbib/event/loop/SingleThreadEventLoop.java diff --git a/src/main/java/org/xbib/event/SucceededFuture.java b/event-loop/src/main/java/org/xbib/event/loop/SucceededFuture.java similarity index 91% rename from src/main/java/org/xbib/event/SucceededFuture.java rename to event-loop/src/main/java/org/xbib/event/loop/SucceededFuture.java index c4a439d..cf6aca1 100644 --- a/src/main/java/org/xbib/event/SucceededFuture.java +++ b/event-loop/src/main/java/org/xbib/event/loop/SucceededFuture.java @@ -1,6 +1,4 @@ -package org.xbib.event; - -import org.xbib.event.loop.EventExecutor; +package org.xbib.event.loop; /** * The {@link CompleteFuture} which is succeeded already. It is diff --git a/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java b/event-loop/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java similarity index 99% rename from src/main/java/org/xbib/event/loop/nio/NioEventLoop.java rename to event-loop/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java index 8c4e919..33d7e24 100644 --- a/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java +++ b/event-loop/src/main/java/org/xbib/event/loop/nio/NioEventLoop.java @@ -5,7 +5,7 @@ import org.xbib.event.loop.EventLoopTaskQueueFactory; import org.xbib.event.loop.RejectedExecutionHandler; import org.xbib.event.loop.selector.SelectStrategy; import org.xbib.event.loop.SingleThreadEventLoop; -import org.xbib.event.util.IntSupplier; +import org.xbib.event.loop.util.IntSupplier; import java.io.IOException; import java.lang.reflect.AccessibleObject; diff --git a/src/main/java/org/xbib/event/loop/nio/NioEventLoopGroup.java b/event-loop/src/main/java/org/xbib/event/loop/nio/NioEventLoopGroup.java similarity index 100% rename from src/main/java/org/xbib/event/loop/nio/NioEventLoopGroup.java rename to event-loop/src/main/java/org/xbib/event/loop/nio/NioEventLoopGroup.java diff --git a/src/main/java/org/xbib/event/loop/nio/NioTask.java b/event-loop/src/main/java/org/xbib/event/loop/nio/NioTask.java similarity index 100% rename from src/main/java/org/xbib/event/loop/nio/NioTask.java rename to event-loop/src/main/java/org/xbib/event/loop/nio/NioTask.java diff --git a/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java b/event-loop/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java similarity index 100% rename from src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java rename to event-loop/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySet.java diff --git a/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySetSelector.java b/event-loop/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySetSelector.java similarity index 100% rename from src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySetSelector.java rename to event-loop/src/main/java/org/xbib/event/loop/nio/SelectedSelectionKeySetSelector.java diff --git a/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategy.java b/event-loop/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategy.java similarity index 90% rename from src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategy.java rename to event-loop/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategy.java index e2f6ae8..2b5c6c7 100644 --- a/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategy.java +++ b/event-loop/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategy.java @@ -1,6 +1,6 @@ package org.xbib.event.loop.selector; -import org.xbib.event.util.IntSupplier; +import org.xbib.event.loop.util.IntSupplier; /** * Default select strategy. diff --git a/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategyFactory.java b/event-loop/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategyFactory.java similarity index 100% rename from src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategyFactory.java rename to event-loop/src/main/java/org/xbib/event/loop/selector/DefaultSelectStrategyFactory.java diff --git a/src/main/java/org/xbib/event/loop/selector/SelectStrategy.java b/event-loop/src/main/java/org/xbib/event/loop/selector/SelectStrategy.java similarity index 96% rename from src/main/java/org/xbib/event/loop/selector/SelectStrategy.java rename to event-loop/src/main/java/org/xbib/event/loop/selector/SelectStrategy.java index adcc912..35d91e0 100644 --- a/src/main/java/org/xbib/event/loop/selector/SelectStrategy.java +++ b/event-loop/src/main/java/org/xbib/event/loop/selector/SelectStrategy.java @@ -1,6 +1,6 @@ package org.xbib.event.loop.selector; -import org.xbib.event.util.IntSupplier; +import org.xbib.event.loop.util.IntSupplier; /** * Select strategy interface. diff --git a/src/main/java/org/xbib/event/loop/selector/SelectStrategyFactory.java b/event-loop/src/main/java/org/xbib/event/loop/selector/SelectStrategyFactory.java similarity index 100% rename from src/main/java/org/xbib/event/loop/selector/SelectStrategyFactory.java rename to event-loop/src/main/java/org/xbib/event/loop/selector/SelectStrategyFactory.java diff --git a/src/main/java/org/xbib/event/thread/DefaultThreadFactory.java b/event-loop/src/main/java/org/xbib/event/loop/thread/DefaultThreadFactory.java similarity index 98% rename from src/main/java/org/xbib/event/thread/DefaultThreadFactory.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/DefaultThreadFactory.java index 20f8b32..b63d041 100644 --- a/src/main/java/org/xbib/event/thread/DefaultThreadFactory.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/DefaultThreadFactory.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.util.Locale; import java.util.Objects; diff --git a/src/main/java/org/xbib/event/thread/FastThreadLocal.java b/event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocal.java similarity index 99% rename from src/main/java/org/xbib/event/thread/FastThreadLocal.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocal.java index e222098..1dd75b7 100644 --- a/src/main/java/org/xbib/event/thread/FastThreadLocal.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocal.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.util.Collections; import java.util.IdentityHashMap; diff --git a/src/main/java/org/xbib/event/thread/FastThreadLocalRunnable.java b/event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocalRunnable.java similarity index 94% rename from src/main/java/org/xbib/event/thread/FastThreadLocalRunnable.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocalRunnable.java index 0b8e599..19c1a73 100644 --- a/src/main/java/org/xbib/event/thread/FastThreadLocalRunnable.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocalRunnable.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.util.Objects; diff --git a/src/main/java/org/xbib/event/thread/FastThreadLocalThread.java b/event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocalThread.java similarity index 99% rename from src/main/java/org/xbib/event/thread/FastThreadLocalThread.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocalThread.java index a7baa08..b7cbc5a 100644 --- a/src/main/java/org/xbib/event/thread/FastThreadLocalThread.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/FastThreadLocalThread.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.util.logging.Level; diff --git a/src/main/java/org/xbib/event/thread/InternalThreadLocalMap.java b/event-loop/src/main/java/org/xbib/event/loop/thread/InternalThreadLocalMap.java similarity index 99% rename from src/main/java/org/xbib/event/thread/InternalThreadLocalMap.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/InternalThreadLocalMap.java index 960b019..99b5ab0 100644 --- a/src/main/java/org/xbib/event/thread/InternalThreadLocalMap.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/InternalThreadLocalMap.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; diff --git a/src/main/java/org/xbib/event/thread/ThreadExecutorMap.java b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadExecutorMap.java similarity index 98% rename from src/main/java/org/xbib/event/thread/ThreadExecutorMap.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/ThreadExecutorMap.java index 88107c1..391947f 100644 --- a/src/main/java/org/xbib/event/thread/ThreadExecutorMap.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadExecutorMap.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import org.xbib.event.loop.EventExecutor; diff --git a/src/main/java/org/xbib/event/thread/ThreadInfo.java b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadInfo.java similarity index 90% rename from src/main/java/org/xbib/event/thread/ThreadInfo.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/ThreadInfo.java index 395b1a8..871e01b 100644 --- a/src/main/java/org/xbib/event/thread/ThreadInfo.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadInfo.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.util.concurrent.TimeUnit; diff --git a/src/main/java/org/xbib/event/thread/ThreadPerTaskExecutor.java b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadPerTaskExecutor.java similarity index 93% rename from src/main/java/org/xbib/event/thread/ThreadPerTaskExecutor.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/ThreadPerTaskExecutor.java index 0fcae83..290e0f1 100644 --- a/src/main/java/org/xbib/event/thread/ThreadPerTaskExecutor.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadPerTaskExecutor.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.util.Objects; import java.util.concurrent.Executor; diff --git a/src/main/java/org/xbib/event/thread/ThreadProperties.java b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadProperties.java similarity index 94% rename from src/main/java/org/xbib/event/thread/ThreadProperties.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/ThreadProperties.java index 0fae7cd..b70c139 100644 --- a/src/main/java/org/xbib/event/thread/ThreadProperties.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/ThreadProperties.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; /** * Expose details for a {@link Thread}. diff --git a/src/main/java/org/xbib/event/thread/TypeParameterMatcher.java b/event-loop/src/main/java/org/xbib/event/loop/thread/TypeParameterMatcher.java similarity index 99% rename from src/main/java/org/xbib/event/thread/TypeParameterMatcher.java rename to event-loop/src/main/java/org/xbib/event/loop/thread/TypeParameterMatcher.java index daaf98a..1735087 100644 --- a/src/main/java/org/xbib/event/thread/TypeParameterMatcher.java +++ b/event-loop/src/main/java/org/xbib/event/loop/thread/TypeParameterMatcher.java @@ -1,4 +1,4 @@ -package org.xbib.event.thread; +package org.xbib.event.loop.thread; import java.lang.reflect.Array; import java.lang.reflect.GenericArrayType; diff --git a/src/main/java/org/xbib/event/util/DefaultPriorityQueue.java b/event-loop/src/main/java/org/xbib/event/loop/util/DefaultPriorityQueue.java similarity index 98% rename from src/main/java/org/xbib/event/util/DefaultPriorityQueue.java rename to event-loop/src/main/java/org/xbib/event/loop/util/DefaultPriorityQueue.java index 5a8a270..7551082 100644 --- a/src/main/java/org/xbib/event/util/DefaultPriorityQueue.java +++ b/event-loop/src/main/java/org/xbib/event/loop/util/DefaultPriorityQueue.java @@ -1,4 +1,4 @@ -package org.xbib.event.util; +package org.xbib.event.loop.util; import java.util.AbstractQueue; import java.util.Arrays; @@ -7,7 +7,7 @@ import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Objects; -import static org.xbib.event.util.PriorityQueueNode.INDEX_NOT_IN_QUEUE; +import static org.xbib.event.loop.util.PriorityQueueNode.INDEX_NOT_IN_QUEUE; /** * A priority queue which uses natural ordering of elements. Elements are also required to be of type diff --git a/src/main/java/org/xbib/event/util/IntSupplier.java b/event-loop/src/main/java/org/xbib/event/loop/util/IntSupplier.java similarity index 85% rename from src/main/java/org/xbib/event/util/IntSupplier.java rename to event-loop/src/main/java/org/xbib/event/loop/util/IntSupplier.java index e237769..e66e9ed 100644 --- a/src/main/java/org/xbib/event/util/IntSupplier.java +++ b/event-loop/src/main/java/org/xbib/event/loop/util/IntSupplier.java @@ -1,4 +1,4 @@ -package org.xbib.event.util; +package org.xbib.event.loop.util; /** * Represents a supplier of {@code int}-valued results. diff --git a/src/main/java/org/xbib/event/util/PriorityQueue.java b/event-loop/src/main/java/org/xbib/event/loop/util/PriorityQueue.java similarity index 97% rename from src/main/java/org/xbib/event/util/PriorityQueue.java rename to event-loop/src/main/java/org/xbib/event/loop/util/PriorityQueue.java index cddefcb..43ae523 100644 --- a/src/main/java/org/xbib/event/util/PriorityQueue.java +++ b/event-loop/src/main/java/org/xbib/event/loop/util/PriorityQueue.java @@ -1,4 +1,4 @@ -package org.xbib.event.util; +package org.xbib.event.loop.util; import java.util.Queue; diff --git a/src/main/java/org/xbib/event/util/PriorityQueueNode.java b/event-loop/src/main/java/org/xbib/event/loop/util/PriorityQueueNode.java similarity index 96% rename from src/main/java/org/xbib/event/util/PriorityQueueNode.java rename to event-loop/src/main/java/org/xbib/event/loop/util/PriorityQueueNode.java index 0769f7e..0090ded 100644 --- a/src/main/java/org/xbib/event/util/PriorityQueueNode.java +++ b/event-loop/src/main/java/org/xbib/event/loop/util/PriorityQueueNode.java @@ -1,4 +1,4 @@ -package org.xbib.event.util; +package org.xbib.event.loop.util; /** * Provides methods for {@link DefaultPriorityQueue} to maintain internal state. These methods should generally not be diff --git a/gradle.properties b/gradle.properties index d2bde2c..a3444c9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ group = org.xbib name = event -version = 0.0.12 +version = 0.1.0 diff --git a/gradle/publish/sonatype.gradle b/gradle/publish/sonatype.gradle new file mode 100644 index 0000000..02744cd --- /dev/null +++ b/gradle/publish/sonatype.gradle @@ -0,0 +1,12 @@ + +if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) { + nexusPublishing { + repositories { + sonatype { + username = project.property('ossrhUsername') + password = project.property('ossrhPassword') + packageGroup = "org.xbib" + } + } + } +} diff --git a/settings.gradle b/settings.gradle index 410c303..314e9a0 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,8 +17,8 @@ dependencyResolutionManagement { libs { version('gradle', '8.5') version('datastructures', '5.0.6') - version('netty', '4.1.104.Final') version('net', '4.0.4') + version('netty', '4.1.104.Final') library('netty-handler', 'io.netty', 'netty-handler').versionRef('netty') library('net', 'org.xbib', 'net').versionRef('net') library('datastructures-common', 'org.xbib', 'datastructures-common').versionRef('datastructures') @@ -39,3 +39,9 @@ dependencyResolutionManagement { } } } + +include 'event-api' +include 'event-async' +include 'event-common' +include 'event-loop' +include 'event-net-http' diff --git a/src/main/java/org/xbib/event/async/impl/AsyncThread.java b/src/main/java/org/xbib/event/async/impl/AsyncThread.java deleted file mode 100644 index 56bb4e0..0000000 --- a/src/main/java/org/xbib/event/async/impl/AsyncThread.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.xbib.event.async.impl; - -import org.xbib.event.thread.FastThreadLocalThread; -import org.xbib.event.thread.ThreadInfo; - -import java.util.concurrent.TimeUnit; - -public class AsyncThread extends FastThreadLocalThread { - - private final boolean worker; - final ThreadInfo info; - ContextInternal context; - ClassLoader topLevelTCCL; - - public AsyncThread(Runnable target, String name, boolean worker, long maxExecTime, TimeUnit maxExecTimeUnit) { - super(target, name); - this.worker = worker; - this.info = new ThreadInfo(maxExecTimeUnit, maxExecTime); - } - - /** - * @return the current context of this thread, this method must be called from the current thread - */ - ContextInternal context() { - return context; - } - - void executeStart() { - if (context == null) { - info.startTime = System.nanoTime(); - } - } - - void executeEnd() { - if (context == null) { - info.startTime = 0; - } - } - - public long startTime() { - return info.startTime; - } - - public boolean isWorker() { - return worker; - } - - public long maxExecTime() { - return info.maxExecTime; - } - - public TimeUnit maxExecTimeUnit() { - return info.maxExecTimeUnit; - } - -} diff --git a/src/main/java/org/xbib/event/queue/QueueEvent.java b/src/main/java/org/xbib/event/queue/QueueEvent.java deleted file mode 100644 index ef21b86..0000000 --- a/src/main/java/org/xbib/event/queue/QueueEvent.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.xbib.event.queue; - -import org.xbib.event.Event; - -import java.util.Map; - -public class QueueEvent implements Event { - - private String key; - - private Map map; - - public QueueEvent() { - } - - @Override - public void setKey(String key) { - this.key = key; - } - - @Override - public String getKey() { - return key; - } - - @Override - public void setMap(Map map) { - this.map = map; - } - - @Override - public Map getMap() { - return map; - } -} diff --git a/src/main/java/org/xbib/event/queue/path/simple/PathQueueEvent.java b/src/main/java/org/xbib/event/queue/path/simple/PathQueueEvent.java deleted file mode 100644 index 46b1e4e..0000000 --- a/src/main/java/org/xbib/event/queue/path/simple/PathQueueEvent.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.xbib.event.queue.path.simple; - -import org.xbib.event.queue.QueueEvent; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.nio.file.attribute.FileTime; -import java.time.Instant; - -public class PathQueueEvent extends QueueEvent { - - static final String INCOMING = "incoming"; - - static final String SUCCESS = "success"; - - static final String FAIL = "fail"; - - private Path path; - - private Path file; - - private String suffix; - - public void setFile(Path file) { - this.file = file; - } - - public Path getFile() { - return file; - } - - public void setPath(Path path) { - this.path = path; - } - - public Path getPath() { - return path; - } - - public void setSuffix(String suffix) { - this.suffix = suffix; - } - - public String getSuffix() { - return suffix; - } - - public void success() throws IOException { - Files.setLastModifiedTime(file, FileTime.from(Instant.now())); - Files.move(file, path.resolve(SUCCESS).resolve(file.getFileName()).toAbsolutePath(), - StandardCopyOption.REPLACE_EXISTING); - } - - public void fail() throws IOException { - Files.setLastModifiedTime(file, FileTime.from(Instant.now())); - Files.move(file, path.resolve(FAIL).resolve(file.getFileName()).toAbsolutePath(), - StandardCopyOption.REPLACE_EXISTING); - } -} diff --git a/src/main/java/org/xbib/event/queue/path/simple/PathQueueEventManager.java b/src/main/java/org/xbib/event/queue/path/simple/PathQueueEventManager.java deleted file mode 100644 index 4068b47..0000000 --- a/src/main/java/org/xbib/event/queue/path/simple/PathQueueEventManager.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.xbib.event.queue.path.simple; - -import org.xbib.datastructures.api.TimeValue; -import org.xbib.datastructures.json.tiny.Json; -import org.xbib.event.bus.EventBus; -import org.xbib.settings.Settings; - -import java.io.IOException; -import java.io.Writer; -import java.nio.file.FileVisitResult; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.SimpleFileVisitor; -import java.nio.file.attribute.BasicFileAttributes; -import java.time.Instant; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.stream.Stream; - -public class PathQueueEventManager { - - private static final Logger logger = Logger.getLogger(PathQueueEventManager.class.getName()); - - private final Settings settings; - - private final Path path; - - private final Map pathEventServiceMap; - - @SuppressWarnings("unchecked") - public PathQueueEventManager(Settings settings, - EventBus eventBus, - ClassLoader classLoader) { - this.settings = settings; - this.pathEventServiceMap = new LinkedHashMap<>(); - this.path = Paths.get(settings.get("path", "/var/tmp/default/queues")); - for (Map.Entry entry : settings.getGroups("queues").entrySet()) { - String name = entry.getKey(); - Settings definition = entry.getValue(); - String eventClassName = definition.get("class"); - if (eventClassName == null) { - throw new IllegalArgumentException("no path event class name given for path event manager at " + path); - } - try { - Class eventClass = (Class) classLoader.loadClass(eventClassName); - Path p = path.resolve(name); - if (!Files.exists(p)) { - logger.log(Level.INFO, "creating queue " + name + " at " + p); - Files.createDirectories(p); - } - for (String string : List.of(PathQueueEvent.INCOMING, PathQueueEvent.SUCCESS, PathQueueEvent.FAIL)) { - Path dir = p.resolve(string); - if (!Files.exists(dir)) { - logger.log(Level.INFO, "creating queue " + name + " dir = " + dir); - Files.createDirectories(dir); - } - } - if (!pathEventServiceMap.containsKey(p)) { - int maxFileSize = settings.getAsInt("maxfilesize", 10 * 1024 * 1024); // max. 10 MB - logger.log(Level.INFO, "creating path event service on " + p + " with class " + eventClassName + " max file size = " + maxFileSize); - PathQueueEventService pathEventService = new PathQueueEventService(eventBus, p, maxFileSize, eventClass); - pathEventServiceMap.put(p, pathEventService); - } - } catch (Exception e) { - logger.log(Level.WARNING, "unable to create path event service " + eventClassName + " reason " + e.getMessage()); - } - } - logger.log(Level.INFO, pathEventServiceMap.size() + " path event services initialized"); - } - - public boolean put(String queue, String key, Map map) throws IOException { - String keyFileName = key + ".json"; - Path queuePath = path.resolve(queue); - if (Files.exists(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName)) || - Files.exists(queuePath.resolve(PathQueueEvent.SUCCESS).resolve(keyFileName))) { - logger.log(Level.WARNING, "key " + key + " already exists"); - return false; - } - Path file = queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName); - try (Writer writer = Files.newBufferedWriter(file)) { - writer.write(Json.toString(map)); - } - pathEventServiceMap.get(queuePath).postEvent(key, file); - purge(queue); - return true; - } - - public boolean put(String queue, String key, String value) throws IOException { - String keyFileName = key + ".txt"; - Path queuePath = path.resolve(queue); - if (Files.exists(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName)) || - Files.exists(queuePath.resolve(PathQueueEvent.SUCCESS).resolve(keyFileName))) { - logger.log(Level.WARNING, "key " + key + " already exists"); - return false; - } - Path file = queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName); - try (Writer writer = Files.newBufferedWriter(file)) { - writer.write(value); - } - pathEventServiceMap.get(queuePath).postEvent(key, file); - purge(queue); - return true; - } - - public boolean exists(String queue, String key) { - String keyFileName = key + ".json"; - Path queuePath = path.resolve(queue); - return Files.exists(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName)) || - Files.exists(queuePath.resolve(PathQueueEvent.SUCCESS).resolve(keyFileName)); - } - - public long sizeOfIncoming(String queue) throws IOException { - Path queuePath = path.resolve(queue); - Path incomingPath = queuePath.resolve(PathQueueEvent.INCOMING); - return sizeOf(incomingPath); - } - - public long sizeOfSuccess(String queue) throws IOException { - Path queuePath = path.resolve(queue); - Path successPath = queuePath.resolve(PathQueueEvent.SUCCESS); - return sizeOf(successPath); - } - - public static long sizeOf(Path path) throws IOException { - Stream stream = Files.find(path, 1, (p, basicFileAttributes) -> Files.isRegularFile(p)); - return stream.count(); - } - - public void purge(String queue) throws IOException { - List purgeQueues = Arrays.asList(settings.getAsArray("purge")); - if (purgeQueues.contains(queue)) { - TimeValue lifetime = settings.getAsTime("lifetime", TimeValue.timeValueHours(72)); - Path queuePath = path.resolve(queue); - Files.walkFileTree(queuePath, new SimpleFileVisitor() { - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { - if (Instant.now().minusMillis(attrs.lastModifiedTime().toMillis()).toEpochMilli() > lifetime.millis()) { - logger.log(Level.WARNING, "lifetime " + lifetime + " exceeded, deleting " + file); - Files.delete(file); - } - return FileVisitResult.CONTINUE; - } - }); - } - } -} diff --git a/src/main/java/org/xbib/event/queue/path/simple/PathQueueEventService.java b/src/main/java/org/xbib/event/queue/path/simple/PathQueueEventService.java deleted file mode 100644 index f6a639d..0000000 --- a/src/main/java/org/xbib/event/queue/path/simple/PathQueueEventService.java +++ /dev/null @@ -1,102 +0,0 @@ -package org.xbib.event.queue.path.simple; - -import org.xbib.datastructures.json.tiny.Json; - -import java.io.IOException; -import java.io.Reader; -import java.lang.reflect.InvocationTargetException; -import java.nio.file.DirectoryStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.LinkedHashMap; -import java.util.Objects; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.xbib.event.bus.EventBus; - -import static org.xbib.event.queue.path.simple.PathQueueEvent.INCOMING; - -public class PathQueueEventService { - - private static final Logger logger = Logger.getLogger(PathQueueEventService.class.getName()); - - private final EventBus eventBus; - - private final Path path; - - private final int maxFileSize; - - private final Class pathEventClass; - - private int eventCount; - - public PathQueueEventService(EventBus eventBus, - Path path, - int maxFileSize, - Class pathEventClass) throws IOException { - this.eventBus = eventBus; - this.path = path; - this.maxFileSize = maxFileSize; - this.pathEventClass = pathEventClass; - drainIncoming(); - logger.log(Level.INFO, "at startup: watch service created for incoming files at " + path + - "max file size = " + maxFileSize); - } - - private void drainIncoming() throws IOException { - try (DirectoryStream directoryStream = Files.newDirectoryStream(path.resolve(INCOMING))) { - directoryStream.forEach(path -> { - if (Files.isRegularFile(path)) { - String key = path.getFileName().toString(); - logger.log(Level.INFO, "while draining found key=" + key + " path=" + path); - try { - postEvent(key, path); - } catch (IOException e) { - logger.log(Level.SEVERE, e.getMessage(), e); - } - } - }); - } - } - - public void postEvent(String key, Path file) throws IOException { - String base = getBase(key); - String suffix = getSuffix(key); - PathQueueEvent event; - try { - event = pathEventClass.getConstructor().newInstance(); - } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { - logger.log(Level.SEVERE, e.getMessage(), e); - return; - } - event.setKey(base); - event.setFile(file); - event.setSuffix(suffix); - event.setMap(new LinkedHashMap<>()); - event.setPath(path); // remember directory for fail() and success() - long fileSize = Files.size(file); - if (fileSize < maxFileSize && Objects.equals(suffix, "json")) { - // we read only small JSON files - try (Reader reader = Files.newBufferedReader(file)) { - event.setMap(Json.toMap(reader)); - } catch (Exception e) { - logger.log(Level.WARNING, e.getMessage(), e); - } - logger.log(Level.INFO, "posting new event =" + event.getClass() + " " + event); - eventBus.post(event); - eventCount++; - } else { - logger.log(Level.SEVERE, "skipping post event because incoming file is too large, max file size = " + maxFileSize); - } - } - - public static String getBase(String name) { - int pos = name.lastIndexOf('.'); - return pos >= 0 ? name.substring(0, pos) : name; - } - - public static String getSuffix(String name) { - int pos = name.lastIndexOf('.'); - return pos >= 0 ? name.substring(pos + 1) : null; - } -} diff --git a/src/main/java/org/xbib/event/queue/path/watch/PathQueueEvent.java b/src/main/java/org/xbib/event/queue/path/watch/PathQueueEvent.java deleted file mode 100644 index 1de16ba..0000000 --- a/src/main/java/org/xbib/event/queue/path/watch/PathQueueEvent.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.xbib.event.queue.path.watch; - -import org.xbib.event.queue.QueueEvent; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardCopyOption; -import java.nio.file.attribute.FileTime; -import java.time.Instant; - -public class PathQueueEvent extends QueueEvent { - - static final String INCOMING = "incoming"; - - static final String SUCCESS = "success"; - - static final String FAIL = "fail"; - - private Path path; - - private Path file; - - private String suffix; - - public void setFile(Path file) { - this.file = file; - } - - public Path getFile() { - return file; - } - - public void setPath(Path path) { - this.path = path; - } - - public Path getPath() { - return path; - } - - public void setSuffix(String suffix) { - this.suffix = suffix; - } - - public String getSuffix() { - return suffix; - } - - public void success() throws IOException { - Files.setLastModifiedTime(file, FileTime.from(Instant.now())); - Files.move(file, path.resolve(SUCCESS).resolve(file.getFileName()).toAbsolutePath(), - StandardCopyOption.REPLACE_EXISTING); - } - - public void fail() throws IOException { - Files.setLastModifiedTime(file, FileTime.from(Instant.now())); - Files.move(file, path.resolve(FAIL).resolve(file.getFileName()).toAbsolutePath(), - StandardCopyOption.REPLACE_EXISTING); - } -} diff --git a/src/main/java/org/xbib/event/queue/path/watch/PathQueueEventManager.java b/src/main/java/org/xbib/event/queue/path/watch/PathQueueEventManager.java deleted file mode 100644 index 7cad8a8..0000000 --- a/src/main/java/org/xbib/event/queue/path/watch/PathQueueEventManager.java +++ /dev/null @@ -1,168 +0,0 @@ -package org.xbib.event.queue.path.watch; - -import org.xbib.datastructures.api.TimeValue; -import org.xbib.datastructures.json.tiny.Json; -import org.xbib.event.bus.EventBus; -import org.xbib.settings.Settings; - -import java.io.Closeable; -import java.io.IOException; -import java.io.Writer; -import java.nio.file.FileVisitResult; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.SimpleFileVisitor; -import java.nio.file.attribute.BasicFileAttributes; -import java.time.Instant; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; -import java.util.logging.Level; -import java.util.logging.Logger; -import java.util.stream.Stream; - -public class PathQueueEventManager implements Closeable { - - private static final Logger logger = Logger.getLogger(PathQueueEventManager.class.getName()); - - private final Settings settings; - - private final Path path; - - private final List> futures; - - private final Map pathEventServiceMap; - - @SuppressWarnings("unchecked") - public PathQueueEventManager(Settings settings, - EventBus eventBus, - ExecutorService executorService, - ClassLoader classLoader) { - this.settings = settings; - this.futures = new ArrayList<>(); - this.pathEventServiceMap = new LinkedHashMap<>(); - this.path = Paths.get(settings.get("path", "/var/tmp/default/queues")); - for (Map.Entry entry : settings.getGroups("queues").entrySet()) { - String name = entry.getKey(); - Settings definition = entry.getValue(); - String eventClassName = definition.get("class"); - if (eventClassName == null) { - throw new IllegalArgumentException("no path event class name given for path event manager at " + path); - } - try { - Class eventClass = (Class) classLoader.loadClass(eventClassName); - Path p = path.resolve(name); - if (!Files.exists(p)) { - logger.log(Level.INFO, "creating queue " + name + " at " + p); - Files.createDirectories(p); - } - for (String string : List.of(PathQueueEvent.INCOMING, PathQueueEvent.SUCCESS, PathQueueEvent.FAIL)) { - Path dir = p.resolve(string); - if (!Files.exists(dir)) { - logger.log(Level.INFO, "creating queue " + name + " dir = " + dir); - Files.createDirectories(dir); - } - } - if (!pathEventServiceMap.containsKey(p)) { - int maxFileSize = settings.getAsInt("maxfilesize", 10 * 1024 * 1024); // max. 10 MB - logger.log(Level.INFO, "creating path event service on " + p + " with class " + eventClassName + " max file size = " + maxFileSize); - PathQueueEventService pathEventService = new PathQueueEventService(eventBus, p, maxFileSize, eventClass); - pathEventServiceMap.put(p, pathEventService); - futures.add(executorService.submit(pathEventService)); - } - } catch (Exception e) { - logger.log(Level.WARNING, "unable to create path event service " + eventClassName + " reason " + e.getMessage()); - } - } - logger.log(Level.INFO, pathEventServiceMap.size() + " path event services initialized"); - } - - public boolean put(String queue, String key, Map map) throws IOException { - String keyFileName = key + ".json"; - Path queuePath = path.resolve(queue); - if (Files.exists(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName)) || - Files.exists(queuePath.resolve(PathQueueEvent.SUCCESS).resolve(keyFileName))) { - logger.log(Level.WARNING, "key " + key + " already exists"); - return false; - } - try (Writer writer = Files.newBufferedWriter(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName))) { - writer.write(Json.toString(map)); - } - purge(queue); - return true; - } - - public boolean put(String queue, String key, String value) throws IOException { - String keyFileName = key + ".txt"; - Path queuePath = path.resolve(queue); - if (Files.exists(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName)) || - Files.exists(queuePath.resolve(PathQueueEvent.SUCCESS).resolve(keyFileName))) { - logger.log(Level.WARNING, "key " + key + " already exists"); - return false; - } - try (Writer writer = Files.newBufferedWriter(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName))) { - writer.write(value); - } - purge(queue); - return true; - } - - public boolean exists(String queue, String key) { - String keyFileName = key + ".json"; - Path queuePath = path.resolve(queue); - return Files.exists(queuePath.resolve(PathQueueEvent.INCOMING).resolve(keyFileName)) || - Files.exists(queuePath.resolve(PathQueueEvent.SUCCESS).resolve(keyFileName)); - } - - public long sizeOfIncoming(String queue) throws IOException { - Path queuePath = path.resolve(queue); - Path incomingPath = queuePath.resolve(PathQueueEvent.INCOMING); - return sizeOf(incomingPath); - } - - public long sizeOfSuccess(String queue) throws IOException { - Path queuePath = path.resolve(queue); - Path successPath = queuePath.resolve(PathQueueEvent.SUCCESS); - return sizeOf(successPath); - } - - public static long sizeOf(Path path) throws IOException { - Stream stream = Files.find(path, 1, (p, basicFileAttributes) -> Files.isRegularFile(p)); - return stream.count(); - } - - public void purge(String queue) throws IOException { - List purgeQueues = Arrays.asList(settings.getAsArray("purge")); - if (purgeQueues.contains(queue)) { - TimeValue lifetime = settings.getAsTime("lifetime", TimeValue.timeValueHours(72)); - Path queuePath = path.resolve(queue); - Files.walkFileTree(queuePath, new SimpleFileVisitor() { - @Override - public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { - if (Instant.now().minusMillis(attrs.lastModifiedTime().toMillis()).toEpochMilli() > lifetime.millis()) { - logger.log(Level.WARNING, "lifetime " + lifetime + " exceeded, deleting " + file); - Files.delete(file); - } - return FileVisitResult.CONTINUE; - } - }); - } - } - - @Override - public void close() throws IOException { - logger.log(Level.INFO, "closing all path event services"); - for (PathQueueEventService service : pathEventServiceMap.values()) { - logger.log(Level.INFO, "closing path event service " + service); - service.close(); - } - for (Future future : futures) { - future.cancel(true); - } - } -} diff --git a/src/main/java/org/xbib/event/queue/path/watch/PathQueueEventService.java b/src/main/java/org/xbib/event/queue/path/watch/PathQueueEventService.java deleted file mode 100644 index 157d3ba..0000000 --- a/src/main/java/org/xbib/event/queue/path/watch/PathQueueEventService.java +++ /dev/null @@ -1,155 +0,0 @@ -package org.xbib.event.queue.path.watch; - -import org.xbib.datastructures.json.tiny.Json; - -import java.io.Closeable; -import java.io.IOException; -import java.io.Reader; -import java.lang.reflect.InvocationTargetException; -import java.nio.file.ClosedWatchServiceException; -import java.nio.file.DirectoryStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.StandardWatchEventKinds; -import java.nio.file.WatchEvent; -import java.nio.file.WatchKey; -import java.nio.file.WatchService; -import java.util.LinkedHashMap; -import java.util.Objects; -import java.util.concurrent.Callable; -import java.util.logging.Level; -import java.util.logging.Logger; -import org.xbib.event.bus.EventBus; - -import static org.xbib.event.queue.path.watch.PathQueueEvent.INCOMING; - -public class PathQueueEventService implements Callable, Closeable { - - private static final Logger logger = Logger.getLogger(PathQueueEventService.class.getName()); - - private final EventBus eventBus; - - private final Path path; - - private final int maxFileSize; - - private final Class pathEventClass; - - private final WatchService watchService; - - private int eventCount; - - private volatile boolean keepWatching; - - public PathQueueEventService(EventBus eventBus, - Path path, - int maxFileSize, - Class pathEventClass) throws IOException { - this.eventBus = eventBus; - this.path = path; - this.maxFileSize = maxFileSize; - this.pathEventClass = pathEventClass; - drainIncoming(); - this.watchService = path.getFileSystem().newWatchService(); - WatchEvent.Kind[] kinds = new WatchEvent.Kind[] { StandardWatchEventKinds.ENTRY_CREATE }; - WatchKey watchKey = path.resolve(INCOMING).register(watchService, kinds); - keepWatching = true; - logger.log(Level.INFO, "at startup: watch service created for incoming files at " + path + - "max file size = " + maxFileSize); - } - - @Override - public Integer call() { - try { - logger.log(Level.INFO, "watch service running on " + path.resolve(INCOMING)); - while (keepWatching && watchService != null) { - WatchKey watchKey = watchService.take(); - logger.log(Level.FINE, "received a watch key " + watchKey); - for (WatchEvent watchEvent : watchKey.pollEvents()) { - WatchEvent.Kind kind = watchEvent.kind(); - if (kind == StandardWatchEventKinds.OVERFLOW) { - continue; - } - // we sleep here a bit, to give time to the OS to complete file writing - Thread.sleep(1000L); - @SuppressWarnings("unchecked") - WatchEvent pathWatchEvent = (WatchEvent) watchEvent; - String watchEventContext = pathWatchEvent.context().toString(); - Path p = path.resolve(INCOMING).resolve(watchEventContext); - logger.log(Level.FINE, "watch event" + pathWatchEvent + " key=" + watchEventContext + " path=" + p); - postEvent(watchEventContext, p); - } - watchKey.reset(); - } - } catch (ClosedWatchServiceException e) { - logger.log(Level.FINE, "closed watch key"); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - logger.log(Level.FINE, "interrupted: " + e.getMessage()); - } catch (Exception e) { - logger.log(Level.SEVERE, e.getMessage(), e); - } - return eventCount; - } - - @Override - public void close() throws IOException { - keepWatching = false; - if (watchService != null) { - logger.log(Level.FINE, "closing watch service " + watchService); - watchService.close(); - } - } - - private void drainIncoming() throws IOException { - try (DirectoryStream directoryStream = Files.newDirectoryStream(path.resolve(INCOMING))) { - directoryStream.forEach(path -> { - if (Files.isRegularFile(path)) { - String key = path.getFileName().toString(); - logger.log(Level.INFO, "while draining found key=" + key + " path=" + path); - try { - postEvent(key, path); - } catch (IOException | NoSuchMethodException | InvocationTargetException | InstantiationException | IllegalAccessException e) { - logger.log(Level.SEVERE, e.getMessage(), e); - } - } - }); - } - } - - private void postEvent(String key, Path file) - throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException, IOException { - String base = getBase(key); - String suffix = getSuffix(key); - PathQueueEvent event = pathEventClass.getConstructor().newInstance(); - event.setKey(base); - event.setFile(file); - event.setSuffix(suffix); - event.setMap(new LinkedHashMap<>()); - event.setPath(path); // remember directory for fail() and success() - long fileSize = Files.size(file); - if (fileSize < maxFileSize && Objects.equals(suffix, "json")) { - // we read only small JSON files - try (Reader reader = Files.newBufferedReader(file)) { - event.setMap(Json.toMap(reader)); - } catch (Exception e) { - logger.log(Level.WARNING, e.getMessage(), e); - } - logger.log(Level.INFO, "posting new event =" + event.getClass() + " " + event); - eventBus.post(event); - eventCount++; - } else { - logger.log(Level.SEVERE, "skipping post event because incoming file is too large, max file size = " + maxFileSize); - } - } - - public static String getBase(String name) { - int pos = name.lastIndexOf('.'); - return pos >= 0 ? name.substring(0, pos) : name; - } - - public static String getSuffix(String name) { - int pos = name.lastIndexOf('.'); - return pos >= 0 ? name.substring(pos + 1) : null; - } -}