├── .github
└── workflows
│ ├── codeql.yml
│ ├── maven.yml
│ └── settings.xml
├── .gitignore
├── .travis.settings.xml
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── README.md
├── checkstyle_checks.xml
├── findbugs_exclude.xml
├── licenseheader.txt
├── pom.xml
├── sonar-project.properties
├── spf4j-aether
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── maven
│ │ ├── ClassifierDependencyFilter.java
│ │ └── MavenRepositoryUtils.java
│ └── test
│ └── java
│ └── org
│ └── spf4j
│ └── maven
│ └── MavenRepositoryUtilsTest.java
├── spf4j-asm
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── base
│ │ └── asm
│ │ ├── Invocation.java
│ │ ├── MethodInvocationClassVisitor.java
│ │ ├── Scanner.java
│ │ ├── TypeUtils.java
│ │ └── UnknownValue.java
│ └── test
│ └── java
│ └── org
│ └── spf4j
│ └── base
│ └── asm
│ ├── Scanner2Test.java
│ ├── Scanner3Test.java
│ ├── Scanner4Test.java
│ └── ScannerTest.java
├── spf4j-aspects
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ ├── annotations
│ │ ├── PerformanceMonitor.java
│ │ ├── RecorderSourceInstance.java
│ │ └── Retry.java
│ │ ├── aspects
│ │ └── RetryAspect.java
│ │ └── perf
│ │ └── aspects
│ │ ├── AllocationMonitorAspect.java
│ │ ├── FileMonitorAspect.java
│ │ ├── NetworkMonitorAspect.java
│ │ ├── PerformanceMonitorAspect.java
│ │ ├── SamplingAllocationMonitorAspect.java
│ │ └── ThreadLocalCounter.java
│ ├── site
│ └── site.xml
│ └── test
│ ├── java
│ └── org
│ │ └── spf4j
│ │ └── perf
│ │ ├── aspects
│ │ ├── AllocationMonitorAspectTest.java
│ │ ├── FileMonitorAspectTest.java
│ │ ├── NetworkMonitorAspectTest.java
│ │ ├── PerformanceMonitorAspectTest.java
│ │ └── SamplingAllocationMonitorAspectTest.java
│ │ └── memory
│ │ └── TestClass.java
│ └── resources
│ └── META-INF
│ └── aop.xml
├── spf4j-avro-components
├── maven-avro-schema-plugin
│ ├── pom.xml
│ └── src
│ │ ├── it
│ │ ├── mrm
│ │ │ └── settings.xml
│ │ └── projects
│ │ │ ├── test-1
│ │ │ ├── invoker.properties
│ │ │ ├── pom.xml
│ │ │ ├── test-common
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── avro
│ │ │ │ │ ├── common-test.avpr
│ │ │ │ │ └── common.avdl
│ │ │ ├── test-schema-2
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── avro
│ │ │ │ │ ├── common_local.avdl
│ │ │ │ │ └── core.avdl
│ │ │ ├── test-schema-3
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── avro
│ │ │ │ │ ├── common_local.avdl
│ │ │ │ │ └── core.avdl
│ │ │ └── test-schema
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── avro
│ │ │ │ ├── common_local.avdl
│ │ │ │ └── core.avdl
│ │ │ ├── test-2
│ │ │ ├── invoker.properties
│ │ │ ├── pom.xml
│ │ │ ├── test-common
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── avro
│ │ │ │ │ └── common.avdl
│ │ │ ├── test-schema-2
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── avro
│ │ │ │ │ ├── common_local.avdl
│ │ │ │ │ └── core.avdl
│ │ │ ├── test-schema-3
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ │ └── main
│ │ │ │ │ └── avro
│ │ │ │ │ ├── common_local.avdl
│ │ │ │ │ └── core.avdl
│ │ │ └── test-schema
│ │ │ │ ├── pom.xml
│ │ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── avro
│ │ │ │ ├── common_local.avdl
│ │ │ │ └── core.avdl
│ │ │ ├── test-3
│ │ │ ├── invoker.properties
│ │ │ └── pom.xml
│ │ │ ├── test-4
│ │ │ ├── invoker.properties
│ │ │ ├── pom.xml
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ └── avro
│ │ │ │ └── common.avdl
│ │ │ └── test-5
│ │ │ ├── invoker.properties
│ │ │ ├── pom.xml
│ │ │ └── src
│ │ │ └── main
│ │ │ └── avro
│ │ │ ├── A.avsc
│ │ │ └── B.avsc
│ │ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── spf4j
│ │ │ │ └── maven
│ │ │ │ └── plugin
│ │ │ │ └── avro
│ │ │ │ └── avscp
│ │ │ │ ├── SchemaCompileMojo.java
│ │ │ │ ├── SchemaDependenciesMojo.java
│ │ │ │ ├── SchemaMojoBase.java
│ │ │ │ ├── SchemaPackageMojo.java
│ │ │ │ ├── SchemaValidatorMojo.java
│ │ │ │ ├── SourceLocation.java
│ │ │ │ ├── ValidatorMojo.java
│ │ │ │ └── validation
│ │ │ │ ├── Validator.java
│ │ │ │ ├── Validators.java
│ │ │ │ └── impl
│ │ │ │ ├── SchemaCompatibilityValidator.java
│ │ │ │ ├── SchemaDocValidator.java
│ │ │ │ └── SchemaNamesValidator.java
│ │ └── resources
│ │ │ └── META-INF
│ │ │ └── plexus
│ │ │ └── components.xml
│ │ ├── site
│ │ ├── apt
│ │ │ ├── index.apt.vm
│ │ │ └── usage.apt.vm
│ │ └── site.xml
│ │ └── test
│ │ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── maven
│ │ └── plugin
│ │ └── avro
│ │ └── avscp
│ │ ├── SourceLocationTest.java
│ │ └── validation
│ │ └── impl
│ │ └── SchemaCompatibilityValidatorTest.java
├── pom.xml
├── spf4j-avro-adapter-fork
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── avro
│ │ └── zfork
│ │ └── ZForkAvroAdapter.java
├── spf4j-avro-adapter-official
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ ├── apache
│ │ └── avro
│ │ │ └── io
│ │ │ └── EncoderAdapter.java
│ │ └── spf4j
│ │ └── avro
│ │ └── official
│ │ └── OfficialAvroAdapter.java
├── spf4j-avro-adapter
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── avro
│ │ ├── Adapter.java
│ │ ├── AvroCompatUtils.java
│ │ ├── SchemaResolver.java
│ │ └── Yaml.java
├── spf4j-avro-lib-ext
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ └── java
│ │ └── org
│ │ └── apache
│ │ └── avro
│ │ ├── ExtendedAvroNamesRefResolver.java
│ │ ├── ExtendedNames.java
│ │ ├── ExtendedParser.java
│ │ ├── SchemaAdapter.java
│ │ ├── SchemaRefWriter.java
│ │ ├── SchemaResolver.java
│ │ ├── SchemaResolverRegistration.java
│ │ ├── SchemaResolvers.java
│ │ ├── UnresolvedExtendedParser.java
│ │ └── avsc
│ │ ├── ResolvingVisitor.java
│ │ ├── SchemaResolver.java
│ │ ├── SchemaVisitor.java
│ │ ├── SchemaVisitorAction.java
│ │ └── Schemas.java
└── spf4j-avro
│ ├── pom.xml
│ └── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ ├── apache
│ │ │ ├── avro
│ │ │ │ ├── ArrayIterator.java
│ │ │ │ ├── AvroArrayWriter.java
│ │ │ │ ├── ImmutableField.java
│ │ │ │ ├── ImmutableSchema.java
│ │ │ │ ├── MapIterator.java
│ │ │ │ └── reflect
│ │ │ │ │ └── ExtendedReflectData.java
│ │ │ └── calcite
│ │ │ │ └── interpreter
│ │ │ │ └── Spf4jDataContext.java
│ │ │ └── spf4j
│ │ │ └── avro
│ │ │ ├── AvroDataSet.java
│ │ │ ├── DecodedSchema.java
│ │ │ ├── GenericRecordBuilder.java
│ │ │ ├── SchemaRef.java
│ │ │ ├── SqlPredicate.java
│ │ │ ├── calcite
│ │ │ ├── AbstractAvroTable.java
│ │ │ ├── AvroDataSetAsProjectableFilterableTable.java
│ │ │ ├── AvroEnumerable.java
│ │ │ ├── AvroFilterableTable.java
│ │ │ ├── AvroIteratorAsProjectableFilterableTable.java
│ │ │ ├── AvroSupplier.java
│ │ │ ├── EmbededDataContext.java
│ │ │ ├── FilterUtils.java
│ │ │ ├── FilteredProjectedSupplier.java
│ │ │ ├── FilteringProjectingAvroEnumerable.java
│ │ │ ├── IndexedRecords.java
│ │ │ ├── InterpreterUtils.java
│ │ │ ├── PlannerUtils.java
│ │ │ ├── SqlConverters.java
│ │ │ ├── SqlRowPredicate.java
│ │ │ ├── TableAccessDeniedException.java
│ │ │ └── Types.java
│ │ │ ├── csv
│ │ │ ├── CsvDecoder.java
│ │ │ └── CsvEncoder.java
│ │ │ └── schema
│ │ │ ├── CloningVisitor.java
│ │ │ ├── ImmutableCloningVisitor.java
│ │ │ ├── SchemaDiff.java
│ │ │ ├── SchemaUtils.java
│ │ │ ├── SchemaVisitor.java
│ │ │ ├── SchemaVisitorAction.java
│ │ │ ├── Schemas.java
│ │ │ └── SchemasWithClasses.java
│ └── resources
│ │ └── org
│ │ └── spf4j
│ │ └── avro
│ │ ├── enum.vm
│ │ ├── fixed.vm
│ │ ├── protocol.vm
│ │ └── record.vm
│ └── test
│ ├── java
│ └── org
│ │ └── spf4j
│ │ └── avro
│ │ ├── GenericRecordBuilderTest.java
│ │ ├── calcite
│ │ ├── AvroQueryTest.java
│ │ └── FilterUtilsTest.java
│ │ ├── csv
│ │ └── CsvEncoderTest.java
│ │ └── schema
│ │ ├── SchemaUtilsTest.java
│ │ └── SchemasTest.java
│ └── resources
│ └── SchemaBuilder.avsc
├── spf4j-config-discovery-maven-plugin
├── pom.xml
└── src
│ ├── it
│ ├── settings.xml
│ └── simple-it
│ │ ├── pom.xml
│ │ ├── src
│ │ └── main
│ │ │ └── java
│ │ │ └── org
│ │ │ └── spf4j
│ │ │ └── MyTestClass.java
│ │ └── verify.groovy
│ └── main
│ └── java
│ └── org
│ └── spf4j
│ └── config_discovery
│ └── maven
│ └── plugin
│ ├── ConfigScannerMojo.java
│ ├── FieldInfo.java
│ └── JsonUtils.java
├── spf4j-core-gwt
├── pom.xml
└── src
│ └── main
│ └── resources
│ └── org
│ └── spf4j
│ ├── ForceSpf4jCompilation.gwt.xml
│ ├── ForceSpf4jCompilationEntryPoint.java
│ └── base
│ └── Base.gwt.xml
├── spf4j-core
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ ├── avro
│ │ └── Configs.java
│ │ ├── base
│ │ ├── AbstractRunnable.java
│ │ ├── AlmostSafe.java
│ │ ├── AppendableUtils.java
│ │ ├── ArrayBuilder.java
│ │ ├── ArrayWriter.java
│ │ ├── Arrays.java
│ │ ├── Base64.java
│ │ ├── BasicExecutionContext.java
│ │ ├── Callables.java
│ │ ├── CallablesNano.java
│ │ ├── CharArrayConsumer.java
│ │ ├── CharSequences.java
│ │ ├── CheckedRunnable.java
│ │ ├── CloneFailedException.java
│ │ ├── CloseableIterable.java
│ │ ├── CloseableIterator.java
│ │ ├── Closeables.java
│ │ ├── ComparablePair.java
│ │ ├── Comparables.java
│ │ ├── ContextValue.java
│ │ ├── CoreTextMediaType.java
│ │ ├── DateTimeFormats.java
│ │ ├── ESupplier.java
│ │ ├── Either.java
│ │ ├── Env.java
│ │ ├── EqualsPredicate.java
│ │ ├── ErrLog.java
│ │ ├── EscapeJsonStringAppendableWrapper.java
│ │ ├── ExecutionContext.java
│ │ ├── ExecutionContextFactory.java
│ │ ├── ExecutionContexts.java
│ │ ├── ExitException.java
│ │ ├── Handler.java
│ │ ├── HandlerNano.java
│ │ ├── Holder.java
│ │ ├── InstrumentationHelper.java
│ │ ├── IntAppender.java
│ │ ├── IntMath.java
│ │ ├── IntSequence.java
│ │ ├── Invocation.java
│ │ ├── Iterables.java
│ │ ├── JNA.java
│ │ ├── JavaUtils.java
│ │ ├── Json.java
│ │ ├── JsonReader.java
│ │ ├── JsonWriteable.java
│ │ ├── LangIdEncDec.java
│ │ ├── MapWriter.java
│ │ ├── MemorizedCallable.java
│ │ ├── Methods.java
│ │ ├── MutableHolder.java
│ │ ├── MutableInteger.java
│ │ ├── NameValue.java
│ │ ├── NoExitSecurityManager.java
│ │ ├── NullAbleOptional.java
│ │ ├── Objects.java
│ │ ├── Operations.java
│ │ ├── PackageInfo.java
│ │ ├── Pair.java
│ │ ├── ParameterizedException.java
│ │ ├── ParameterizedSupplier.java
│ │ ├── ReferenceType.java
│ │ ├── Reflections.java
│ │ ├── RemoteException.java
│ │ ├── ResultMatchers.java
│ │ ├── Runnables.java
│ │ ├── Runtime.java
│ │ ├── SerializablePair.java
│ │ ├── ShutdownHooks.java
│ │ ├── ShutdownThread.java
│ │ ├── Slf4jMessageFormatter.java
│ │ ├── StackSamples.java
│ │ ├── Strings.java
│ │ ├── SuppressForbiden.java
│ │ ├── SuppressedThrowable.java
│ │ ├── SysExits.java
│ │ ├── TLScratch.java
│ │ ├── ThreadLocalContextAttacher.java
│ │ ├── Threads.java
│ │ ├── ThrowableMatcher.java
│ │ ├── Throwables.java
│ │ ├── TimeSource.java
│ │ ├── TimeoutDeadline.java
│ │ ├── TimeoutRunnable.java
│ │ ├── Timing.java
│ │ ├── UncheckedExecutionException.java
│ │ ├── UncheckedTimeoutException.java
│ │ ├── UnsafeString.java
│ │ ├── UnsafeThrowable.java
│ │ ├── Version.java
│ │ ├── Wrapper.java
│ │ ├── Writeable.java
│ │ ├── XCollectors.java
│ │ ├── XRuntime.java
│ │ └── avro
│ │ │ ├── AThrowables.java
│ │ │ ├── AvroCloseableIterable.java
│ │ │ ├── AvroContainer.java
│ │ │ ├── Converters.java
│ │ │ ├── MediaTypes.java
│ │ │ ├── RemoteException.java
│ │ │ └── package-info.java
│ │ ├── concurrent
│ │ ├── AtomicReferenceExt.java
│ │ ├── AtomicSequence.java
│ │ ├── Atomics.java
│ │ ├── CompoundPermitSupplier.java
│ │ ├── CompoundSemaphore.java
│ │ ├── ConcurrentStack.java
│ │ ├── ContextPropagatingCompletableFuture.java
│ │ ├── ContextPropagatingExecutorService.java
│ │ ├── ContextPropagatingScheduledExecutorService.java
│ │ ├── ContextPropagator.java
│ │ ├── CustomThreadFactory.java
│ │ ├── DefaultContextAwareExecutor.java
│ │ ├── DefaultContextAwareScheduledExecutor.java
│ │ ├── DefaultExecutor.java
│ │ ├── DefaultScheduler.java
│ │ ├── FileBasedLock.java
│ │ ├── FutureBean.java
│ │ ├── Futures.java
│ │ ├── InterruptibleCompletableFuture.java
│ │ ├── LifoThreadPool.java
│ │ ├── LifoThreadPoolBuilder.java
│ │ ├── LifoThreadPoolExecutorSQP.java
│ │ ├── LocalSemaphore.java
│ │ ├── LockRuntimeException.java
│ │ ├── MutableLifoThreadPool.java
│ │ ├── NonPoolingExecutorService.java
│ │ ├── PermitSupplier.java
│ │ ├── RejectedExecutionHandler.java
│ │ ├── RestartableService.java
│ │ ├── RestartableServiceImpl.java
│ │ ├── ScalableSequence.java
│ │ ├── Semaphore.java
│ │ ├── Sequence.java
│ │ ├── ThreadLocalBufferedConsumer.java
│ │ ├── UIDGenerator.java
│ │ ├── UnboundedLoadingCache.java
│ │ ├── UnboundedLoadingCache2.java
│ │ ├── UnboundedRacyLoadingCache.java
│ │ ├── UpdateResult.java
│ │ └── jdbc
│ │ │ ├── HeartBeatError.java
│ │ │ ├── HeartBeatTableDesc.java
│ │ │ ├── JdbcHeartBeat.java
│ │ │ ├── JdbcLock.java
│ │ │ ├── JdbcSemaphore.java
│ │ │ ├── OwnerPermits.java
│ │ │ ├── ProcessLimitedJdbcSemaphore.java
│ │ │ └── SemaphoreTablesDesc.java
│ │ ├── ds
│ │ ├── CopyOnWriteMap.java
│ │ ├── Graphs.java
│ │ ├── IdentityHashSet.java
│ │ ├── LinkedHashMapEx.java
│ │ ├── LinkedHashSetEx.java
│ │ ├── LinkedMap.java
│ │ ├── LinkedSet.java
│ │ ├── RTree.java
│ │ ├── SimpleStack.java
│ │ ├── SimpleStackNullSupport.java
│ │ └── UpdateablePriorityQueue.java
│ │ ├── failsafe
│ │ ├── AsyncRetryExecutor.java
│ │ ├── AsyncRetryExecutorImpl.java
│ │ ├── CountLimitedPartialRetryPredicate.java
│ │ ├── DefaultAsyncExecutor.java
│ │ ├── DefaultRetryPredicate.java
│ │ ├── FibonacciRetryDelaySupplier.java
│ │ ├── GuavaRateLimiter.java
│ │ ├── Hedge.java
│ │ ├── HedgePolicy.java
│ │ ├── InvalidRetryPolicyException.java
│ │ ├── JitteredDelaySupplier.java
│ │ ├── LimitingExecutor.java
│ │ ├── NotEnoughTimeToRetry.java
│ │ ├── PartialExceptionRetryPredicate.java
│ │ ├── PartialExceptionRetryPredicateSupplier.java
│ │ ├── PartialResultRetryPredicate.java
│ │ ├── PartialResultRetryPredicateSupplier.java
│ │ ├── PartialTypedExceptionRetryPredicate.java
│ │ ├── RateLimiter.java
│ │ ├── RetriedResultException.java
│ │ ├── RetryDecision.java
│ │ ├── RetryDecisionFactory.java
│ │ ├── RetryDelaySupplier.java
│ │ ├── RetryPolicies.java
│ │ ├── RetryPolicy.java
│ │ ├── RetryPredicate.java
│ │ ├── SyncRetryExecutor.java
│ │ ├── TimeLimitedPartialRetryPredicate.java
│ │ ├── TimedSupplier.java
│ │ ├── TimeoutRelativeHedge.java
│ │ ├── TimeoutRetryPredicate.java
│ │ ├── TypeBasedRetryDelaySupplier.java
│ │ ├── concurrent
│ │ │ ├── ConditionalConsumer.java
│ │ │ ├── DefaultFailSafeExecutor.java
│ │ │ ├── DelayedTask.java
│ │ │ ├── FailSafeExecutor.java
│ │ │ ├── FailSafeExecutorImpl.java
│ │ │ ├── FutureTask.java
│ │ │ └── RetryFutureTask.java
│ │ └── package-info.java
│ │ ├── io
│ │ ├── AppendableLimiterWithOverflow.java
│ │ ├── AppendableOutputStream.java
│ │ ├── AppendableWriter.java
│ │ ├── BufferedInputStream.java
│ │ ├── BufferedOutputStream.java
│ │ ├── ByteArrayBuilder.java
│ │ ├── CharArrayBuilder.java
│ │ ├── ClosedOutputStream.java
│ │ ├── ConfigurableAppenderSupplier.java
│ │ ├── CountingInputStream.java
│ │ ├── Csv.java
│ │ ├── DebugInputStream.java
│ │ ├── DeletingVisitor.java
│ │ ├── EmptyInputStream.java
│ │ ├── EmptyReader.java
│ │ ├── FSWatchEventSensitivity.java
│ │ ├── IOConsumer.java
│ │ ├── IOTimeoutException.java
│ │ ├── LazyOutputStreamWrapper.java
│ │ ├── MemorizingBufferedInputStream.java
│ │ ├── NoCloseOutputStream.java
│ │ ├── NullOutputStream.java
│ │ ├── NullWriter.java
│ │ ├── ObjectAppender.java
│ │ ├── ObjectAppenderSupplier.java
│ │ ├── PathsIOException.java
│ │ ├── PipedOutputStream.java
│ │ ├── PushbackInputStreamEx.java
│ │ ├── PushbackReader.java
│ │ ├── ReaderInputStream.java
│ │ ├── SetFilesReadOnlyVisitor.java
│ │ ├── Streams.java
│ │ ├── WriterOutputStream.java
│ │ ├── appenders
│ │ │ ├── ArrayBooleanAppender.java
│ │ │ ├── ArrayBytesAppender.java
│ │ │ ├── ArrayCharsAppender.java
│ │ │ ├── ArrayDoubleAppender.java
│ │ │ ├── ArrayFloatAppender.java
│ │ │ ├── ArrayIntAppender.java
│ │ │ ├── ArrayLongAppender.java
│ │ │ ├── ArrayObjectAppender.java
│ │ │ ├── ArrayShortAppender.java
│ │ │ ├── CalendarAppender.java
│ │ │ ├── CharsequenceAppender.java
│ │ │ ├── CollectionAppender.java
│ │ │ ├── DateAppender.java
│ │ │ ├── GenericRecordAppender.java
│ │ │ ├── InstantAppender.java
│ │ │ ├── LocalDateAppender.java
│ │ │ ├── MapAppender.java
│ │ │ ├── NumberAppender.java
│ │ │ ├── PathAppender.java
│ │ │ ├── SampleNodeAppender.java
│ │ │ ├── SpecificRecordAppender.java
│ │ │ ├── SpecificRecordBaseAppender.java
│ │ │ ├── SqlDateAppender.java
│ │ │ ├── ThrowableAppender.java
│ │ │ ├── WriteableAppender.java
│ │ │ └── json
│ │ │ │ ├── ArrayBooleanJsonAppender.java
│ │ │ │ ├── ArrayBytesJsonAppender.java
│ │ │ │ ├── ArrayCharsJsonAppender.java
│ │ │ │ ├── ArrayDoubleJsonAppender.java
│ │ │ │ ├── ArrayFloatJsonAppender.java
│ │ │ │ ├── ArrayIntJsonAppender.java
│ │ │ │ ├── ArrayLongJsonAppender.java
│ │ │ │ ├── ArrayObjectJsonAppender.java
│ │ │ │ ├── CollectionJsonAppender.java
│ │ │ │ ├── GenericRecordJsonAppender.java
│ │ │ │ ├── JsonWriteableAppender.java
│ │ │ │ ├── MapJsonAppender.java
│ │ │ │ ├── NumberJsonAppender.java
│ │ │ │ ├── SampleNodeWriteableAppender.java
│ │ │ │ ├── SpecificRecordBaseJsonAppender.java
│ │ │ │ ├── SpecificRecordJsonAppender.java
│ │ │ │ └── ThrowableJsonAppender.java
│ │ ├── compress
│ │ │ └── Compress.java
│ │ ├── csv
│ │ │ ├── CharSeparatedValues.java
│ │ │ ├── CsvHandler.java
│ │ │ ├── CsvMapHandler.java
│ │ │ ├── CsvParseException.java
│ │ │ ├── CsvReader.java
│ │ │ ├── CsvReader2Iterator.java
│ │ │ ├── CsvRowHandler.java
│ │ │ ├── CsvRuntimeException.java
│ │ │ ├── CsvWriter.java
│ │ │ ├── ElementAppendable.java
│ │ │ ├── IterableCsvReader.java
│ │ │ ├── OneRowIterator.java
│ │ │ └── UncheckedCsvParseException.java
│ │ └── tcp
│ │ │ ├── AcceptorSelectorEventHandler.java
│ │ │ ├── ClientHandler.java
│ │ │ ├── DeadlineAction.java
│ │ │ ├── SelectorEventHandler.java
│ │ │ ├── TcpServer.java
│ │ │ ├── package-info.java
│ │ │ └── proxy
│ │ │ ├── ProxyBufferTransferHandler.java
│ │ │ ├── ProxyClientHandler.java
│ │ │ ├── Sniffer.java
│ │ │ ├── SnifferFactory.java
│ │ │ └── TransferBuffer.java
│ │ ├── jdbc
│ │ ├── DataSourceEx.java
│ │ ├── DataSourceExImpl.java
│ │ ├── DbType.java
│ │ ├── JdbcTemplate.java
│ │ └── SemaphoredConnectionInvocationHandler.java
│ │ ├── jmx
│ │ ├── BeanExportedValue.java
│ │ ├── Client.java
│ │ ├── DynamicMBeanBuilder.java
│ │ ├── ExportedOperation.java
│ │ ├── ExportedOperationImpl.java
│ │ ├── ExportedValue.java
│ │ ├── ExportedValuesMBean.java
│ │ ├── GenericExportedOperation.java
│ │ ├── GenericExportedValue.java
│ │ ├── GlobalMXBeanMapperSupplier.java
│ │ ├── JMXBeanMapping.java
│ │ ├── JMXBeanMappingSupplier.java
│ │ ├── JmxExport.java
│ │ ├── MapExportedValue.java
│ │ ├── Registry.java
│ │ └── mappers
│ │ │ ├── MXBeanMappings.java
│ │ │ ├── MapEntryOpenTypeMapping.java
│ │ │ ├── SpecificRecordOpenTypeMapping.java
│ │ │ ├── Spf4jJMXBeanMapping.java
│ │ │ └── Spf4jOpenTypeMapper.java
│ │ ├── log
│ │ ├── AvroLogRecordImpl.java
│ │ ├── ExecContextLogger.java
│ │ ├── Level.java
│ │ ├── LogAttribute.java
│ │ ├── LogPrinter.java
│ │ ├── LogUtils.java
│ │ ├── SLF4JBridgeHandler.java
│ │ ├── SLf4jXLogAdapter.java
│ │ ├── Slf4jLogRecord.java
│ │ ├── Slf4jLogRecordImpl.java
│ │ └── XLog.java
│ │ ├── net
│ │ ├── SntpClient.java
│ │ └── Timing.java
│ │ ├── os
│ │ ├── LoggingProcessHandler.java
│ │ ├── OperatingSystem.java
│ │ ├── ProcessHandler.java
│ │ ├── ProcessResponse.java
│ │ ├── ProcessUtil.java
│ │ ├── StdOutLineCountProcessHandler.java
│ │ └── StdOutToStringProcessHandler.java
│ │ ├── perf
│ │ ├── CloseableMeasurementRecorder.java
│ │ ├── CloseableMeasurementRecorderSource.java
│ │ ├── JmxSupport.java
│ │ ├── MeasurementAccumulator.java
│ │ ├── MeasurementRecorder.java
│ │ ├── MeasurementRecorderSource.java
│ │ ├── MeasurementStore.java
│ │ ├── MeasurementStoreQuery.java
│ │ ├── MeasurementsInfo.java
│ │ ├── MeasurementsSource.java
│ │ ├── MeasurmentStoreUtils.java
│ │ ├── MultiMeasurementRecorder.java
│ │ ├── PerformanceMonitor.java
│ │ ├── ProcessVitals.java
│ │ ├── TimeSeriesAggregatingIterator.java
│ │ ├── TimeSeriesRecord.java
│ │ ├── cpu
│ │ │ ├── CpuUsageSampler.java
│ │ │ └── ThreadUsageSampler.java
│ │ ├── impl
│ │ │ ├── DirectRecorderSource.java
│ │ │ ├── MeasurementsInfoImpl.java
│ │ │ ├── NopMeasurementRecorder.java
│ │ │ ├── NopMeasurementRecorderSource.java
│ │ │ ├── NopMeasurementStore.java
│ │ │ ├── ProcessMeasurementStore.java
│ │ │ ├── Quanta.java
│ │ │ ├── RecorderFactory.java
│ │ │ ├── ScalableMeasurementRecorder.java
│ │ │ ├── ScalableMeasurementRecorderSource.java
│ │ │ ├── acc
│ │ │ │ ├── AbstractMeasurementAccumulator.java
│ │ │ │ ├── AddAndCountAccumulator.java
│ │ │ │ ├── CountAccumulator.java
│ │ │ │ ├── DirectStoreAccumulator.java
│ │ │ │ ├── DirectStoreMultiAccumulator.java
│ │ │ │ ├── MinMaxAvgAccumulator.java
│ │ │ │ └── QuantizedAccumulator.java
│ │ │ └── ms
│ │ │ │ ├── Flusher.java
│ │ │ │ ├── Id2Info.java
│ │ │ │ ├── MultiStore.java
│ │ │ │ ├── StoreFactory.java
│ │ │ │ ├── StoreType.java
│ │ │ │ ├── graphite
│ │ │ │ ├── GraphiteTcpStore.java
│ │ │ │ └── GraphiteUdpStore.java
│ │ │ │ └── tsdb
│ │ │ │ ├── AvroFileInfo.java
│ │ │ │ ├── AvroMeasurementStore.java
│ │ │ │ ├── AvroMeasurementStoreReader.java
│ │ │ │ ├── TSDBMeasurementStore.java
│ │ │ │ ├── TSDBMeasurementStoreReader.java
│ │ │ │ └── TSDBTxtMeasurementStore.java
│ │ ├── io
│ │ │ ├── MeasuredInputStream.java
│ │ │ ├── MeasuredOutputStream.java
│ │ │ └── OpenFilesSampler.java
│ │ └── memory
│ │ │ ├── GCUsageSampler.java
│ │ │ └── MemoryUsageSampler.java
│ │ ├── pool
│ │ └── jdbc
│ │ │ ├── JdbcConnectionFactory.java
│ │ │ └── PooledDataSource.java
│ │ ├── recyclable
│ │ ├── BlockingDisposable.java
│ │ ├── Disposable.java
│ │ ├── Lease.java
│ │ ├── LeaseSupplier.java
│ │ ├── NonValidatingRecyclingSupplier.java
│ │ ├── ObjectBorower.java
│ │ ├── ObjectBorrowException.java
│ │ ├── ObjectCreationException.java
│ │ ├── ObjectDisposeException.java
│ │ ├── ObjectReturnException.java
│ │ ├── RecyclerFactory.java
│ │ ├── RecyclingSupplier.java
│ │ ├── Scanable.java
│ │ ├── SizedLeaseSupplier.java
│ │ ├── SizedRecyclingSupplier.java
│ │ ├── SmartRecyclingSupplier.java
│ │ ├── SupplierException.java
│ │ ├── Template.java
│ │ ├── UsageProvider.java
│ │ ├── impl
│ │ │ ├── ArraySuppliers.java
│ │ │ ├── CollectableThreadLocalRecyclingSupplier.java
│ │ │ ├── LeaseImpl.java
│ │ │ ├── LocalObjectPool.java
│ │ │ ├── ObjectHolder.java
│ │ │ ├── ObjectHolderFactory.java
│ │ │ ├── ObjectPoolWrapper.java
│ │ │ ├── Powerof2SizedGlobalRecyclingSupplier.java
│ │ │ ├── Powerof2ThreadLocalRecyclingSupplier.java
│ │ │ ├── RecyclingSupplierBuilder.java
│ │ │ ├── ScalableObjectPool.java
│ │ │ ├── SharingObjectPool.java
│ │ │ ├── SimpleSmartObjectPool.java
│ │ │ ├── SizedThreadLocalRecyclingSupplier.java
│ │ │ └── ThreadLocalRecyclingSupplier.java
│ │ └── package-info.java
│ │ ├── reflect
│ │ ├── ByTypeSupplier.java
│ │ ├── CachingTypeMapSupplierWrapper.java
│ │ ├── CachingTypeMapWrapper.java
│ │ ├── GraphTypeMap.java
│ │ └── TypeMap.java
│ │ ├── security
│ │ ├── AbacAuthorizer.java
│ │ ├── AbacSecurityContext.java
│ │ ├── AesEncryptorDecryptor.java
│ │ ├── EncryptedBytes.java
│ │ ├── EncryptedString.java
│ │ ├── EncryptorDecryptor.java
│ │ └── RbacSecurityContext.java
│ │ ├── ssdump2
│ │ ├── Converter.java
│ │ └── avro
│ │ │ └── package-info.java
│ │ ├── stackmonitor
│ │ ├── AvroProfilePersister.java
│ │ ├── AvroStackSampleSupplier.java
│ │ ├── FastStackCollector.java
│ │ ├── GCFakeStackUtil.java
│ │ ├── ISampler.java
│ │ ├── LegacyProfilePersister.java
│ │ ├── MethodMap.java
│ │ ├── Monitor.java
│ │ ├── MxStackCollector.java
│ │ ├── ProfileFileFormat.java
│ │ ├── ProfileMetaData.java
│ │ ├── ProfilePersister.java
│ │ ├── ProfiledExecutionContext.java
│ │ ├── ProfiledExecutionContextFactory.java
│ │ ├── ProfilingTLAttacher.java
│ │ ├── SampleNode.java
│ │ ├── Sampler.java
│ │ ├── SamplerSupplier.java
│ │ ├── SimpleStackCollector.java
│ │ ├── Spf4jProfilerException.java
│ │ ├── StackCollector.java
│ │ ├── StackCollectorImpl.java
│ │ ├── StackSampleSupplier.java
│ │ ├── StackTrace.java
│ │ ├── StackVisualizer.java
│ │ ├── THash.java
│ │ ├── THashMap.java
│ │ ├── TObjectHash.java
│ │ ├── ThreadSpecificTracingExecutionContextHandler.java
│ │ ├── ThreadStackSampler.java
│ │ └── TracingExecutionContexSampler.java
│ │ ├── text
│ │ ├── AttributedString.java
│ │ ├── FormatInfo.java
│ │ ├── MessageFormat.java
│ │ ├── Slf4jFormat.java
│ │ ├── Slf4jFormatImpl.java
│ │ └── package-info.java
│ │ ├── trace
│ │ └── avro
│ │ │ └── package-info.java
│ │ ├── tsdb2
│ │ ├── TSDBQuery.java
│ │ ├── TSDBReader.java
│ │ ├── TSDBWriter.java
│ │ ├── TableDefs.java
│ │ ├── TimeSeries.java
│ │ └── avro
│ │ │ └── package-info.java
│ │ └── unix
│ │ ├── CLibrary.java
│ │ ├── JVMArguments.java
│ │ ├── Lsof.java
│ │ ├── Ulimit.java
│ │ ├── UnixConstants.java
│ │ ├── UnixException.java
│ │ ├── UnixResources.java
│ │ ├── UnixRuntime.java
│ │ └── UnixRuntimeException.java
│ ├── site
│ └── site.xml
│ └── test
│ ├── java
│ └── org
│ │ └── spf4j
│ │ ├── avro
│ │ └── ConfigsTest.java
│ │ ├── base
│ │ ├── AppendableUtilsTest.java
│ │ ├── ArrayBuilderTest.java
│ │ ├── ArraysTest.java
│ │ ├── Base64Test.java
│ │ ├── CallablesTest.java
│ │ ├── CharSequencesTest.java
│ │ ├── ComparablesTest.java
│ │ ├── DefaultSchedulerTest.java
│ │ ├── ExecutionContextTest.java
│ │ ├── IntMathTest.java
│ │ ├── LangIdEncDecTest.java
│ │ ├── MemorizedCallableTest.java
│ │ ├── OperatingSystemTest.java
│ │ ├── OperationsTest.java
│ │ ├── PairTest.java
│ │ ├── RTreeTest.java
│ │ ├── ReflectionsTest.java
│ │ ├── RuntimeTest.java
│ │ ├── SerializablePairTest.java
│ │ ├── Slf4jMessageFormatterTest.java
│ │ ├── StringsTest.java
│ │ ├── TestException.java
│ │ ├── ThrowablesTest.java
│ │ ├── TimeSourceTest.java
│ │ ├── TimingTest.java
│ │ ├── UnixResourcesTest.java
│ │ ├── VersionTest.java
│ │ └── XCollectorsTest.java
│ │ ├── concurrent
│ │ ├── CompoundSemaphoreTest.java
│ │ ├── ContextPropagatingCompletableFutureTest.java
│ │ ├── FileBasedLockTest.java
│ │ ├── LifoThreadPoolExecutor2Test.java
│ │ ├── LifoThreadPoolExecutorCoreIdlingTest.java
│ │ ├── LifoThreadPoolExecutorInterruptingTest.java
│ │ ├── LifoThreadPoolExecutorSTest.java
│ │ ├── LifoThreadPoolExecutorTest.java
│ │ ├── MutableThreadPoolExecutor2Test.java
│ │ ├── SequenceTest.java
│ │ ├── ThreadPoolExecutorTest.java
│ │ ├── UIDGeneratorTest.java
│ │ └── jdbc
│ │ │ ├── BadSemaphoreHandler.java
│ │ │ ├── DecentSemaphoreHandler.java
│ │ │ └── JdbcSemaphoreTest.java
│ │ ├── ds
│ │ ├── LinkedHashMapExTest.java
│ │ ├── LinkedHashSetExTest.java
│ │ ├── SimpleStackNullSupportTest.java
│ │ ├── SimpleStackTest.java
│ │ └── UpdateablePriorityQueueTest.java
│ │ ├── failsafe
│ │ ├── JitteredDelaySupplierTest.java
│ │ ├── LimitingExecutorTest.java
│ │ ├── RateLimiterTest.java
│ │ ├── Request.java
│ │ ├── Response.java
│ │ ├── RetryPoliciesTest.java
│ │ ├── RetryPolicyTest.java
│ │ ├── Server.java
│ │ ├── ServerCall.java
│ │ ├── SyncRetryExecutorTest.java
│ │ └── concurrent
│ │ │ └── RetryExecutorTest.java
│ │ ├── io
│ │ ├── AppendableLimiterWithFileOverflowTest.java
│ │ ├── CharArrayBuilderTest.java
│ │ ├── ConfigurableAppenderSupplierTest.java
│ │ ├── CsvTest.java
│ │ ├── IOTimeoutExceptionTest.java
│ │ ├── MemorizingBufferedInputStreamTest.java
│ │ ├── ObjectAppenderTest.java
│ │ ├── PipedOutputStreamTest.java
│ │ ├── StreamsTest.java
│ │ ├── WriterOutputStreamTest.java
│ │ ├── appenders
│ │ │ └── SpecificRecordAppenderTest.java
│ │ ├── compress
│ │ │ └── CompressTest.java
│ │ ├── csv
│ │ │ └── CharSeparatedValuesTest.java
│ │ └── proxy
│ │ │ └── TcpServerTest.java
│ │ ├── jmx
│ │ ├── DynamicMBeanBuilderTest.java
│ │ ├── OpenTypeConverterTest.java
│ │ ├── PropertySource.java
│ │ ├── RecursiveTestBean.java
│ │ ├── RegistryTest.java
│ │ ├── Test.java
│ │ ├── TestBean.java
│ │ ├── TestEnum.java
│ │ └── TestMXBean.java
│ │ ├── log
│ │ ├── ExecContextLoggerTest.java
│ │ ├── LogAttributeTest.java
│ │ └── LogPrinterTest.java
│ │ ├── net
│ │ └── SntpClientTest.java
│ │ ├── os
│ │ └── OperatingSystemTest.java
│ │ ├── perf
│ │ ├── PerformanceMonitorTest.java
│ │ ├── RecorderFactoryTest.java
│ │ ├── cpu
│ │ │ └── CpuUsageSamplerTest.java
│ │ ├── impl
│ │ │ ├── DirectRecorderSourceTest.java
│ │ │ ├── GraphiteUdpStoreTest.java
│ │ │ ├── RecorderFactoryTest.java
│ │ │ ├── acc
│ │ │ │ └── QuantizedRecorderTest.java
│ │ │ └── ms
│ │ │ │ └── tsdb
│ │ │ │ ├── AvroMeasurementStoreTest.java
│ │ │ │ └── TSDBTxtMeasurementStoreTest.java
│ │ └── memory
│ │ │ ├── GCUsageSamplerTest.java
│ │ │ └── MemoryUsageSamplerTest.java
│ │ ├── pool
│ │ └── jdbc
│ │ │ └── PooledDataSourceTest.java
│ │ ├── recyclable
│ │ └── impl
│ │ │ ├── ExpensiveTestObject.java
│ │ │ ├── ExpensiveTestObjectFactory.java
│ │ │ ├── ObjectPoolBuilderTest.java
│ │ │ ├── SharingObjectPoolTest.java
│ │ │ ├── SimpleSmartObjectPoolTest.java
│ │ │ ├── SizedGlobalRecyclingSupplierTest.java
│ │ │ ├── SizedThreadLocalRecyclingSupplier2Test.java
│ │ │ ├── SizedThreadLocalRecyclingSupplierTest.java
│ │ │ └── TestCallable.java
│ │ ├── reflect
│ │ └── GraphTypeMapTest.java
│ │ ├── security
│ │ ├── AesEncryptorDecryptorTest.java
│ │ └── EncryptedStringTest.java
│ │ ├── ssdump2
│ │ └── ConverterTest.java
│ │ ├── stackmonitor
│ │ ├── AvroProfilePersisterTest.java
│ │ ├── DemoTest.java
│ │ ├── FastStackCollectorTest.java
│ │ ├── MethodMapTest.java
│ │ ├── MethodsTest.java
│ │ ├── MonitorTest.java
│ │ ├── SampleNodeTest.java
│ │ ├── SamplerTest.java
│ │ ├── SimpleStackCollectorTest.java
│ │ ├── SsdumpTest.java
│ │ ├── StackTraceTest.java
│ │ └── TracingExecutionContexSamplerTest.java
│ │ ├── test
│ │ └── package-info.java
│ │ ├── text
│ │ └── FastMessageFormatTest.java
│ │ ├── tsdb2
│ │ ├── AvroTest.java
│ │ ├── TSDBQueryTest.java
│ │ └── TSDBReaderTest.java
│ │ └── unix
│ │ ├── CLibraryTest.java
│ │ └── JVMArgumentsTest.java
│ └── resources
│ ├── heartBeats.sql
│ ├── semaphoreTable.sql
│ ├── test.csv
│ ├── test.ssdump3
│ └── test_bad.csv
├── spf4j-experimental
└── hs_err_pid8875.log
├── spf4j-jacoco-aggregate
└── pom.xml
├── spf4j-jdiff-maven-plugin
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── jdiff
│ │ ├── ApiChangesMojo.java
│ │ ├── ApiDescriptorMojo.java
│ │ ├── ApiDiffCmd.java
│ │ ├── BaseJDiffMojo.java
│ │ ├── JDiffRunner.java
│ │ ├── JDiffUtils.java
│ │ ├── JavadocExecutionException.java
│ │ ├── JavadocExecutor.java
│ │ └── package-info.java
│ ├── site
│ ├── apt
│ │ ├── index.apt.vm
│ │ └── usage.apt.vm
│ └── site.xml
│ └── test
│ └── java
│ └── org
│ └── spf4j
│ └── jdiff
│ ├── ApiDiffCmdTest.java
│ └── JDiffRunnerTest.java
├── spf4j-jmh-11
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── spf4j
│ └── stackmonitor
│ ├── CmdLineUtils.java
│ ├── JFRControler.java
│ ├── JmhDetailedJFRProfiler.java
│ └── RecordingGranularity.java
├── spf4j-jmh
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── spf4j
│ └── stackmonitor
│ ├── JmhFlightRecorderProfiler.java
│ ├── JmhProfiler.java
│ └── Spf4jJmhProfiler.java
├── spf4j-joda
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── spf4j
│ └── io
│ └── appenders
│ ├── InstantAppender.java
│ └── LocalDateAppender.java
├── spf4j-junit
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── junit
│ │ ├── RunListenerRegister.java
│ │ └── Spf4jRunListener.java
│ ├── site
│ ├── markdown
│ │ └── index.md
│ └── site.xml
│ └── test
│ └── java
│ └── org
│ └── spf4j
│ └── junit
│ ├── RunListenerRegisterTest.java
│ └── Spf4jRunListenerTest.java
├── spf4j-maven-schema-resolver
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── maven
│ │ ├── CachedSchemaResolver.java
│ │ ├── MavenSchemaResolver.java
│ │ └── Registerer.java
│ └── test
│ └── java
│ └── org
│ └── spf4j
│ └── maven
│ └── MavenSchemaResolverTest.java
├── spf4j-slf4j-test-junit5
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── spf4j
│ └── test
│ └── log
│ └── junit5
│ ├── Spf4jTestExecutionExtensions.java
│ └── Spf4jTestExecutionListener.java
├── spf4j-slf4j-test
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ ├── junit
│ │ └── internal
│ │ │ └── runners
│ │ │ └── statements
│ │ │ └── FailOnTimeout.java
│ │ ├── slf4j
│ │ └── impl
│ │ │ └── TestLoggerServiceProvider.java
│ │ └── spf4j
│ │ ├── base
│ │ └── TestTimeSource.java
│ │ └── test
│ │ ├── log
│ │ ├── AllLevelsLogHandler.java
│ │ ├── Attachments.java
│ │ ├── CompositeLogHandler.java
│ │ ├── ConsumeAllLogs.java
│ │ ├── DefaultAsserter.java
│ │ ├── ExactLogStreamMatcher.java
│ │ ├── ExceptionHandoverRegistry.java
│ │ ├── GreedyLogPrinter.java
│ │ ├── HandlerRegistration.java
│ │ ├── LogAssert.java
│ │ ├── LogCollection.java
│ │ ├── LogCollectorHandler.java
│ │ ├── LogConfig.java
│ │ ├── LogConfigImpl.java
│ │ ├── LogConsumer.java
│ │ ├── LogHandler.java
│ │ ├── LogMatchingHandler.java
│ │ ├── LogMatchingHandlerAsync.java
│ │ ├── LogPrinter.java
│ │ ├── LogStreamMatcher.java
│ │ ├── ObservationAssert.java
│ │ ├── PrintConfig.java
│ │ ├── PrintLogConfigsIO.java
│ │ ├── TestLogRecord.java
│ │ ├── TestLogRecordImpl.java
│ │ ├── TestLogger.java
│ │ ├── TestLoggers.java
│ │ ├── TestUtils.java
│ │ ├── UncaughtExceptionAsserter.java
│ │ ├── UncaughtExceptionConsumer.java
│ │ ├── UncaughtExceptionDetail.java
│ │ ├── ValidationUtils.java
│ │ ├── annotations
│ │ │ ├── CollectLogs.java
│ │ │ ├── ExpectLog.java
│ │ │ ├── ExpectLogs.java
│ │ │ ├── PrintLogs.java
│ │ │ ├── PrintLogsConfigs.java
│ │ │ └── package-info.java
│ │ ├── junit4
│ │ │ ├── DetailOnFailureRunListener.java
│ │ │ ├── ExceptionAsserterUncaughtExceptionHandler.java
│ │ │ ├── Spf4jTestLogJUnitRunner.java
│ │ │ ├── Spf4jTestLogRunListener.java
│ │ │ ├── Spf4jTestLogRunListenerSingleton.java
│ │ │ └── TestBaggage.java
│ │ └── package-info.java
│ │ └── matchers
│ │ ├── LogMatchers.java
│ │ ├── PatternMatcher.java
│ │ └── PredicateMatcher.java
│ ├── site
│ ├── markdown
│ │ └── index.md
│ └── site.xml
│ └── test
│ ├── java
│ └── org
│ │ └── spf4j
│ │ ├── base
│ │ └── TestTimeSourceTest.java
│ │ └── test
│ │ ├── log
│ │ ├── LogConfigImplTest.java
│ │ ├── PrintLogConfigsIOTest.java
│ │ ├── TestGlobalErrorIgnore.java
│ │ ├── TestLoggerFactoryTest.java
│ │ ├── TestLoggerFactoryTest2.java
│ │ └── TestUtilsTest.java
│ │ └── matchers
│ │ └── LogMatchersTest.java
│ └── resources
│ ├── spf4j-test-prtcfg-ide.properties
│ ├── spf4j-test-prtcfg.properties
│ └── test-config.properties
├── spf4j-ui
├── pom.xml
└── src
│ ├── main
│ ├── dict
│ │ └── Info.plist.template
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ ├── perf
│ │ ├── impl
│ │ │ └── chart
│ │ │ │ ├── Charts.java
│ │ │ │ ├── InverseGrayScale.java
│ │ │ │ ├── QuantizedNumberTickUnit.java
│ │ │ │ ├── QuantizedXYZDatasetImpl.java
│ │ │ │ └── TimestampTickUnitImpl.java
│ │ └── tsdb
│ │ │ ├── DataFragment.java
│ │ │ ├── Header.java
│ │ │ ├── TSDataHandler.java
│ │ │ ├── TSTable.java
│ │ │ ├── TableOfContents.java
│ │ │ ├── TimeSeriesDatabase.java
│ │ │ └── package-info.java
│ │ ├── stackmonitor
│ │ └── SampleGraph.java
│ │ ├── tsdb2
│ │ ├── Charts.java
│ │ └── Charts2.java
│ │ └── ui
│ │ ├── Arrow2D.java
│ │ ├── ComparisonStackDumpJInternalFrame.form
│ │ ├── ComparisonStackDumpJInternalFrame.java
│ │ ├── ComposableFileFilter.java
│ │ ├── Explorer.form
│ │ ├── Explorer.java
│ │ ├── FlameStackPanel.java
│ │ ├── HotFlameStackPanel.java
│ │ ├── MStoreViewJInternalFrame.form
│ │ ├── MStoreViewJInternalFrame.java
│ │ ├── MultiStackSampleSupplier.java
│ │ ├── OneStackSampleSupplier.java
│ │ ├── Rectangle.java
│ │ ├── Sampled.java
│ │ ├── Spf4jFileFilter.java
│ │ ├── StackDumpJInternalFrame.form
│ │ ├── StackDumpJInternalFrame.java
│ │ ├── StackPanelBase.java
│ │ ├── TSDB2ViewJInternalFrame.form
│ │ ├── TSDB2ViewJInternalFrame.java
│ │ ├── TSDBViewJInternalFrame.form
│ │ ├── TSDBViewJInternalFrame.java
│ │ ├── TextEntryPanel.form
│ │ ├── TextEntryPanel.java
│ │ └── UncaughtExceptionDisplayer.java
│ └── test
│ ├── java
│ └── org
│ │ └── spf4j
│ │ ├── perf
│ │ ├── impl
│ │ │ └── chart
│ │ │ │ └── ChartsTest.java
│ │ └── tsdb
│ │ │ ├── TSDBTailerTest.java
│ │ │ └── TimeSeriesDatabaseTest.java
│ │ ├── stackmonitor
│ │ └── SampleGraphTest.java
│ │ └── ui
│ │ ├── Arrow2DTest.java
│ │ ├── ExplorerTest.java
│ │ ├── FlameStackPanelTest.java
│ │ ├── LatchWindowCloseListener.java
│ │ └── package-info.java
│ └── resources
│ ├── 19156@ZMacBookPro.local.tsdb
│ ├── com.google.common.io.AppendableWriterBenchmark.spf4jAppendable-Throughput.ssdump2
│ ├── jaxrs-spf4j-demo-54557c8c9d-5ndf9_20211030T141848576Z_20211030T151933489Z.ssdump3.gz
│ ├── org.spf4j.concurrent.ThreadPoolBenchmark.spfLifoTpBenchmark-Throughput_m4.ssdump2
│ ├── test8381720042200787335.tsdb2
│ └── testProfile.ssp.avro
├── spf4j-zel-javax
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── spf4j
│ │ └── zel
│ │ └── javax
│ │ ├── ZelBindings.java
│ │ ├── ZelCompiledScript.java
│ │ ├── ZelScriptContext.java
│ │ ├── ZelScriptEngine.java
│ │ └── ZelScriptEngineFactory.java
│ └── test
│ └── java
│ └── org
│ └── spf4j
│ └── zel
│ └── javax
│ └── ZelScriptEngineTest.java
├── spf4j-zel
├── fb-exclude.xml
├── nbactions.xml
├── pom.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── org
│ │ │ │ └── spf4j
│ │ │ │ └── zel
│ │ │ │ ├── instr
│ │ │ │ ├── ABS.java
│ │ │ │ ├── ADD.java
│ │ │ │ ├── AND.java
│ │ │ │ ├── ARR.java
│ │ │ │ ├── CALL.java
│ │ │ │ ├── CALLA.java
│ │ │ │ ├── CALLREF.java
│ │ │ │ ├── CDEREFX.java
│ │ │ │ ├── DEC.java
│ │ │ │ ├── DEREF.java
│ │ │ │ ├── DEREFX.java
│ │ │ │ ├── DIV.java
│ │ │ │ ├── DUP.java
│ │ │ │ ├── EQ.java
│ │ │ │ ├── FIRST.java
│ │ │ │ ├── FJMP.java
│ │ │ │ ├── GE.java
│ │ │ │ ├── GT.java
│ │ │ │ ├── HALT.java
│ │ │ │ ├── INC.java
│ │ │ │ ├── Instruction.java
│ │ │ │ ├── JMP.java
│ │ │ │ ├── LE.java
│ │ │ │ ├── LODAX.java
│ │ │ │ ├── LODAXF.java
│ │ │ │ ├── LODX.java
│ │ │ │ ├── LODXF.java
│ │ │ │ ├── LT.java
│ │ │ │ ├── MCTX.java
│ │ │ │ ├── MOD.java
│ │ │ │ ├── MOV.java
│ │ │ │ ├── MOVN.java
│ │ │ │ ├── MUL.java
│ │ │ │ ├── NEQ.java
│ │ │ │ ├── NJMP.java
│ │ │ │ ├── NOP.java
│ │ │ │ ├── NOT.java
│ │ │ │ ├── OR.java
│ │ │ │ ├── POW.java
│ │ │ │ ├── PUSH.java
│ │ │ │ ├── PUSHM.java
│ │ │ │ ├── REF.java
│ │ │ │ ├── RLIKE.java
│ │ │ │ ├── SLEEP.java
│ │ │ │ ├── SUB.java
│ │ │ │ ├── SWAP.java
│ │ │ │ ├── SYNC.java
│ │ │ │ ├── SymbolRef.java
│ │ │ │ ├── THROW.java
│ │ │ │ ├── XOR.java
│ │ │ │ ├── package-info.java
│ │ │ │ └── var
│ │ │ │ │ ├── ARRAY.java
│ │ │ │ │ ├── DECODE.java
│ │ │ │ │ ├── INT.java
│ │ │ │ │ ├── LIST.java
│ │ │ │ │ ├── LOG.java
│ │ │ │ │ ├── LOG10.java
│ │ │ │ │ ├── MAP.java
│ │ │ │ │ ├── MAX.java
│ │ │ │ │ ├── MIN.java
│ │ │ │ │ ├── NVL.java
│ │ │ │ │ ├── OUT.java
│ │ │ │ │ ├── RANDOM.java
│ │ │ │ │ └── SQRT.java
│ │ │ │ ├── operators
│ │ │ │ ├── AbstractOps.java
│ │ │ │ ├── BigDecimalOperators.java
│ │ │ │ ├── BigIntegerOperators.java
│ │ │ │ ├── DoubleOperators.java
│ │ │ │ ├── IntegerOperators.java
│ │ │ │ ├── LongOperators.java
│ │ │ │ ├── Operator.java
│ │ │ │ ├── Operators.java
│ │ │ │ └── package-info.java
│ │ │ │ └── vm
│ │ │ │ ├── Address.java
│ │ │ │ ├── AssignableValue.java
│ │ │ │ ├── Channel.java
│ │ │ │ ├── CompileContext.java
│ │ │ │ ├── CompileException.java
│ │ │ │ ├── ExecAbortException.java
│ │ │ │ ├── ExecutionContext.java
│ │ │ │ ├── JavaMethodCall.java
│ │ │ │ ├── MemoryBuilder.java
│ │ │ │ ├── Method.java
│ │ │ │ ├── NullParsingContext.java
│ │ │ │ ├── ParsingContext.java
│ │ │ │ ├── ProcessIO.java
│ │ │ │ ├── ProcessIOStreams.java
│ │ │ │ ├── Program.java
│ │ │ │ ├── ProgramBuilder.java
│ │ │ │ ├── RefOptimizer.java
│ │ │ │ ├── ResultCache.java
│ │ │ │ ├── SimpleResultCache.java
│ │ │ │ ├── SuspendedException.java
│ │ │ │ ├── VMASyncFuture.java
│ │ │ │ ├── VMExecutor.java
│ │ │ │ ├── VMFuture.java
│ │ │ │ ├── VMSyncFuture.java
│ │ │ │ ├── ZExecutionException.java
│ │ │ │ ├── ZelFrame.java
│ │ │ │ ├── ZelPredicate.java
│ │ │ │ └── gen
│ │ │ │ └── package-info.java
│ │ └── javacc
│ │ │ └── org
│ │ │ └── spf4j
│ │ │ └── zel
│ │ │ └── vm
│ │ │ └── ZCompiler.jj
│ ├── site
│ │ ├── apt
│ │ │ └── index.apt
│ │ └── site.xml
│ └── test
│ │ ├── java
│ │ └── org
│ │ │ └── spf4j
│ │ │ └── zel
│ │ │ └── vm
│ │ │ ├── AvroTest.java
│ │ │ ├── ChannelTest.java
│ │ │ ├── CommentsTest.java
│ │ │ ├── CondDerefTest.java
│ │ │ ├── ExceptionsTest.java
│ │ │ ├── JavaMethodTest.java
│ │ │ ├── LikeTest.java
│ │ │ ├── MinMaxTest.java
│ │ │ ├── QSortTest.java
│ │ │ ├── Scratch.java
│ │ │ ├── SleepSortTest.java
│ │ │ ├── StringEvalTest.java
│ │ │ ├── TestDecimalOperations.java
│ │ │ ├── TestDoubleOperations.java
│ │ │ ├── TestLongOperations.java
│ │ │ ├── TestReplica.java
│ │ │ ├── TestZelMultiThreaded.java
│ │ │ ├── TestZelSingleThreaded.java
│ │ │ └── ZelTest.java
│ │ └── resources
│ │ └── org
│ │ └── spf4j
│ │ └── zel
│ │ └── vm
│ │ ├── channel.zel
│ │ ├── comments.zel
│ │ ├── minmax.zel
│ │ ├── parallelPi.zel
│ │ ├── replicas.zel
│ │ ├── sleepSort.zel
│ │ ├── sort.zel
│ │ ├── sortFunc.zel
│ │ └── stringEscaping.zel
└── todo.txt
└── src
└── site
├── markdown
├── index.md
├── logging.md
├── metrics.md
├── misc.md
└── profiling.md
├── resources
├── images
│ ├── ContextCorelatedProfiling.svg
│ ├── MetricsFlow.svg
│ ├── MonitoringDiagram.svg
│ ├── explorer-ui.png
│ ├── spf4j-flame-graph.png
│ ├── spf4j_allocations.png
│ ├── spf4j_dist.png
│ ├── spf4j_io.png
│ └── spf4j_min_max_avg.png
└── jaxrs-spf4j-demo_20200131T160810753Z_20200131T170850286Z.ssdump3.gz
└── site.xml
/.github/workflows/codeql.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches: [ "master" ]
6 | pull_request:
7 | branches: [ "master" ]
8 | schedule:
9 | - cron: "20 20 * * 0"
10 |
11 | jobs:
12 | analyze:
13 | name: Analyze
14 | runs-on: ubuntu-latest
15 | permissions:
16 | actions: read
17 | contents: read
18 | security-events: write
19 |
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | language: [ java ]
24 |
25 | steps:
26 | - name: Checkout
27 | uses: actions/checkout@v3
28 |
29 | - name: Initialize CodeQL
30 | uses: github/codeql-action/init@v2
31 | with:
32 | languages: ${{ matrix.language }}
33 | queries: +security-and-quality
34 |
35 | - name: Autobuild
36 | uses: github/codeql-action/autobuild@v2
37 |
38 | - name: Perform CodeQL Analysis
39 | uses: github/codeql-action/analyze@v2
40 | with:
41 | category: "/language:${{ matrix.language }}"
42 |
--------------------------------------------------------------------------------
/.github/workflows/maven.yml:
--------------------------------------------------------------------------------
1 | name: Java CI
2 |
3 | on: [push]
4 |
5 | jobs:
6 | build:
7 |
8 | runs-on: ubuntu-latest
9 | env:
10 | GITHUB_ACTION: true
11 | DISPLAY: :99.0
12 | GITHUB_PKG_TOKEN: ${{ secrets.REPO_TOKEN }}
13 | steps:
14 | - uses: actions/checkout@v2
15 |
16 | - name: Set up JDK 1.8
17 | uses: actions/setup-java@v2
18 | with:
19 | distribution: 'adopt'
20 | java-version: 8.0.312+7
21 | cache: maven
22 |
23 | - name: Set up JDK 11
24 | uses: AdoptOpenJDK/install-jdk@v1
25 | with:
26 | version: '11'
27 | architecture: x64
28 | targets: 'JDK_11'
29 |
30 | - name: run/xfb
31 | run: "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
32 |
33 | - name: Build with Maven
34 | run: mvn -T 1C -s .github/workflows/settings.xml -B package -Djava8.home=${JAVA_HOME} -Djava11.home=${JDK_11} --file pom.xml
35 |
--------------------------------------------------------------------------------
/.github/workflows/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | github
9 |
10 |
11 |
12 |
13 | github
14 |
15 |
16 |
17 | true
18 |
19 | sonatype-snapshot
20 | Sonatype Snapshot Repository
21 | https://oss.sonatype.org/content/repositories/snapshots
22 |
23 |
24 | github
25 | https://maven.pkg.github.com/zolyfarkas/*
26 |
27 | true
28 |
29 |
30 |
31 |
32 |
33 | github-plugins
34 | https://maven.pkg.github.com/zolyfarkas/*
35 |
36 | true
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | github
46 | zolyfarkas
47 | ${env.GITHUB_PKG_TOKEN}
48 |
49 |
50 | github-plugins
51 | zolyfarkas
52 | ${env.GITHUB_PKG_TOKEN}
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/.travis.settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | github
9 |
10 |
11 |
12 |
13 | github
14 |
15 |
16 |
17 | true
18 |
19 | sonatype-snapshot
20 | Sonatype Snapshot Repository
21 | https://oss.sonatype.org/content/repositories/snapshots
22 |
23 |
24 | github
25 | https://maven.pkg.github.com/zolyfarkas/*
26 |
27 | true
28 |
29 |
30 |
31 |
32 |
33 | github-plugins
34 | https://maven.pkg.github.com/zolyfarkas/*
35 |
36 | true
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | github
46 | zolyfarkas
47 | ${env.GITHUB_PKG_TOKEN}
48 |
49 |
50 | github-plugins
51 | zolyfarkas
52 | ${env.GITHUB_PKG_TOKEN}
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: trusty
2 |
3 | language: java
4 |
5 | cache:
6 | directories:
7 | - $HOME/.m2
8 |
9 | jdk:
10 | - oraclejdk8
11 |
12 | before_script:
13 | - "export DISPLAY=:99.0"
14 | - jdk_switcher use openjdk11
15 |
16 |
17 | script: mvn -T 1C -s .travis.settings.xml -B -Djava8.home=/usr/lib/jvm/java-8-oracle -Djava11.home=/home/travis/openjdk11 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dgpg.skip=true install
18 |
19 | before_install:
20 | - cp .travis.settings.xml $HOME/.m2/settings.xml
21 | - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh && . ./install-jdk.sh -F 11 --target /home/travis/openjdk11 --os linux-x64
22 | - jdk_switcher use oraclejdk8
23 | - echo "MAVEN_OPTS='-Xmx1024m'" > ~/.mavenrc
24 | - sudo apt-get install jq
25 | - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
26 | - wget -O ~/codacy-coverage-reporter-assembly-latest.jar https://github.com/codacy/codacy-coverage-reporter/releases/download/4.0.1/codacy-coverage-reporter-4.0.1-assembly.jar
27 | - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
28 |
29 | install: mvn -T 1C -s .travis.settings.xml -B -Djava8.home=/usr/lib/jvm/java-8-oracle -Djava11.home=/home/travis/openjdk11 -DskipTests=true -Dmaven.javadoc.skip=true -Dspotbugs.skip=true -Dcheckstyle.skip=true -Dgpg.skip=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn install
30 |
31 | after_success:
32 | - ${JAVA_HOME}/bin/java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -l Java -r ./spf4j-jacoco-aggregate/target/site/jacoco-aggregate/jacoco.xml
33 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributors and Contributions are welcome.
2 |
3 | 1) For questions please contact us on Gitter: [](https://gitter.im/spf4j/Lobby)
4 | 2) For bug fixes, enhancements, file an issue. The more detail the better, even better if you have code ready to commit.
5 | 3) For code contributions create a [PR](https://help.github.com/articles/creating-a-pull-request/)
6 |
7 | Spf4j uses Coverity, Findbugs, Checkstyle, Codacy, Junit, Jacoco, Jmh to make sure the SPF4J library is as high quality as possible.
8 |
9 | Good coding!
10 |
--------------------------------------------------------------------------------
/findbugs_exclude.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/sonar-project.properties:
--------------------------------------------------------------------------------
1 | sonar.projectKey=zolyfarkas_spf4j
2 |
--------------------------------------------------------------------------------
/spf4j-aether/src/main/java/org/spf4j/maven/ClassifierDependencyFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.maven;
17 |
18 | import java.util.List;
19 | import org.eclipse.aether.graph.DependencyFilter;
20 | import org.eclipse.aether.graph.DependencyNode;
21 |
22 | /**
23 | * @author Zoltan Farkas
24 | */
25 | public final class ClassifierDependencyFilter implements DependencyFilter {
26 |
27 | private final String classifier;
28 |
29 | public ClassifierDependencyFilter(final String classifier) {
30 | this.classifier = classifier;
31 | }
32 |
33 | @Override
34 | public boolean accept(final DependencyNode node, final List parents) {
35 | return classifier.equals(node.getArtifact().getClassifier());
36 | }
37 |
38 | @Override
39 | public String toString() {
40 | return "ClassifierDependencyFilter{" + "classifier=" + classifier + '}';
41 | }
42 |
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/spf4j-aspects/src/site/site.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | SPF4J Aspects
5 |
6 |
7 |
8 |
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
19 | org.apache.maven.skins
20 | maven-fluido-skin
21 | 1.7
22 |
23 |
24 |
25 | false
26 | true
27 | width: 90%;
28 |
29 |
30 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/mrm/settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | it-repo
5 | @mrm.repository.url@
6 | *
7 |
8 |
9 |
10 |
11 | it-repo
12 |
13 |
14 | local.central
15 | http://local.central
16 |
17 | true
18 |
19 |
20 | true
21 |
22 |
23 |
24 |
25 |
26 | local.central
27 | http://local.central
28 |
29 | true
30 |
31 |
32 | true
33 |
34 |
35 |
36 |
37 |
38 |
39 | it-repo
40 |
41 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-1/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean deploy
2 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-1/test-common/src/main/avro/common.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol Common {
3 |
4 | /** record representing a key value pair */
5 | record KeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-1/test-schema-2/src/main/avro/common_local.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol CommonLocal {
3 |
4 | /** record representing a key value pair */
5 | record LocalKeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-1/test-schema-3/src/main/avro/common_local.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol CommonLocal {
3 |
4 | /** record representing a key value pair */
5 | record LocalKeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-1/test-schema/src/main/avro/common_local.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol CommonLocal {
3 |
4 | /** record representing a key value pair */
5 | record LocalKeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-1/test-schema/src/main/avro/core.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol Core {
3 |
4 | import idl "common.avdl";
5 |
6 | import idl "common_local.avdl";
7 |
8 | /** record representing a jar archive info */
9 | record JPackageInfo {
10 | /** the package url */
11 | string url = "";
12 | /** version from manifest */
13 | string version = "";
14 |
15 | /** some key value for test*/
16 | LocalKeyValue @aliases(["kv"]) keyValue = {"key" : "la", "value" : null};
17 | }
18 |
19 | /** a location in a file */
20 | record JFileLocation {
21 | /** file name */
22 | string fileName;
23 | /** line number */
24 | int lineNumber;
25 | }
26 |
27 | /** record representing the samples where a particular method was executed */
28 | record JStackTraceElement {
29 | /** java class name */
30 | string className;
31 | /** java method name */
32 | string methodName;
33 | /** location, null when no location available */
34 | union {null, JFileLocation} location;
35 | /** package info, null when no package info is available */
36 | union {null, JPackageInfo} packageInfo;
37 | }
38 |
39 | /** a throwable */
40 | record JThrowable {
41 | /** exception class name */
42 | string className;
43 | /** exception message, java exception messages can be null */
44 | union { null, string } message = null;
45 | /** the stack trace */
46 | array stackTrace = [];
47 | /** exception cause, null when there is no cause */
48 | union {null, JThrowable} cause = null;
49 | /** suppressed exceptions */
50 | array suppressed = [];
51 | /** some key values */
52 | array values = [];
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-2/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean deploy
2 | invoker.buildResult = failure
3 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-2/test-common/src/main/avro/common.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol Common {
3 |
4 | /** record representing a key value pair */
5 | record KeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-2/test-schema-2/src/main/avro/common_local.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol CommonLocal {
3 |
4 | /** record representing a key value pair */
5 | record LocalKeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-2/test-schema-3/src/main/avro/common_local.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol CommonLocal {
3 |
4 | /** record representing a key value pair */
5 | record LocalKeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-2/test-schema/src/main/avro/common_local.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol CommonLocal {
3 |
4 | /** record representing a key value pair */
5 | record LocalKeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-2/test-schema/src/main/avro/core.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol Core {
3 |
4 | import idl "common.avdl";
5 |
6 | import idl "common_local.avdl";
7 |
8 | /** record representing a jar archive info */
9 | record JPackageInfo {
10 | /** the package url */
11 | string url = "";
12 | /** version from manifest */
13 | string version = "";
14 |
15 | /** some key value for test*/
16 | LocalKeyValue kv = {"key" : "la", "value" : null};
17 | }
18 |
19 | /** a location in a file */
20 | record JFileLocation {
21 | /** file name */
22 | string fileName;
23 | /** line number */
24 | int lineNumber;
25 | }
26 |
27 | /** record representing the samples where a particular method was executed */
28 | record JStackTraceElement {
29 | /** java class name */
30 | string className;
31 | /** java method name */
32 | string methodName;
33 | /** location, null when no location available */
34 | union {null, JFileLocation} location;
35 | /** package info, null when no package info is available */
36 | union {null, JPackageInfo} packageInfo;
37 | }
38 |
39 | /** a throwable */
40 | record JThrowable {
41 | /** exception class name */
42 | string className;
43 | /** exception message, java exception messages can be null */
44 | union { null, string } message = null;
45 | /** the stack trace */
46 | array stackTrace = [];
47 | /** exception cause, null when there is no cause */
48 | union {null, JThrowable} cause = null;
49 | /** suppressed exceptions */
50 | array suppressed = [];
51 | /** some key values */
52 | array values = [];
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-3/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean deploy
2 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-4/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean deploy
2 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-4/src/main/avro/common.avdl:
--------------------------------------------------------------------------------
1 | @namespace("org.spf4j.base.avro")
2 | protocol Common {
3 |
4 | /** record representing a key value pair */
5 | record KeyValue {
6 | /** the key */
7 | string key;
8 | /** the value, value can be null to allow storing everything a java String field can */
9 | union {null, string} value = null;
10 | }
11 |
12 |
13 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-5/invoker.properties:
--------------------------------------------------------------------------------
1 | invoker.goals = clean deploy
2 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-5/src/main/avro/A.avsc:
--------------------------------------------------------------------------------
1 | {
2 | "type": "record",
3 | "namespace": "com.example.avro",
4 | "name": "A",
5 | "fields": [
6 | {
7 | "name": "b",
8 | "type": "B"
9 | },
10 | {
11 | "name": "field",
12 | "type": ["null", "string"],
13 | "default": null
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/it/projects/test-5/src/main/avro/B.avsc:
--------------------------------------------------------------------------------
1 | {
2 | "type": "record",
3 | "namespace": "com.example.avro",
4 | "name": "B",
5 | "fields": [
6 | {
7 | "name": "id",
8 | "type": "string",
9 | "logicalType": "uuid"
10 | },
11 | {
12 | "name": "timestamp",
13 | "type": "long",
14 | "logicalType": "timestamp-millis"
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/main/java/org/spf4j/maven/plugin/avro/avscp/ValidatorMojo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.maven.plugin.avro.avscp;
17 |
18 | import java.io.File;
19 | import java.util.Map;
20 | import org.apache.maven.execution.MavenSession;
21 | import org.apache.maven.plugin.logging.Log;
22 | import org.apache.maven.project.MavenProject;
23 | import org.eclipse.aether.RepositorySystem;
24 |
25 | /**
26 | * Interface to abstract the Validator MOJO for the Validators.
27 | */
28 | public interface ValidatorMojo {
29 |
30 | Map getValidatorConfigs();
31 |
32 | RepositorySystem getRepoSystem();
33 |
34 | MavenSession getMavenSession();
35 |
36 | MavenProject getMavenProject();
37 |
38 | File getGeneratedAvscTarget();
39 |
40 | File getTarget();
41 |
42 | Log getLog();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/site/site.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | false
7 | true
8 | width: 90%;
9 |
10 |
11 |
12 |
13 |
18 |
19 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/test/java/org/spf4j/maven/plugin/avro/avscp/SourceLocationTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.maven.plugin.avro.avscp;
17 |
18 | import org.junit.Assert;
19 | import org.junit.Test;
20 |
21 | /**
22 | *
23 | * @author Zoltan Farkas
24 | */
25 | public class SourceLocationTest {
26 |
27 |
28 |
29 | @Test
30 | public void testSourceLocation() {
31 | SourceLocation sl = new SourceLocation("src/main/avro/txn/BlBla.avdl:6:5");
32 | Assert.assertEquals(6, sl.getLineNr());
33 | Assert.assertEquals(5, sl.getColNr());
34 | Assert.assertEquals("src/main/avro/txn/BlBla.avdl", sl.getFilePath());
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/spf4j-avro-components/maven-avro-schema-plugin/src/test/java/org/spf4j/maven/plugin/avro/avscp/validation/impl/SchemaCompatibilityValidatorTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.maven.plugin.avro.avscp.validation.impl;
17 |
18 | import org.apache.avro.Schema;
19 | import org.apache.avro.SchemaBuilder;
20 | import org.hamcrest.Matchers;
21 | import org.junit.Assert;
22 | import org.junit.Test;
23 |
24 | /**
25 | *
26 | * @author Zoltan Farkas
27 | */
28 | public class SchemaCompatibilityValidatorTest {
29 |
30 | @Test
31 | public void testDiff() {
32 |
33 | Schema rec1 = SchemaBuilder.record("test")
34 | .fields()
35 | .nullableLong("testField", 0).endRecord();
36 |
37 | Schema rec2 = SchemaBuilder.record("test")
38 | .fields()
39 | .nullableInt("testField", 0).endRecord();
40 | String diff = SchemaCompatibilityValidator.diff(rec1, rec2);
41 |
42 | // System.out.println(SchemaCompatibilityValidator.diff(rec1, rec2));
43 | Assert.assertThat(diff, Matchers.containsString("int"));
44 | Assert.assertThat(diff, Matchers.containsString("long"));
45 |
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro-adapter-official/src/main/java/org/apache/avro/io/EncoderAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.avro.io;
17 |
18 | import com.fasterxml.jackson.core.JsonGenerator;
19 | import java.io.IOException;
20 | import org.apache.avro.Schema;
21 |
22 | /**
23 | * adapter to expose some package protected functionality.
24 | * @author Zoltan Farkas
25 | */
26 | public final class EncoderAdapter {
27 |
28 | private EncoderAdapter() { }
29 |
30 | public static JsonEncoder jsonEncoder(final Schema schema, final JsonGenerator gen) throws IOException {
31 | return new JsonEncoder(schema, gen);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro-lib-ext/src/main/java/org/apache/avro/ExtendedAvroNamesRefResolver.java:
--------------------------------------------------------------------------------
1 | package org.apache.avro;
2 |
3 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
4 |
5 | /*
6 | * Copyright 2020 SPF4J.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | */
20 |
21 | /**
22 | * @author Zoltan Farkas
23 | */
24 | @SuppressFBWarnings({ "SE_BAD_FIELD", "SE_NO_SERIALVERSIONID" })
25 | public final class ExtendedAvroNamesRefResolver extends ExtendedNames {
26 |
27 | private final SchemaResolver sResolver;
28 |
29 | public ExtendedAvroNamesRefResolver(final SchemaResolver sResolver) {
30 | this.sResolver = sResolver;
31 | }
32 |
33 | public ExtendedAvroNamesRefResolver(final SchemaResolver sClient, final String nameSpace) {
34 | super(nameSpace);
35 | this.sResolver = sClient;
36 | }
37 |
38 | public String getId(final Schema schema) {
39 | return sResolver.getId(schema);
40 | }
41 |
42 | public Schema resolveSchema(final String id) {
43 | return sResolver.resolveSchema(id);
44 | }
45 |
46 | @Override
47 | public String toString() {
48 | return "AvroNamesRefResolver{" + "sResolver=" + sResolver + '}';
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro-lib-ext/src/main/java/org/apache/avro/ExtendedNames.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.avro;
17 |
18 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
19 |
20 | /**
21 | *
22 | * @author Zoltan Farkas
23 | */
24 | @SuppressFBWarnings("SE_NO_SERIALVERSIONID")
25 | public class ExtendedNames extends Schema.Names {
26 |
27 | public ExtendedNames() {
28 | }
29 |
30 | public ExtendedNames(final String space) {
31 | super(space);
32 | }
33 |
34 | /**
35 | * overwrite for extra name resolution.
36 | * @param o
37 | * @return
38 | */
39 | @Override
40 | public Schema get(final String o) {
41 | return super.get(o);
42 | }
43 |
44 |
45 | /**
46 | * overwrite for extra name resolution.
47 | * @param o
48 | * @return
49 | */
50 | @Override
51 | public Schema get(final Object o) {
52 | return super.get(o);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro-lib-ext/src/main/java/org/apache/avro/SchemaResolverRegistration.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.avro;
17 |
18 | /**
19 | *
20 | * @author Zoltan Farkas
21 | */
22 | public interface SchemaResolverRegistration {
23 |
24 | String getName();
25 |
26 | SchemaResolver getResolver();
27 | }
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro-lib-ext/src/main/java/org/apache/avro/UnresolvedExtendedParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.avro;
17 |
18 | /**
19 | *
20 | * @author Zoltan Farkas
21 | */
22 | public class UnresolvedExtendedParser extends ExtendedParser {
23 |
24 | public UnresolvedExtendedParser() {
25 | super(new ExtendedNames() {
26 | @Override
27 | public Schema get(final String o) {
28 | Schema result = super.get(o);
29 | if (result == null) {
30 | result = org.apache.avro.avsc.SchemaResolver.unresolvedSchema(o);
31 | }
32 | return result;
33 | }
34 |
35 | });
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro-lib-ext/src/main/java/org/apache/avro/avsc/SchemaVisitorAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001 - 2016, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | */
18 |
19 | package org.apache.avro.avsc;
20 |
21 | public enum SchemaVisitorAction {
22 |
23 | /**
24 | * continue visit.
25 | */
26 | CONTINUE,
27 | /**
28 | * terminate visit.
29 | */
30 | TERMINATE,
31 | /**
32 | * when returned from pre non terminal visit method the children of the non terminal are skipped.
33 | * afterVisitNonTerminal for the current schema will not be invoked.
34 | */
35 | SKIP_SUBTREE,
36 | /**
37 | * Skip visiting the siblings of this schema.
38 | */
39 | SKIP_SIBLINGS;
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/java/org/apache/calcite/interpreter/Spf4jDataContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.calcite.interpreter;
17 |
18 | import org.apache.calcite.DataContext;
19 |
20 | /**
21 | *
22 | * @author Zoltan Farkas
23 | */
24 | public final class Spf4jDataContext extends Context {
25 |
26 | public Spf4jDataContext(final DataContext root) {
27 | super(root);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/java/org/spf4j/avro/DecodedSchema.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.avro;
17 |
18 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
19 | import javax.annotation.ParametersAreNonnullByDefault;
20 | import org.apache.avro.Schema;
21 | import org.apache.avro.io.Decoder;
22 |
23 | /**
24 | * @author Zoltan Farkas
25 | */
26 | @ParametersAreNonnullByDefault
27 | public final class DecodedSchema {
28 |
29 | private final Schema schema;
30 |
31 | private final Decoder decoder;
32 |
33 | @SuppressFBWarnings("EI_EXPOSE_REP2")
34 | public DecodedSchema(final Schema schema, final Decoder decoder) {
35 | this.schema = schema;
36 | this.decoder = decoder;
37 | }
38 |
39 | @SuppressFBWarnings("EI_EXPOSE_REP")
40 | public Schema getSchema() {
41 | return schema;
42 | }
43 |
44 | public Decoder getDecoder() {
45 | return decoder;
46 | }
47 |
48 | @Override
49 | public String toString() {
50 | return "DecodedSchema{" + "schema=" + schema + ", decoder=" + decoder + '}';
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/java/org/spf4j/avro/SqlPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.avro;
17 |
18 | import java.util.function.Predicate;
19 | import org.apache.avro.generic.IndexedRecord;
20 |
21 | /**
22 | * A predicate represented by a SQL Expression.
23 | * @author Zoltan Farkas
24 | */
25 | public interface SqlPredicate extends Predicate {
26 |
27 | String getSqlString();
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/java/org/spf4j/avro/calcite/AvroSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.avro.calcite;
17 |
18 | import java.util.List;
19 | import org.apache.avro.generic.IndexedRecord;
20 | import org.spf4j.base.CloseableIterator;
21 |
22 | /**
23 | * @author Zoltan Farkas
24 | */
25 | public interface AvroSupplier {
26 |
27 | CloseableIterator get(List filters, List projections);
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/java/org/spf4j/avro/calcite/FilteredProjectedSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.avro.calcite;
17 |
18 | /**
19 | * @author Zoltan Farkas
20 | */
21 | public interface FilteredProjectedSupplier {
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/java/org/spf4j/avro/calcite/PlannerUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.avro.calcite;
17 |
18 | import org.apache.calcite.plan.hep.HepPlanner;
19 | import org.apache.calcite.plan.hep.HepProgram;
20 | import org.apache.calcite.plan.hep.HepProgramBuilder;
21 | import org.apache.calcite.rel.RelNode;
22 | import org.apache.calcite.rel.rules.CoreRules;
23 |
24 | /**
25 | *
26 | * @author Zoltan Farkas
27 | */
28 | public final class PlannerUtils {
29 |
30 | private PlannerUtils() { }
31 |
32 | public static RelNode pushDownPredicatesAndProjection(final RelNode rootRel) {
33 | final HepProgram hepProgram = new HepProgramBuilder()
34 | //push down predicates
35 | .addRuleInstance(CoreRules.FILTER_INTO_JOIN)
36 | //push down projections
37 | .addRuleInstance(CoreRules.PROJECT_JOIN_TRANSPOSE)
38 | .addRuleInstance(CoreRules.FILTER_PROJECT_TRANSPOSE)
39 | .build();
40 | final HepPlanner planner = new HepPlanner(hepProgram);
41 | planner.setRoot(rootRel);
42 | return planner.findBestExp();
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/java/org/spf4j/avro/calcite/TableAccessDeniedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.avro.calcite;
17 |
18 | public final class TableAccessDeniedException extends RuntimeException {
19 |
20 | private static final long serialVersionUID = 1L;
21 |
22 | public TableAccessDeniedException() {
23 | }
24 |
25 | public TableAccessDeniedException(final String msg) {
26 | super(msg);
27 | }
28 |
29 | public TableAccessDeniedException(final String msg, final Throwable t) {
30 | super(msg, t);
31 | }
32 |
33 | public TableAccessDeniedException(final Throwable t) {
34 | super(t);
35 | }
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/spf4j-avro-components/spf4j-avro/src/main/resources/org/spf4j/avro/enum.vm:
--------------------------------------------------------------------------------
1 | ##
2 | ## Licensed to the Apache Software Foundation (ASF) under one
3 | ## or more contributor license agreements. See the NOTICE file
4 | ## distributed with this work for additional information
5 | ## regarding copyright ownership. The ASF licenses this file
6 | ## to you under the Apache License, Version 2.0 (the
7 | ## "License"); you may not use this file except in compliance
8 | ## with the License. You may obtain a copy of the License at
9 | ##
10 | ## http://www.apache.org/licenses/LICENSE-2.0
11 | ##
12 | ## Unless required by applicable law or agreed to in writing, software
13 | ## distributed under the License is distributed on an "AS IS" BASIS,
14 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | ## See the License for the specific language governing permissions and
16 | ## limitations under the License.
17 | ##
18 | #if ($schema.getNamespace())
19 | package $schema.getNamespace();
20 | #end
21 | @SuppressWarnings("all")
22 | #if ($schema.getDoc())
23 | /** $schema.getDoc() */
24 | #end
25 | #foreach ($annotation in $this.javaAnnotations($schema))
26 | @$annotation
27 | #end
28 | @org.apache.avro.specific.AvroGenerated
29 | public enum ${this.mangle($schema.getName())} implements org.apache.avro.generic.GenericEnumSymbol {
30 | #foreach ($symbol in ${schema.getEnumSymbols()})${this.mangle($symbol)}#if ($velocityHasNext), #end#end
31 | ;
32 | public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("${this.javaEscape($schema.toString())}");
33 | public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
34 | public org.apache.avro.Schema getSchema() { return SCHEMA$; }
35 | }
36 |
--------------------------------------------------------------------------------
/spf4j-config-discovery-maven-plugin/src/it/simple-it/verify.groovy:
--------------------------------------------------------------------------------
1 | File avdlFile = new File( basedir, "target/generated-sources/avdl/simple-it.avdl" );
2 |
3 | assert avdlFile.isFile()
4 |
--------------------------------------------------------------------------------
/spf4j-core-gwt/src/main/resources/org/spf4j/ForceSpf4jCompilation.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/spf4j-core-gwt/src/main/resources/org/spf4j/ForceSpf4jCompilationEntryPoint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j;
33 |
34 | import com.google.gwt.core.client.EntryPoint;
35 |
36 | public class ForceSpf4jCompilationEntryPoint implements EntryPoint {
37 | @Override public void onModuleLoad() {
38 | //dummy entry point to convince Maven to compile
39 | }
40 | }
--------------------------------------------------------------------------------
/spf4j-core-gwt/src/main/resources/org/spf4j/base/Base.gwt.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/ArrayWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.base;
17 |
18 | import java.io.Closeable;
19 | import java.io.Flushable;
20 | import java.io.IOException;
21 | import java.io.UncheckedIOException;
22 | import java.util.function.Consumer;
23 |
24 | /**
25 | * @author Zoltan Farkas
26 | */
27 | @FunctionalInterface
28 | public interface ArrayWriter extends Flushable, Closeable, Consumer {
29 |
30 | void write(T t) throws IOException;
31 |
32 | default void accept(final T t) {
33 | try {
34 | write(t);
35 | } catch (IOException ex) {
36 | throw new UncheckedIOException(ex);
37 | }
38 | }
39 |
40 | default void close() throws IOException {
41 | // no close default
42 | }
43 |
44 | default void flush() throws IOException {
45 | // no flush default
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/CharArrayConsumer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.base;
17 |
18 | /**
19 | * @author Zoltan Farkas
20 | */
21 | public interface CharArrayConsumer {
22 | void accept(char[] array, int offset, int length);
23 | }
24 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/ESupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | /**
35 | *
36 | * @author Zoltan Farkas
37 | */
38 | @FunctionalInterface
39 | public interface ESupplier {
40 |
41 | T get() throws E;
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/Handler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | /**
35 | *
36 | * @author zoly
37 | */
38 | public interface Handler {
39 |
40 | // CHECKSTYLE:OFF -- checkstyle does not seem to handle generic exceptions
41 | void handle(T object, long deadlineMillis) throws E;
42 | // CHECKSTYLE:ON
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/HandlerNano.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | /**
35 | *
36 | * @author zoly
37 | */
38 | public interface HandlerNano {
39 |
40 | R handle(T object, long deadlineNanos) throws E;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/IntSequence.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | /**
35 | * @author zoly
36 | */
37 | public interface IntSequence {
38 | int nextInt();
39 | }
40 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/Invocation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | /**
35 | * @author Zoltan Farkas
36 | */
37 | public interface Invocation {
38 |
39 | Object invoke(Object... parameters) throws Exception;
40 | }
41 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/JsonReader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | import java.io.Reader;
35 |
36 | /**
37 | * @author Zoltan Farkas
38 | */
39 | public interface JsonReader {
40 | T readFrom(Reader r);
41 | }
42 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/MapWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.base;
17 |
18 | import java.io.Flushable;
19 | import java.util.function.BiConsumer;
20 |
21 | /**
22 | * @author Zoltan Farkas
23 | */
24 | public interface MapWriter extends Flushable, BiConsumer {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/ParameterizedSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | /**
35 | *
36 | * @author zoly
37 | */
38 | public interface ParameterizedSupplier {
39 |
40 | W get(PT parameter);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/SuppressedThrowable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.base;
33 |
34 | public final class SuppressedThrowable extends Throwable {
35 |
36 | public SuppressedThrowable(final Throwable t) {
37 | super(t);
38 | }
39 |
40 | @Override
41 | public Throwable fillInStackTrace() {
42 | return this;
43 | }
44 |
45 |
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/avro/AvroContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.base.avro;
17 |
18 | import javax.annotation.Nullable;
19 | import org.apache.avro.Schema;
20 |
21 | /**
22 | * @author Zoltan Farkas
23 | */
24 | public interface AvroContainer {
25 |
26 | /**
27 | * return the element schema of the container.
28 | * @return null if schema can be inferred from type.
29 | */
30 | @Nullable
31 | default Schema getElementSchema() {
32 | return null;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/base/avro/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | @edu.umd.cs.findbugs.annotations.SuppressFBWarnings
33 | package org.spf4j.base.avro;
34 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/concurrent/Sequence.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.concurrent;
33 |
34 | public interface Sequence {
35 |
36 | /**
37 | * @return next number in sequence. if result is negative an overflow happened.
38 | */
39 | long next();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/ds/LinkedMap.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.ds;
33 |
34 | import java.util.Map;
35 | import javax.annotation.Nullable;
36 |
37 | /**
38 | *
39 | * @author zoly
40 | */
41 | public interface LinkedMap extends Map {
42 |
43 | @Nullable
44 | Map.Entry getLastEntry();
45 |
46 | @Nullable
47 | Map.Entry pollLastEntry();
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/ds/LinkedSet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.ds;
33 |
34 | import java.util.Set;
35 | import javax.annotation.Nullable;
36 |
37 | /**
38 | *
39 | * @author zoly
40 | */
41 | public interface LinkedSet extends Set {
42 |
43 | @Nullable
44 | V getLastValue();
45 |
46 | @Nullable
47 | V pollLastValue();
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/failsafe/PartialExceptionRetryPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.failsafe;
17 |
18 | import java.util.concurrent.Callable;
19 |
20 | /**
21 | * Chain-able Exception predicate.
22 | * This predicate will not return a RetryDecision (null) when if want to deffer the retry decision.
23 | * @author Zoltan Farkas
24 | */
25 | @FunctionalInterface
26 | public interface PartialExceptionRetryPredicate>
27 | extends PartialTypedExceptionRetryPredicate {
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/failsafe/PartialResultRetryPredicate.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.failsafe;
17 |
18 | import java.util.concurrent.Callable;
19 | import java.util.function.BiFunction;
20 | import javax.annotation.Nonnull;
21 | import javax.annotation.Nullable;
22 |
23 | /**
24 | * Chainable Result predicate.
25 | * This predicate will not return a RetryDecision (null) when if want to deffer the retry decision.
26 | * @author Zoltan Farkas
27 | */
28 | @FunctionalInterface
29 | public interface PartialResultRetryPredicate>
30 | extends BiFunction> {
31 |
32 | @Nullable
33 | RetryDecision getDecision(@Nonnull T value, @Nonnull C what);
34 |
35 | @Override
36 | @Nullable
37 | default RetryDecision apply(final T t, final C u) {
38 | return getDecision(t, u);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/failsafe/RetryDelaySupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.failsafe;
17 |
18 | import java.util.function.LongSupplier;
19 |
20 | /**
21 | * @author Zoltan Farkas
22 | */
23 | public interface RetryDelaySupplier
24 | extends LongSupplier {
25 |
26 | long nextDelay();
27 |
28 | @Override
29 | default long getAsLong() {
30 | return nextDelay();
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/failsafe/TimedSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.failsafe;
17 |
18 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
19 | import java.util.function.Supplier;
20 |
21 | /**
22 | * @author Zoltan Farkas
23 | */
24 | @FunctionalInterface
25 | public interface TimedSupplier {
26 |
27 | T get(long startTimeNanos, long deadlineNanos);
28 |
29 | static TimedSupplier constant(T value) {
30 | return new TimedSupplier() {
31 | @Override
32 | public T get(final long startTimeNanos, final long deadlineNanos) {
33 | return value;
34 | }
35 |
36 | @Override
37 | public String toString() {
38 | return "ConstTimedSupplier{" + value + '}';
39 | }
40 | };
41 | }
42 |
43 | @SuppressFBWarnings("FII_USE_METHOD_REFERENCE")
44 | static TimedSupplier fromSupplier(Supplier supplier) {
45 | return (s, e) -> supplier.get();
46 | }
47 |
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/failsafe/concurrent/ConditionalConsumer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.failsafe.concurrent;
33 |
34 | /**
35 | *
36 | * @author Zoltan Farkas
37 | */
38 | public interface ConditionalConsumer {
39 |
40 | boolean accept(T what);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/failsafe/concurrent/DefaultFailSafeExecutor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 SPF4J.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.spf4j.failsafe.concurrent;
17 |
18 | import org.spf4j.base.ShutdownThread;
19 | import org.spf4j.concurrent.DefaultExecutor;
20 |
21 | /**
22 | * a default Retry executor.
23 | * @author Zoltan Farkas
24 | */
25 | public final class DefaultFailSafeExecutor {
26 |
27 | private DefaultFailSafeExecutor() { }
28 |
29 | private static final FailSafeExecutorImpl R_EXEC = new FailSafeExecutorImpl(DefaultExecutor.get());
30 |
31 | static {
32 | if (!ShutdownThread.get().queueHook(DefaultExecutor.getShutDownOrder() - 1, () -> {
33 | R_EXEC.initiateClose();
34 | })) {
35 | R_EXEC.initiateClose();
36 | }
37 | }
38 |
39 | /**
40 | * @deprecated use get.
41 | */
42 | @Deprecated
43 | public static FailSafeExecutorImpl instance() {
44 | return R_EXEC;
45 | }
46 |
47 | public static FailSafeExecutorImpl get() {
48 | return R_EXEC;
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/failsafe/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * This package contains operation retry utilities.
3 | *
4 | * Why yet another package?
5 | *
6 | * 1) No Exception lost + ability to propagate checked exceptions (Sync mode only).
7 | * 2) Retry operation can be different from original operation. (redirect, fallback, etc...)
8 | * 3) The retry operation can be executed with delay which can be a function of the response or exception.
9 | * 4) Timeouts are core functionality.
10 | *
11 | */
12 | package org.spf4j.failsafe;
13 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/io/FSWatchEventSensitivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.io;
33 |
34 | /**
35 | *
36 | * @author zoly
37 | */
38 | public enum FSWatchEventSensitivity {
39 | HIGH, MEDIUM, LOW
40 | }
41 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/io/csv/CsvMapHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.io.csv;
33 |
34 | import java.util.Map;
35 |
36 | /**
37 | *
38 | * @author zoly
39 | */
40 | public interface CsvMapHandler {
41 |
42 | void row(Map row);
43 |
44 | T eof();
45 | }
46 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/io/csv/CsvRowHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.io.csv;
33 |
34 | /**
35 | *
36 | * @author zoly
37 | */
38 | public interface CsvRowHandler {
39 |
40 | void element(CharSequence elem);
41 |
42 | T eof();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/io/csv/ElementAppendable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.io.csv;
33 |
34 | import java.io.Closeable;
35 |
36 | /**
37 | *
38 | * @author Zoltan Farkas
39 | */
40 | public interface ElementAppendable extends Appendable, Closeable {
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/io/tcp/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.io.tcp;
33 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/io/tcp/proxy/SnifferFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.io.tcp.proxy;
33 |
34 | import java.nio.channels.SocketChannel;
35 |
36 | /**
37 | *
38 | * @author zoly
39 | */
40 | public interface SnifferFactory {
41 |
42 | Sniffer get(SocketChannel channel);
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/perf/CloseableMeasurementRecorder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.perf;
33 |
34 | /**
35 | *
36 | * @author Zoltan Farkas
37 | */
38 | public interface CloseableMeasurementRecorder extends MeasurementRecorder, AutoCloseable {
39 | @Override
40 | void close();
41 | }
42 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/perf/CloseableMeasurementRecorderSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.perf;
33 |
34 | /**
35 | * @author Zoltan Farkas
36 | */
37 | public interface CloseableMeasurementRecorderSource extends MeasurementRecorderSource, AutoCloseable {
38 | @Override
39 | void close();
40 | }
41 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/perf/JmxSupport.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.perf;
33 |
34 | import java.io.Closeable;
35 |
36 | /**
37 | * a java object that exposes JMX attributes and operations.
38 | * @author Zoltan Farkas
39 | */
40 | public interface JmxSupport extends Closeable {
41 |
42 | void registerJmx();
43 |
44 | void close();
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/spf4j-core/src/main/java/org/spf4j/perf/MeasurementsSource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2001-2017, Zoltan Farkas All Rights Reserved.
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Lesser General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2.1 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Lesser General Public
15 | * License along with this program; if not, write to the Free Software
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 | *
18 | * Additionally licensed with:
19 | *
20 | * Licensed under the Apache License, Version 2.0 (the "License");
21 | * you may not use this file except in compliance with the License.
22 | * You may obtain a copy of the License at
23 | *
24 | * http://www.apache.org/licenses/LICENSE-2.0
25 | *
26 | * Unless required by applicable law or agreed to in writing, software
27 | * distributed under the License is distributed on an "AS IS" BASIS,
28 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 | * See the License for the specific language governing permissions and
30 | * limitations under the License.
31 | */
32 | package org.spf4j.perf;
33 |
34 | import java.util.Map;
35 |
36 | /**
37 | *
38 | * @author zoly
39 | */
40 | public interface MeasurementsSource {
41 |
42 | Map