├── .github ├── dependabot.yml └── workflows │ ├── ci-pr.yml │ ├── deploy-snapshots.yml │ ├── maven-simple.yml │ ├── maven.yml │ ├── schedule-nightly-builds.yml │ └── trivy.yml ├── .gitignore ├── .mvn ├── settings.xml └── wrapper │ └── maven-wrapper.properties ├── .springformat ├── .springjavaformatconfig ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.adoc ├── SECURITY.md ├── THIRD_PARTY_LICENSES.txt ├── THIRD_PARTY_LICENSES_DEV.txt ├── coherence-spring-boot-starter ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ └── boot │ │ │ ├── autoconfigure │ │ │ ├── CachingEnabledCondition.java │ │ │ ├── CoherenceAutoConfiguration.java │ │ │ ├── CoherenceProperties.java │ │ │ ├── data │ │ │ │ ├── CoherenceRepositoriesAutoConfiguration.java │ │ │ │ ├── CoherenceRepositoriesRegistrar.java │ │ │ │ └── package-info.java │ │ │ ├── messaging │ │ │ │ ├── CoherencePublisherAutoConfigurationScanRegistrar.java │ │ │ │ └── package-info.java │ │ │ ├── metrics │ │ │ │ ├── CoherenceMetricsAutoConfiguration.java │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── session │ │ │ │ ├── CoherenceSpringSessionAutoConfiguration.java │ │ │ │ ├── CoherenceSpringSessionCondition.java │ │ │ │ ├── CoherenceSpringSessionProperties.java │ │ │ │ └── package-info.java │ │ │ └── support │ │ │ │ ├── LogType.java │ │ │ │ └── package-info.java │ │ │ └── config │ │ │ ├── CoherenceConfigClientProperties.java │ │ │ ├── CoherenceConfigDataLoader.java │ │ │ ├── CoherenceConfigDataLocationResolver.java │ │ │ ├── CoherenceConfigDataResource.java │ │ │ ├── CoherenceGrpcClient.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ ├── additional-spring-configuration-metadata.json │ │ ├── spring.factories │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── boot │ │ ├── autoconfigure │ │ └── messaging │ │ │ ├── CoherencePublisherAutoConfigurationTests.java │ │ │ └── publishers │ │ │ └── ExamplePublisher.java │ │ ├── config │ │ ├── CoherenceConfigDataLoaderTests.java │ │ ├── CoherenceGrpcClientTests.java │ │ └── GrpcPropertiesTests.java │ │ └── tests │ │ ├── CoherenceAutoConfigurationTests.java │ │ ├── CoherencePropertiesTests.java │ │ ├── CoherenceSpringFactoryTests.java │ │ ├── CoherenceSpringSessionAutoConfigurationTests.java │ │ ├── cache │ │ ├── CacheAbstractionTests.java │ │ └── CacheAbstractionWithPrefixTests.java │ │ ├── data │ │ ├── SpringDataAutoConfigurationTests.java │ │ ├── SpringDataTaskRepository.java │ │ └── Task.java │ │ └── event │ │ ├── CoherenceEventListenerTests.java │ │ ├── TestController.java │ │ └── TestService.java │ └── resources │ ├── application-clientConfigurationTest.yaml │ ├── application-coherenceCacheTests.yaml │ ├── application-coherenceCacheTestsWithPrefix.yaml │ ├── application-coherenceNativePropertiesTests.yaml │ ├── application-coherencePropertiesTests.yaml │ ├── application-coherenceServerStartupTimeoutTest.yaml │ ├── application-custom.properties │ ├── application-grpcSessionTest.yaml │ ├── application-sessionconfiguration.properties │ ├── application.yaml │ ├── grpc-test-coherence-cache-config.xml │ ├── grpc-test-coherence-cache-config2.xml │ ├── logback-test.xml │ └── test-coherence-config.xml ├── coherence-spring-core ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ ├── CoherenceBeanExpressionResolver.java │ │ │ ├── CoherenceContext.java │ │ │ ├── CoherenceInjector.java │ │ │ ├── CoherenceServer.java │ │ │ ├── SpringBasedCoherenceSession.java │ │ │ ├── SpringNamespaceHandler.java │ │ │ ├── annotation │ │ │ ├── AlwaysFilter.java │ │ │ ├── ChainedExtractor.java │ │ │ ├── CoherencePublisher.java │ │ │ ├── CoherencePublisherScan.java │ │ │ ├── CoherenceTopicListener.java │ │ │ ├── CommitStrategy.java │ │ │ ├── ExtractorBinding.java │ │ │ ├── ExtractorFactory.java │ │ │ ├── FilterBinding.java │ │ │ ├── FilterFactory.java │ │ │ ├── MapEventTransformerBinding.java │ │ │ ├── MapEventTransformerFactory.java │ │ │ ├── Name.java │ │ │ ├── PofExtractor.java │ │ │ ├── PropertyExtractor.java │ │ │ ├── SessionName.java │ │ │ ├── SubscriberGroup.java │ │ │ ├── Topic.java │ │ │ ├── Topics.java │ │ │ ├── View.java │ │ │ ├── WhereFilter.java │ │ │ ├── event │ │ │ │ ├── Activated.java │ │ │ │ ├── Activating.java │ │ │ │ ├── Arrived.java │ │ │ │ ├── Assigned.java │ │ │ │ ├── Backlog.java │ │ │ │ ├── CacheName.java │ │ │ │ ├── Committed.java │ │ │ │ ├── Committing.java │ │ │ │ ├── CommittingLocal.java │ │ │ │ ├── CommittingRemote.java │ │ │ │ ├── Connecting.java │ │ │ │ ├── Created.java │ │ │ │ ├── Deleted.java │ │ │ │ ├── Departed.java │ │ │ │ ├── Departing.java │ │ │ │ ├── Destroyed.java │ │ │ │ ├── Disconnected.java │ │ │ │ ├── Disposing.java │ │ │ │ ├── Executed.java │ │ │ │ ├── Executing.java │ │ │ │ ├── Inserted.java │ │ │ │ ├── Inserting.java │ │ │ │ ├── Lite.java │ │ │ │ ├── Lost.java │ │ │ │ ├── MapName.java │ │ │ │ ├── ParticipantName.java │ │ │ │ ├── Processor.java │ │ │ │ ├── Recovered.java │ │ │ │ ├── Removed.java │ │ │ │ ├── Removing.java │ │ │ │ ├── Replicating.java │ │ │ │ ├── Rollback.java │ │ │ │ ├── ScopeName.java │ │ │ │ ├── ServiceName.java │ │ │ │ ├── Started.java │ │ │ │ ├── Starting.java │ │ │ │ ├── Stopped.java │ │ │ │ ├── Stopping.java │ │ │ │ ├── Synced.java │ │ │ │ ├── Synchronous.java │ │ │ │ ├── Syncing.java │ │ │ │ ├── Truncated.java │ │ │ │ ├── Updated.java │ │ │ │ ├── Updating.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── cache │ │ │ ├── CoherenceCache.java │ │ │ ├── CoherenceCacheConfiguration.java │ │ │ ├── CoherenceCacheManager.java │ │ │ └── package-info.java │ │ │ ├── cachestore │ │ │ ├── JpaRepositoryCacheLoader.java │ │ │ ├── JpaRepositoryCacheStore.java │ │ │ └── package-info.java │ │ │ ├── configuration │ │ │ ├── CoherenceConfigurer.java │ │ │ ├── CoherenceConversionServicePostProcessor.java │ │ │ ├── CoherenceSpringConfiguration.java │ │ │ ├── DefaultCoherenceConfigurer.java │ │ │ ├── EnableCoherenceImportBeanDefinitionRegistrar.java │ │ │ ├── ExtractorConfiguration.java │ │ │ ├── ExtractorService.java │ │ │ ├── FilterConfiguration.java │ │ │ ├── FilterService.java │ │ │ ├── LazyTargetSource.java │ │ │ ├── MapEventTransformerConfiguration.java │ │ │ ├── MapEventTransformerService.java │ │ │ ├── NamedCacheConfiguration.java │ │ │ ├── NamedTopicConfiguration.java │ │ │ ├── annotation │ │ │ │ ├── CoherenceAsyncCache.java │ │ │ │ ├── CoherenceAsyncMap.java │ │ │ │ ├── CoherenceCache.java │ │ │ │ ├── CoherenceMap.java │ │ │ │ ├── EnableCoherence.java │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── session │ │ │ │ ├── AbstractSessionConfigurationBean.java │ │ │ │ ├── ClientSessionConfigurationBean.java │ │ │ │ ├── ServerSessionConfigurationBean.java │ │ │ │ ├── SessionConfigurationBean.java │ │ │ │ ├── SessionConfigurationProvider.java │ │ │ │ ├── SessionType.java │ │ │ │ └── package-info.java │ │ │ └── support │ │ │ │ ├── CoherenceAnnotationUtils.java │ │ │ │ ├── CoherenceConfigurerCustomizer.java │ │ │ │ ├── CoherenceGenericConverter.java │ │ │ │ ├── CoherenceInstanceType.java │ │ │ │ ├── CommonExtractorFactories.java │ │ │ │ ├── CommonFilterFactories.java │ │ │ │ ├── SpringSystemPropertyResolver.java │ │ │ │ └── package-info.java │ │ │ ├── event │ │ │ ├── BaseMethodObserver.java │ │ │ ├── CoherenceEventListener.java │ │ │ ├── CoherenceEventListenerCandidates.java │ │ │ ├── CoherenceEventListenerMethodProcessor.java │ │ │ ├── liveevent │ │ │ │ ├── EventHandlerFactory.java │ │ │ │ ├── EventObserverSupport.java │ │ │ │ ├── MethodEventObserver.java │ │ │ │ ├── handler │ │ │ │ │ ├── CacheEventHandler.java │ │ │ │ │ ├── CacheLifecycleEventHandler.java │ │ │ │ │ ├── CoherenceLifecycleEventHandler.java │ │ │ │ │ ├── EntryEventHandler.java │ │ │ │ │ ├── EntryProcessorEventHandler.java │ │ │ │ │ ├── EventHandler.java │ │ │ │ │ ├── FederatedChangeEventHandler.java │ │ │ │ │ ├── FederatedConnectionEventHandler.java │ │ │ │ │ ├── FederatedPartitionEventHandler.java │ │ │ │ │ ├── FederationEventHandler.java │ │ │ │ │ ├── LifecycleEventHandler.java │ │ │ │ │ ├── ServiceEventHandler.java │ │ │ │ │ ├── SessionLifecycleEventHandler.java │ │ │ │ │ ├── TransactionEventHandler.java │ │ │ │ │ ├── TransferEventHandler.java │ │ │ │ │ ├── UnsolicitedCommitEventHandler.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ ├── mapevent │ │ │ │ ├── AnnotatedMapListener.java │ │ │ │ ├── MapEventType.java │ │ │ │ ├── MapListenerRegistrationBean.java │ │ │ │ ├── MethodMapListener.java │ │ │ │ ├── SimpleMapListener.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── messaging │ │ │ ├── CoherencePublisherProxyFactoryBean.java │ │ │ ├── CoherencePublisherRegistrar.java │ │ │ ├── CoherencePublisherScanRegistrar.java │ │ │ ├── CoherenceTopicListenerCandidates.java │ │ │ ├── CoherenceTopicListenerPostProcessor.java │ │ │ ├── CoherenceTopicListenerSubscribers.java │ │ │ ├── CompletableFuturePublisher.java │ │ │ ├── DefaultMethodInvokingMethodInterceptor.java │ │ │ ├── Publishers.java │ │ │ ├── ReactorConversionService.java │ │ │ ├── SubscriberExceptionHandler.java │ │ │ ├── TopicKey.java │ │ │ ├── Utils.java │ │ │ ├── exceptions │ │ │ │ ├── CoherenceSubscriberException.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── namespace │ │ │ ├── BeanBuilder.java │ │ │ ├── BeanProcessor.java │ │ │ ├── NamespaceHandler.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── tracing │ │ │ ├── SpringPropertySource.java │ │ │ └── package-info.java │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ ├── com.oracle.coherence.inject.Injector │ │ │ ├── com.tangosol.coherence.config.SystemPropertyResolver │ │ │ └── com.tangosol.internal.tracing.PropertySource │ │ ├── coherence-spring-config.xsd │ │ └── coherence-spring.properties │ └── test │ ├── java │ ├── com │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ ├── CoherenceContextTests.java │ │ │ ├── CoherenceInjectorTests.java │ │ │ ├── NamedTopicConfigurationTests.java │ │ │ ├── NamedTopicPreDestroyTests.java │ │ │ ├── SpringApplicationConfig.java │ │ │ ├── SpringApplicationTests.java │ │ │ ├── SpringNamespaceHandlerTests.java │ │ │ ├── StubBackingMapListener.java │ │ │ ├── StubInterceptor.java │ │ │ ├── StubNamedCacheStore.java │ │ │ ├── cache │ │ │ ├── CacheManagerUnitTests.java │ │ │ ├── CacheManagerWithCoherenceCacheConfigurationBeanTests.java │ │ │ ├── CoherenceCacheManagerTests.java │ │ │ └── CoherenceCacheTests.java │ │ │ ├── configuration │ │ │ ├── CoherenceNamedCacheConfigurationNamedMapAnnotationTests.java │ │ │ ├── CoherenceNamedCacheConfigurationNamedMapTests.java │ │ │ ├── CoherenceNamedCacheConfigurationTests.java │ │ │ ├── CoherenceNamedCacheConfigurationViewTests.java │ │ │ ├── CoherenceNamespaceHandlerIntegrationTests.java │ │ │ ├── CoherenceSpringConfigurationTests.java │ │ │ ├── ExtractorConfigurationTests.java │ │ │ ├── FilterConfigurationTests.java │ │ │ ├── MapEventTransformerConfigurationTests.java │ │ │ ├── SerializerConfigurationTests.java │ │ │ └── support │ │ │ │ └── CoherenceGenericConverterTests.java │ │ │ ├── event │ │ │ ├── EventHandlerTests.java │ │ │ ├── InterceptorsTests.java │ │ │ ├── MapEventHandlerTests.java │ │ │ └── mapevent │ │ │ │ ├── MapListenerTests.java │ │ │ │ ├── TestListener.java │ │ │ │ ├── UppercaseEntryProcessor.java │ │ │ │ ├── UppercaseName.java │ │ │ │ ├── UppercaseNameTransformer.java │ │ │ │ └── UppercaseTransformerFactory.java │ │ │ ├── messaging │ │ │ ├── CoherencePublisherTests.java │ │ │ └── CoherenceTopicListenerTests.java │ │ │ ├── namespace │ │ │ ├── BeanBuilderTests.java │ │ │ └── NamespaceHandlerTests.java │ │ │ └── session │ │ │ ├── CoherenceExtendTests.java │ │ │ ├── GrpcSessionBeanTests.java │ │ │ └── GrpcSessionTests.java │ └── data │ │ ├── Person.java │ │ └── PhoneNumber.java │ └── resources │ ├── application-context.xml │ ├── coherence-extend-server-cache-config.xml │ ├── coherence-server-junit-extension-cache-config.xml │ ├── extend-core-test-coherence-cache-config-nameservice.xml │ ├── grpc-core-test-coherence-cache-config-nameservice.xml │ ├── log4j2-test.xml │ ├── namespace-handler-test-config.xml │ ├── pof-config.xml │ ├── spring-application-cache-config.xml │ ├── spring-embedded-cache-config.xml │ ├── test-coherence-cache-config.xml │ └── test-coherence-config.xml ├── coherence-spring-data ├── README.adoc ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ └── data │ │ │ ├── config │ │ │ ├── CoherenceMap.java │ │ │ ├── CoherenceRepositoriesRegistrar.java │ │ │ ├── EnableCoherenceRepositories.java │ │ │ └── package-info.java │ │ │ ├── core │ │ │ └── mapping │ │ │ │ ├── CoherenceMappingContext.java │ │ │ │ ├── CoherencePersistentEntity.java │ │ │ │ ├── CoherencePersistentProperty.java │ │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── repository │ │ │ ├── AsyncCrudRepository.java │ │ │ ├── BackingAsyncRepository.java │ │ │ ├── BackingRepository.java │ │ │ ├── CoherenceAsyncRepository.java │ │ │ ├── CoherenceRepository.java │ │ │ ├── ListenerSupport.java │ │ │ ├── package-info.java │ │ │ └── query │ │ │ │ ├── CoherenceQueryCreator.java │ │ │ │ ├── CoherenceRepositoryQuery.java │ │ │ │ ├── QueryResult.java │ │ │ │ ├── QueryState.java │ │ │ │ └── package-info.java │ │ │ └── support │ │ │ ├── CoherenceRepositoryConfigurationExtension.java │ │ │ ├── CoherenceRepositoryFactory.java │ │ │ ├── CoherenceRepositoryFactoryBean.java │ │ │ ├── Utils.java │ │ │ └── package-info.java │ └── resources │ │ └── META-iNF │ │ └── spring.factories │ └── test │ ├── java │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── data │ │ ├── AbstractDataTests.java │ │ ├── model │ │ ├── Address.java │ │ ├── Author.java │ │ ├── Book.java │ │ ├── BookProjection.java │ │ ├── NestedBookProjection.java │ │ ├── NestedOpenBookProjection.java │ │ ├── OpenBookProjection.java │ │ ├── PublicationYearClassProjection.java │ │ └── repositories │ │ │ ├── BookProjectionRepository.java │ │ │ ├── BookRepository.java │ │ │ ├── CoherenceBookAsyncRepository.java │ │ │ └── CoherenceBookRepository.java │ │ ├── query │ │ ├── QueryCreatorTests.java │ │ └── QueryFinderTests.java │ │ └── repository │ │ ├── AsyncRepositoryTests.java │ │ ├── ProjectionTests.java │ │ └── RepositoryTests.java │ └── resources │ └── log4j2-test.xml ├── coherence-spring-docs ├── .java-version ├── pom.xml └── src │ ├── main │ ├── asciidoc │ │ ├── appendix-examples.adoc │ │ ├── appendix.adoc │ │ ├── attributes.adoc │ │ ├── authors.adoc │ │ ├── coherence-spring-reference.pdfadoc │ │ ├── core.adoc │ │ ├── images │ │ │ ├── coherence-logo.svg │ │ │ ├── spring-session-demo-war.png │ │ │ ├── visual-vm-cache-get-value.png │ │ │ └── visual-vm-cache-put.png │ │ ├── index-docinfo.xml │ │ ├── index.htmladoc │ │ ├── index.htmlsingleadoc │ │ ├── js │ │ │ └── toc.js │ │ ├── legal.adoc │ │ ├── overview.adoc │ │ ├── quickstart.adoc │ │ ├── spring-boot.adoc │ │ ├── spring-cache.adoc │ │ ├── spring-cloud-config.adoc │ │ ├── spring-data.adoc │ │ └── spring-session.adoc │ ├── javadoc │ │ └── spring-javadoc.css │ └── xslt │ │ └── dependencyVersions.xsl │ └── test │ ├── java │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── doc │ │ ├── di │ │ ├── viewtransformer │ │ │ ├── PeopleService.java │ │ │ ├── Person.java │ │ │ └── ViewTransformerTests.java │ │ └── wherefilter │ │ │ ├── PeopleService.java │ │ │ ├── Person.java │ │ │ └── WhereFilterTests.java │ │ ├── event │ │ ├── EventHandler.java │ │ ├── Order.java │ │ ├── Person.java │ │ └── PersonEventHandler.java │ │ ├── extractorbinding │ │ ├── ExtractorBindingTests.java │ │ ├── Plant.java │ │ ├── PlantNameExtractor.java │ │ ├── PlantNameExtractorFactory.java │ │ ├── PlantService.java │ │ └── PlantType.java │ │ └── filterbinding │ │ ├── FilterBindingTests.java │ │ ├── LargePalmTrees.java │ │ ├── LargePalmTreesFilterFactory.java │ │ ├── PalmTrees.java │ │ ├── PalmTreesFilterFactory.java │ │ ├── Plant.java │ │ ├── PlantService.java │ │ └── PlantType.java │ └── resources │ └── logback-test.xml ├── coherence-spring-session ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── session │ │ ├── CoherenceIndexedSessionRepository.java │ │ ├── CoherenceSpringSession.java │ │ ├── SessionUpdateEntryProcessor.java │ │ ├── config │ │ └── annotation │ │ │ ├── SpringSessionCoherenceInstance.java │ │ │ ├── package-info.java │ │ │ └── web │ │ │ └── http │ │ │ ├── CoherenceHttpSessionConfiguration.java │ │ │ ├── EnableCoherenceHttpSession.java │ │ │ └── package-info.java │ │ ├── events │ │ ├── CoherenceSessionEventMapListener.java │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── serialization │ │ └── pof │ │ │ ├── AuthenticationPofSerializer.java │ │ │ ├── GrantedAuthorityPofSerializer.java │ │ │ ├── MapSessionPofSerializer.java │ │ │ ├── SecurityContextPofSerializer.java │ │ │ └── package-info.java │ │ └── support │ │ ├── PrincipalNameExtractor.java │ │ ├── SessionDebugMessageUtils.java │ │ ├── SessionEvent.java │ │ └── package-info.java │ └── test │ ├── java │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── session │ │ ├── AbstractCoherenceIndexedSessionRepositoryTests.java │ │ ├── AbstractSessionEventTests.java │ │ ├── CoherenceIndexedSessionRepositoryTests.java │ │ ├── CoherenceIndexedSessionRepositoryWithoutEntryProcessorTests.java │ │ ├── CustomSessionIdGeneratorTests.java │ │ ├── DefaultSessionEventTests.java │ │ ├── ExtendSessionCoherenceIndexedSessionRepositoryTests.java │ │ ├── FoobarSessionEventTests.java │ │ ├── GrpcSessionCoherenceIndexedSessionRepositoryTests.java │ │ ├── PofCoherenceIndexedSessionRepositoryTests.java │ │ └── support │ │ ├── FixedSessionIdGenerator.java │ │ ├── MyHttpSessionListener.java │ │ └── SessionEventApplicationListener.java │ └── resources │ ├── client-coherence-cache-config.xml │ ├── coherence-cache-config.xml │ ├── grpc-test-coherence-cache-config.xml │ ├── log4j2-test.xml │ ├── pof-config.xml │ └── server-coherence-cache-config.xml ├── coherence-spring-site ├── README.adoc ├── docs │ ├── about │ │ ├── 01_overview.adoc │ │ └── 02_spring-boot.adoc │ ├── css │ │ └── styles.css │ ├── dev │ │ ├── 01_license.adoc │ │ ├── 02_source-code.adoc │ │ ├── 03_build-instructions.adoc │ │ ├── 04_issue-tracking.adoc │ │ ├── 05_contributions.adoc │ │ ├── 06_history.adoc │ │ └── 07_getting-help.adoc │ └── images │ │ ├── GitHub-Mark-64px.png │ │ ├── logo-with-padding.svg │ │ └── logo.svg ├── pom.xml └── sitegen.yaml ├── coherence-spring-tests ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ ├── event │ │ ├── EventsHelper.java │ │ └── package-info.java │ │ └── test │ │ ├── junit │ │ ├── CoherenceServerJunitExtension.java │ │ └── package-info.java │ │ └── utils │ │ ├── IsGrpcProxyRunning.java │ │ ├── NetworkUtils.java │ │ └── package-info.java │ └── resources │ └── coherence-server-junit-extension-cache-config.xml ├── documents └── spring-coding-convention.xjs ├── lib ├── spring-asciidoctor-extensions-block-switch-0.5.0.jar ├── spring-asciidoctor-extensions-spring-boot-0.5.0.jar └── spring-doc-resources-0.2.5.zip ├── mvnw ├── mvnw.cmd ├── pom.xml ├── rules.xml ├── samples ├── cachestore-demo │ ├── README.adoc │ ├── coherence-spring-cachestore-demo-app │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── oracle │ │ │ │ │ └── coherence │ │ │ │ │ └── spring │ │ │ │ │ └── example │ │ │ │ │ ├── CacheStoreDemo.java │ │ │ │ │ └── controller │ │ │ │ │ └── PersonController.java │ │ │ └── resources │ │ │ │ ├── application-remote.yml │ │ │ │ ├── application.yml │ │ │ │ ├── coherence-cache-config.xml │ │ │ │ └── remote-cache-config.xml │ │ │ └── test │ │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── example │ │ │ │ ├── CacheStoreDemoIT.java │ │ │ │ └── IsSpringUp.java │ │ │ └── resources │ │ │ ├── application.yml │ │ │ └── client-cache-config.xml │ ├── coherence-spring-cachestore-demo-core │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ └── example │ │ │ └── model │ │ │ ├── Person.java │ │ │ └── PersonRepository.java │ ├── coherence-spring-cachestore-demo-server │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── example │ │ │ │ ├── CoherenceServerApplication.java │ │ │ │ └── config │ │ │ │ └── DatabaseConfig.java │ │ │ └── resources │ │ │ ├── application.yml │ │ │ └── coherence-cache-config.xml │ └── pom.xml ├── circuit-breaker-cache-demo │ ├── README.adoc │ ├── circuit-breaker-cache-demo-app │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── oracle │ │ │ │ │ └── coherence │ │ │ │ │ └── spring │ │ │ │ │ └── samples │ │ │ │ │ └── circuitbreaker │ │ │ │ │ ├── CircuitBreakerApplication.java │ │ │ │ │ ├── config │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── controller │ │ │ │ │ ├── BookController.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── dao │ │ │ │ │ ├── BookRepository.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── model │ │ │ │ │ ├── Book.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── package-info.java │ │ │ │ │ └── service │ │ │ │ │ ├── BookService.java │ │ │ │ │ ├── impl │ │ │ │ │ ├── BusinessException.java │ │ │ │ │ ├── DefaultBookService.java │ │ │ │ │ └── package-info.java │ │ │ │ │ └── package-info.java │ │ │ └── resources │ │ │ │ ├── application-coherence-client.yaml │ │ │ │ ├── application.yaml │ │ │ │ └── coherence-cache-config.xml │ │ │ └── test │ │ │ └── resources │ │ │ └── logback-test.xml │ ├── circuit-breaker-cache-demo-server │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── oracle │ │ │ │ │ └── coherence │ │ │ │ │ └── spring │ │ │ │ │ └── samples │ │ │ │ │ └── circuitbreaker │ │ │ │ │ ├── CoherenceServerApplication.java │ │ │ │ │ └── package-info.java │ │ │ └── resources │ │ │ │ ├── application.yml │ │ │ │ └── coherence-cache-config.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ └── samples │ │ │ └── circuitbreaker │ │ │ └── CoherenceServerApplicationTests.java │ └── pom.xml ├── coherence-spring-cloud-config-demo │ ├── coherence-spring-cloud-config-demo-app │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── oracle │ │ │ │ │ └── coherence │ │ │ │ │ └── spring │ │ │ │ │ └── demo │ │ │ │ │ ├── CoherenceApp.java │ │ │ │ │ ├── configuration │ │ │ │ │ ├── CacheConfiguration.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── controller │ │ │ │ │ ├── EventController.java │ │ │ │ │ ├── PersonController.java │ │ │ │ │ ├── StatisticsController.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── dao │ │ │ │ │ ├── EventRepository.java │ │ │ │ │ ├── PersonRepository.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── model │ │ │ │ │ ├── Event.java │ │ │ │ │ ├── Person.java │ │ │ │ │ └── package-info.java │ │ │ │ │ └── service │ │ │ │ │ ├── EventService.java │ │ │ │ │ ├── PersonService.java │ │ │ │ │ ├── impl │ │ │ │ │ ├── DefaultEventService.java │ │ │ │ │ ├── DefaultPersonService.java │ │ │ │ │ └── package-info.java │ │ │ │ │ └── package-info.java │ │ │ └── resources │ │ │ │ ├── application.yml │ │ │ │ └── spring-coherence-cache-config.xml │ │ │ └── test │ │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── demo │ │ │ │ └── CoherenceAppTests.java │ │ │ └── resources │ │ │ └── logback-test.xml │ ├── coherence-spring-cloud-config-demo-server │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── oracle │ │ │ │ │ └── coherence │ │ │ │ │ └── spring │ │ │ │ │ └── config │ │ │ │ │ └── SpringCloudConfigServer.java │ │ │ └── resources │ │ │ │ └── application.yml │ │ │ └── test │ │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── config │ │ │ │ └── SpringCloudConfigServerTests.java │ │ │ └── resources │ │ │ └── logback-test.xml │ └── pom.xml ├── coherence-spring-demo │ ├── README.adoc │ ├── coherence-spring-demo-boot │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── oracle │ │ │ │ │ └── coherence │ │ │ │ │ └── spring │ │ │ │ │ └── demo │ │ │ │ │ ├── CoherenceSpringBootDemoApplication.java │ │ │ │ │ └── configuration │ │ │ │ │ ├── CacheConfiguration.java │ │ │ │ │ └── package-info.java │ │ │ └── resources │ │ │ │ ├── application.yml │ │ │ │ └── spring-coherence-cache-config.xml │ │ │ └── test │ │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── demo │ │ │ │ └── SpringDemoApplicationTests.java │ │ │ └── resources │ │ │ └── logback-test.xml │ ├── coherence-spring-demo-classic │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── oracle │ │ │ │ │ └── coherence │ │ │ │ │ └── spring │ │ │ │ │ └── demo │ │ │ │ │ ├── config │ │ │ │ │ ├── AppConfig.java │ │ │ │ │ └── WebMvcConfig.java │ │ │ │ │ ├── configuration │ │ │ │ │ ├── CacheConfiguration.java │ │ │ │ │ └── package-info.java │ │ │ │ │ ├── initializer │ │ │ │ │ └── AppInitializer.java │ │ │ │ │ └── tomcat │ │ │ │ │ └── Server.java │ │ │ ├── resources │ │ │ │ ├── .gitkeep │ │ │ │ └── log4j2.xml │ │ │ └── webapp │ │ │ │ └── .gitkeep │ │ │ └── test │ │ │ └── resources │ │ │ └── .gitkeep │ ├── coherence-spring-demo-core │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ └── demo │ │ │ ├── controller │ │ │ ├── EventController.java │ │ │ ├── PersonController.java │ │ │ └── package-info.java │ │ │ ├── dao │ │ │ ├── EventRepository.java │ │ │ ├── PersonRepository.java │ │ │ └── package-info.java │ │ │ ├── model │ │ │ ├── Event.java │ │ │ ├── Person.java │ │ │ └── package-info.java │ │ │ └── service │ │ │ ├── EventService.java │ │ │ ├── PersonService.java │ │ │ ├── impl │ │ │ ├── DefaultEventService.java │ │ │ ├── DefaultPersonService.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ ├── pom.xml │ └── src │ │ └── main │ │ └── resources │ │ └── spring-applicationContext.xml ├── hibernate-cache-demo │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── samples │ │ │ │ └── hibernate │ │ │ │ ├── HibernateApplication.java │ │ │ │ ├── controller │ │ │ │ ├── PlantController.java │ │ │ │ └── package-info.java │ │ │ │ ├── dao │ │ │ │ ├── PlantRepository.java │ │ │ │ └── package-info.java │ │ │ │ ├── dto │ │ │ │ ├── PlantDto.java │ │ │ │ └── package-info.java │ │ │ │ ├── model │ │ │ │ ├── Plant.java │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── application.yaml │ │ └── test │ │ └── java │ │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── samples │ │ └── hibernate │ │ └── HibernateApplicationTests.java ├── pom.xml └── spring-session-demo │ ├── README.adoc │ ├── pom.xml │ ├── spring-session-demo-app │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── samples │ │ │ │ └── session │ │ │ │ ├── SpringSessionApplication.java │ │ │ │ ├── config │ │ │ │ ├── SecurityConfig.java │ │ │ │ ├── SpringSessionConfig.java │ │ │ │ └── package-info.java │ │ │ │ ├── controller │ │ │ │ ├── HelloController.java │ │ │ │ └── package-info.java │ │ │ │ ├── filter │ │ │ │ ├── AuthenticationRequest.java │ │ │ │ ├── JsonUsernamePasswordAuthenticationFilter.java │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ ├── application-coherence-client.yaml │ │ │ ├── application.yaml │ │ │ ├── coherence-cache-config.xml │ │ │ └── remote-cache-config.xml │ │ └── test │ │ ├── java │ │ └── com │ │ │ └── oracle │ │ │ └── coherence │ │ │ └── spring │ │ │ └── samples │ │ │ └── session │ │ │ ├── RestTests.java │ │ │ ├── SessionTimeoutTests.java │ │ │ └── SpringSessionApplicationTests.java │ │ └── resources │ │ └── logback-test.xml │ ├── spring-session-demo-server │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── oracle │ │ │ │ └── coherence │ │ │ │ └── spring │ │ │ │ └── samples │ │ │ │ └── session │ │ │ │ ├── CoherenceServerApplication.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ ├── application-pof.yml │ │ │ ├── application.yml │ │ │ ├── coherence-cache-config-pof.xml │ │ │ ├── coherence-cache-config.xml │ │ │ └── pof-config.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── samples │ │ └── session │ │ └── CoherenceServerApplicationTests.java │ └── spring-session-demo-war │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── com │ │ └── oracle │ │ └── coherence │ │ └── spring │ │ └── samples │ │ └── session │ │ ├── config │ │ ├── AppConfig.java │ │ ├── CoherenceSessionConfig.java │ │ ├── WebMvcConfig.java │ │ └── package-info.java │ │ ├── controller │ │ ├── HelloController.java │ │ └── package-info.java │ │ └── initializer │ │ ├── AppInitializer.java │ │ └── package-info.java │ ├── resources │ ├── coherence-spring.properties │ ├── log4j2.xml │ ├── pof-config.xml │ └── remote-cache-config.xml │ └── webapp │ └── WEB-INF │ └── view │ └── hello.jsp └── src ├── checkstyle └── checkstyle.xml └── main └── config └── dependency-check-suppression.xml /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | - package-ecosystem: "maven" 8 | directory: "/" 9 | schedule: 10 | interval: "weekly" 11 | - package-ecosystem: "github-actions" 12 | directory: "/" 13 | schedule: 14 | interval: "weekly" 15 | target-branch: 3.x 16 | - package-ecosystem: "maven" 17 | directory: "/" 18 | schedule: 19 | interval: "weekly" 20 | target-branch: 3.x 21 | -------------------------------------------------------------------------------- /.github/workflows/schedule-nightly-builds.yml: -------------------------------------------------------------------------------- 1 | name: Schedule Nightly Builds 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: "0 5 * * *" 7 | jobs: 8 | schedule: 9 | runs-on: ubuntu-latest 10 | strategy: 11 | matrix: 12 | branch: [main, 3.x] 13 | steps: 14 | - uses: benc-uk/workflow-dispatch@v1.2.4 15 | with: 16 | workflow: CI Coherence Spring 17 | ref: ${{ matrix.branch }} 18 | -------------------------------------------------------------------------------- /.github/workflows/trivy.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2023 Oracle Corporation and/or its affiliates. 2 | # Licensed under the Universal Permissive License v 1.0 as shown at 3 | # https://oss.oracle.com/licenses/upl. 4 | 5 | name: Scheduled Trivy Scan 6 | on: 7 | workflow_dispatch: 8 | schedule: 9 | # Every day at midnight 10 | - cron: '0 0 * * *' 11 | jobs: 12 | trivy-scan: 13 | name: trivy 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v4 17 | - name: Run static analysis 18 | uses: aquasecurity/trivy-action@0.30.0 19 | with: 20 | scan-type: 'fs' 21 | ignore-unfixed: true 22 | format: 'sarif' 23 | output: 'trivy-results.sarif' 24 | severity: 'CRITICAL,HIGH' 25 | - name: Upload Trivy scan results to GitHub Security tab 26 | uses: github/codeql-action/upload-sarif@v3 27 | with: 28 | sarif_file: 'trivy-results.sarif' 29 | category: 'code' 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | *.log 3 | *.swp 4 | 5 | # Package Files # 6 | *.jar 7 | *.war 8 | *.ear 9 | 10 | 11 | # Build Folders # 12 | .settings/ 13 | target/ 14 | 15 | # IDE-specific Files # 16 | .classpath 17 | .project 18 | .idea 19 | *.iml 20 | 21 | .DS_Store 22 | .factorypath 23 | .java-version 24 | *.iml 25 | *slf4j2 26 | .vscode/ 27 | .flattened-pom.xml -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.2 18 | distributionType=only-script 19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip 20 | -------------------------------------------------------------------------------- /.springformat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/.springformat -------------------------------------------------------------------------------- /.springjavaformatconfig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/java/com/oracle/coherence/spring/boot/autoconfigure/data/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Auto-configuration support for Spring Data. 3 | */ 4 | package com.oracle.coherence.spring.boot.autoconfigure.data; 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/java/com/oracle/coherence/spring/boot/autoconfigure/messaging/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Auto-configuration support for messaging. 3 | */ 4 | package com.oracle.coherence.spring.boot.autoconfigure.messaging; 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/java/com/oracle/coherence/spring/boot/autoconfigure/metrics/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Auto-configuration support for {@link com.oracle.coherence.micrometer.CoherenceMicrometerMetrics}. 3 | */ 4 | package com.oracle.coherence.spring.boot.autoconfigure.metrics; 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/java/com/oracle/coherence/spring/boot/autoconfigure/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides auto configuration for Spring Boot. 3 | */ 4 | package com.oracle.coherence.spring.boot.autoconfigure; 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/java/com/oracle/coherence/spring/boot/autoconfigure/session/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Auto-configuration support for Spring Session. 3 | */ 4 | package com.oracle.coherence.spring.boot.autoconfigure.session; 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/java/com/oracle/coherence/spring/boot/autoconfigure/support/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Classes supporting the {@code com.oracle.coherence.spring.boot.autoconfigure} package. 3 | */ 4 | package com.oracle.coherence.spring.boot.autoconfigure.support; 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/java/com/oracle/coherence/spring/boot/config/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides support for Spring Boot's ConfigData API. 3 | */ 4 | package com.oracle.coherence.spring.boot.config; 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "coherence.spring.session.enabled", 5 | "type": "java.lang.Boolean", 6 | "description": "Enables Coherence integration.", 7 | "defaultValue": true 8 | }, 9 | { 10 | "name": "coherence.spring.data.repositories.enabled", 11 | "type": "java.lang.Boolean", 12 | "description": "Whether to enable Coherence data repositories.", 13 | "defaultValue": true 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | # ConfigData Resolver 2 | org.springframework.boot.context.config.ConfigDataLocationResolver=\ 3 | com.oracle.coherence.spring.boot.config.CoherenceConfigDataLocationResolver 4 | 5 | # ConfigData Loader 6 | org.springframework.boot.context.config.ConfigDataLoader=\ 7 | com.oracle.coherence.spring.boot.config.CoherenceConfigDataLoader 8 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | com.oracle.coherence.spring.boot.autoconfigure.CoherenceAutoConfiguration 2 | com.oracle.coherence.spring.boot.autoconfigure.session.CoherenceSpringSessionAutoConfiguration 3 | com.oracle.coherence.spring.boot.autoconfigure.metrics.CoherenceMetricsAutoConfiguration 4 | com.oracle.coherence.spring.boot.autoconfigure.data.CoherenceRepositoriesAutoConfiguration -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/java/com/oracle/coherence/spring/boot/autoconfigure/messaging/publishers/ExamplePublisher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.boot.autoconfigure.messaging.publishers; 8 | 9 | import com.oracle.coherence.spring.annotation.CoherencePublisher; 10 | 11 | @CoherencePublisher 12 | public interface ExamplePublisher { 13 | } 14 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/java/com/oracle/coherence/spring/boot/tests/data/SpringDataTaskRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.boot.tests.data; 8 | 9 | import com.oracle.coherence.spring.data.repository.CoherenceRepository; 10 | 11 | /** 12 | * A {@code Coherence}-bases repository for working with {@link Task tasks}. 13 | * @author Gunnar Hillert 14 | */ 15 | @com.oracle.coherence.spring.data.config.CoherenceMap("tasks") 16 | public interface SpringDataTaskRepository extends CoherenceRepository { 17 | } 18 | 19 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/java/com/oracle/coherence/spring/boot/tests/event/TestService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.boot.tests.event; 8 | 9 | import java.util.ArrayList; 10 | import java.util.Collections; 11 | import java.util.List; 12 | 13 | import org.springframework.stereotype.Service; 14 | 15 | /** 16 | * 17 | * @author Gunnar Hillert 18 | * 19 | */ 20 | @Service 21 | public class TestService { 22 | final List eventNames = Collections.synchronizedList(new ArrayList<>()); 23 | 24 | public void addEventName(String eventName) { 25 | this.eventNames.add(eventName); 26 | } 27 | 28 | public List getEventNames() { 29 | return this.eventNames; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-clientConfigurationTest.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | client: 4 | - name: grpc-session 5 | 6 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-coherenceCacheTests.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | cache: 3 | time-to-live: 1s 4 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-coherenceCacheTestsWithPrefix.yaml: -------------------------------------------------------------------------------- 1 | 2 | coherence: 3 | cache: 4 | time-to-live: 0s 5 | cache-name-prefix: "${spring.application.name}_" 6 | use-cache-name-prefix: true 7 | spring: 8 | application: 9 | name: FooTesting 10 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-coherenceNativePropertiesTests.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | server: 4 | - name: default 5 | config: "coherence-cache-config.xml" 6 | priority: 1 7 | scope-name: fooscope 8 | - name: test 9 | config: "test-coherence-config.xml" 10 | priority: 2 11 | scope-name: barscope 12 | - config: "test-coherence-config.xml" 13 | scope-name: myscope 14 | properties: 15 | coherence.log.limit: 444 16 | coherence.log.level: 1 17 | coherence.log.logger: CoherenceSpring 18 | coherence.log: jdk 19 | coherence.log.format: foobar 20 | property-prefix: "coherence.properties." 21 | 22 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-coherencePropertiesTests.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | logging: 3 | destination: slf4j 4 | logger-name: testing 5 | character-limit: 123 6 | message-format: "Testing: {date}/{uptime} {product} {version} <{level}> (thread={thread}, member={member}): {text}" 7 | severity-level: 5 8 | sessions: 9 | server: 10 | - name: default 11 | config: "coherence-cache-config.xml" 12 | priority: 1 13 | scope-name: fooscope 14 | - name: test 15 | config: "test-coherence-config.xml" 16 | priority: 2 17 | scope-name: barscope 18 | - config: "test-coherence-config.xml" 19 | scope-name: myscope 20 | client: 21 | - name: coherence-extend 22 | config: "coherence-cache-config.xml" 23 | priority: 3 24 | scope-name: client-scope 25 | - name: grpc-session 26 | properties: 27 | coherence.log.limit: 444 28 | coherence.log.level: 1 29 | coherence.log.logger: CoherenceSpring 30 | coherence.log: log4j 31 | coherence.log.format: foobar 32 | property-prefix: "coherence.properties." 33 | instance: 34 | type: client 35 | server: 36 | startup-timeout: 78901ms 37 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-coherenceServerStartupTimeoutTest.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | client: 4 | - name: default 5 | config: "coherence-cache-config.xml" 6 | priority: 1 7 | scope-name: fooscope 8 | server: 9 | startup-timeout: 4m 10 | 11 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-custom.properties: -------------------------------------------------------------------------------- 1 | foo=bar 2 | spring.config.import=coherence: 3 | coherence.config-client.application-name=berlin 4 | coherence.config-client.profile=kona 5 | coherence.config-client.cache-config=grpc-test-coherence-cache-config.xml 6 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-grpcSessionTest.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | client: 4 | - name: grpc-session 5 | 6 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application-sessionconfiguration.properties: -------------------------------------------------------------------------------- 1 | coherence.sessions.server[0].name=MySession 2 | coherence.sessions.server[0].config=test-coherence-config.xml 3 | coherence.sessions.server[1].config=test-coherence-config.xml 4 | coherence.sessions.server[1].scope-name=fooscope 5 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 3000 3 | spring: 4 | application: 5 | name: todo-list-spring-server 6 | debug: false 7 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/grpc-test-coherence-cache-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 15 | test 16 | remote-grpc 17 | 18 | 19 | 20 | 21 | berlin-kona 22 | remote-grpc 23 | 24 | 25 | 26 | 27 | 28 | remote-grpc 29 | RemoteGrpcCache 30 | CoherenceGrpcClientTestsCluster 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /coherence-spring-boot-starter/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/CoherenceInjector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring; 8 | 9 | import java.util.Objects; 10 | 11 | import com.oracle.coherence.inject.Injector; 12 | 13 | import org.springframework.beans.factory.config.AutowireCapableBeanFactory; 14 | import org.springframework.context.ApplicationContext; 15 | 16 | /** 17 | * {@link Injector} to allow the dependency injection of Spring beans 18 | * into objects being deserialized and manipulated by cache operations. 19 | * 20 | * @author Ryan Lubke 21 | * @since 3.0 22 | */ 23 | public class CoherenceInjector implements Injector { 24 | 25 | @Override 26 | public void inject(Object target) { 27 | ApplicationContext ctx = CoherenceContext.getApplicationContext(); 28 | 29 | Objects.requireNonNull(ctx, "Unable to local ApplicationContext"); 30 | 31 | AutowireCapableBeanFactory factory = ctx.getAutowireCapableBeanFactory(); 32 | factory.autowireBean(target); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/AlwaysFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Inherited; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | 14 | /** 15 | * A {@link FilterBinding} annotation representing an 16 | * {@link com.tangosol.util.filter.AlwaysFilter}. 17 | * 18 | * @author Gunnar Hillert 19 | * @since 3.0 20 | */ 21 | @FilterBinding 22 | @Inherited 23 | @Documented 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface AlwaysFilter { 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/CoherenceTopicListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.ElementType; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.Target; 13 | 14 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 15 | 16 | /** 17 | *

Annotation applied at the class level to indicate that a bean is a Coherence 18 | * topic {@link com.tangosol.net.topic.Subscriber}.

19 | * 20 | * @author Jonathan Knight 21 | * @since 3.0 22 | */ 23 | @Documented 24 | @Retention(RUNTIME) 25 | @Target({ElementType.TYPE, ElementType.METHOD, ElementType.ANNOTATION_TYPE}) 26 | public @interface CoherenceTopicListener { 27 | /** 28 | * The {@link CommitStrategy} to use for the subscriber. 29 | * 30 | * @return The {@link CommitStrategy} 31 | */ 32 | CommitStrategy commitStrategy() default CommitStrategy.SYNC; 33 | } 34 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/Name.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.ElementType; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | import java.lang.annotation.Target; 14 | 15 | /** 16 | * An annotation used when injecting Coherence resource to indicate a 17 | * specific resource name. 18 | * 19 | * @author Jonathan Knight 20 | * @author Gunnar Hillert 21 | */ 22 | @Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER}) 23 | @Retention(RetentionPolicy.RUNTIME) 24 | @Documented 25 | public @interface Name { 26 | 27 | /** 28 | * The name used to identify a specific resource. 29 | * 30 | * @return the name used to identify a specific resource 31 | */ 32 | String value() default ""; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/SessionName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.ElementType; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | import java.lang.annotation.Target; 14 | 15 | import com.tangosol.net.Coherence; 16 | 17 | /** 18 | * A qualifier annotation used when injecting Coherence resource to indicate a 19 | * specific Session name. 20 | * 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Documented 25 | @Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE}) 26 | @Retention(RetentionPolicy.RUNTIME) 27 | public @interface SessionName { 28 | /** 29 | * The name used to identify a specific session. 30 | * @return the name used to identify a specific session 31 | */ 32 | String value() default Coherence.DEFAULT_NAME; 33 | } 34 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/SubscriberGroup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used when injecting {@link com.tangosol.net.topic.Subscriber} 15 | * to a {@link com.tangosol.net.topic.NamedTopic} to indicate the name of the 16 | * subscriber group that the subscriber should belong to. 17 | * 18 | * @author Vaso Putica 19 | * @since 3.0 20 | */ 21 | @Documented 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface SubscriberGroup { 24 | 25 | /** 26 | * The name of the subscriber group. 27 | * @return the name of the subscriber group 28 | */ 29 | String value(); 30 | } 31 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/Topic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.ElementType; 11 | import java.lang.annotation.Repeatable; 12 | import java.lang.annotation.Retention; 13 | import java.lang.annotation.RetentionPolicy; 14 | import java.lang.annotation.Target; 15 | 16 | /** 17 | * An annotation used to specify a topic name. 18 | * 19 | * @author Vaso Putica 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | @Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE}) 25 | @Repeatable(Topics.class) 26 | public @interface Topic { 27 | /** 28 | * Name of the topic to subscribe to. 29 | * @return The topic to subscribe to 30 | */ 31 | String value() default ""; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/Topics.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.ElementType; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | import java.lang.annotation.Target; 14 | 15 | /** 16 | * Repeatable annotation for one or many {@link Topic} annotations. 17 | * 18 | * @author Vaso Putica 19 | * @since 3.0 20 | */ 21 | @Documented 22 | @Retention(RetentionPolicy.RUNTIME) 23 | @Target({ElementType.METHOD, ElementType.TYPE}) 24 | public @interface Topics { 25 | 26 | /** 27 | * Names of the topics to subscribe to. 28 | * @return The Topics specified 29 | */ 30 | Topic[] value() default {}; 31 | } 32 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/View.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used when injecting a cache view. 15 | * 16 | * @author Gunnar Hillert 17 | * @since 3.0 18 | */ 19 | @Documented 20 | @Retention(RetentionPolicy.RUNTIME) 21 | public @interface View { 22 | /** 23 | * A flag that is {@code true} to cache both the keys and values of the 24 | * materialized view locally, or {@code false} to only cache the keys (the 25 | * default value is {@code true}). 26 | * 27 | * @return {@code true} to indicate that values should be cached or 28 | * {@code false} to indicate that only keys should be cached 29 | */ 30 | boolean cacheValues() default true; 31 | } 32 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/WhereFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Inherited; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | 14 | /** 15 | * A {@link FilterBinding} annotation representing a 16 | * {@link com.tangosol.util.Filter} produced from a CohQL where clause. 17 | * 18 | * @author Gunnar Hillert 19 | * @since 3.0 20 | */ 21 | @Inherited 22 | @FilterBinding 23 | @Documented 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface WhereFilter { 26 | /** 27 | * The CohQL query expression. 28 | * 29 | * @return the CohQL query expression 30 | */ 31 | String value(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Activated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.application.LifecycleEvent.Type#ACTIVATED ACTIVATED} 16 | * {@link com.tangosol.net.events.application.LifecycleEvent LifecycleEvents}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Activated { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Activating.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.application.LifecycleEvent.Type#ACTIVATING ACTIVATING} 16 | * {@link com.tangosol.net.events.application.LifecycleEvent LifecycleEvents}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Activating { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Arrived.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransferEvent.Type#ASSIGNED ASSIGNED} 16 | * {@link com.tangosol.net.events.partition.TransferEvent TransferEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Arrived { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Assigned.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransferEvent.Type#ARRIVED ARRIVED} 16 | * {@link com.tangosol.net.events.partition.TransferEvent TransferEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Assigned { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/CacheName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to indicate a specific cache name. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface CacheName { 23 | /** 24 | * Obtain the value used to identify a specific cache. 25 | * 26 | * @return value used to identify a specific cache 27 | */ 28 | String value(); 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Committed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransactionEvent.Type#COMMITTED COMMITTED} 16 | * {@link com.tangosol.net.events.partition.TransactionEvent TransactionEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Committed { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Committing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransactionEvent.Type#COMMITTING COMMITTING} 16 | * {@link com.tangosol.net.events.partition.TransactionEvent TransactionEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Committing { 25 | 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/CommittingLocal.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any COMMITTING_LOCAL event. 15 | * 16 | * @author Aleks Seovic 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface CommittingLocal { 23 | } 24 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/CommittingRemote.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any COMMITTING_REMOTE event. 15 | * 16 | * @author Aleks Seovic 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface CommittingRemote { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Connecting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any CONNECTING event. 15 | * 16 | * @author Aleks Seovic 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Connecting { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Created.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.cache.CacheLifecycleEvent.Type#CREATED CREATED} 16 | * {@link com.tangosol.net.events.partition.cache.CacheLifecycleEvent CacheLifecycleEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Created { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Deleted.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.util.MapEvent MapEvents} of type 16 | * {@link com.tangosol.util.MapEvent#ENTRY_DELETED}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Deleted { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Departed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransferEvent.Type#DEPARTED DEPARTED} 16 | * {@link com.tangosol.net.events.partition.TransferEvent TransferEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Departed { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Departing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransferEvent.Type#DEPARTING DEPARTING} 16 | * {@link com.tangosol.net.events.partition.TransferEvent TransferEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Departing { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Destroyed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.cache.CacheLifecycleEvent.Type#DESTROYED DESTROYED} 16 | * {@link com.tangosol.net.events.partition.cache.CacheLifecycleEvent CacheLifecycleEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Destroyed { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Disconnected.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any DISCONNECTED event. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Disconnected { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Disposing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.application.LifecycleEvent.Type#DISPOSING DISPOSING} 16 | * {@link com.tangosol.net.events.application.LifecycleEvent LifecycleEvents}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Disposing { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Executed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any EXECUTED event. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Executed { 23 | } 24 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Executing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any EXECUTING event. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Executing { 23 | } 24 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Inserted.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.util.MapEvent MapEvents} of type 16 | * {@link com.tangosol.util.MapEvent#ENTRY_INSERTED} or that will receive 17 | * {@link com.tangosol.net.events.partition.cache.EntryEvent EntryEvents} of type 18 | * {@link com.tangosol.net.events.partition.cache.EntryEvent.Type#INSERTED INSERTED}. 19 | * 20 | * @author Jonathan Knight 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface Inserted { 27 | } 28 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Inserting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.cache.EntryEvent EntryEvents} of type 16 | * {@link com.tangosol.net.events.partition.cache.EntryEvent.Type#INSERTING INSERTING}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Inserting { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Lite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation that can be applied to {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that receive {@link com.tangosol.util.MapEvent MapEvents} 16 | * to register them as lite listeners. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Lite { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Lost.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransferEvent TransferEvents} of type 16 | * {@link com.tangosol.net.events.partition.TransferEvent.Type#LOST LOST}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Lost { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/MapName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to indicate a specific map name. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface MapName { 23 | /** 24 | * Obtain the value used to identify a specific map. 25 | * 26 | * @return value used to identify a specific map 27 | */ 28 | String value(); 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/ParticipantName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to indicate a specific participant name. 15 | * 16 | * @author Aleks Seovic 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface ParticipantName { 23 | /** 24 | * The participant name. 25 | * 26 | * @return the participant name 27 | */ 28 | String value(); 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Recovered.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransferEvent TransferEvents} of type 16 | * {@link com.tangosol.net.events.partition.TransferEvent.Type#RECOVERED RECOVERED}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Recovered { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Removed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.cache.EntryEvent EntryEvents} of type 16 | * {@link com.tangosol.net.events.partition.cache.EntryEvent.Type#REMOVED REMOVED}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Removed { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Removing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.cache.EntryEvent EntryEvents} of type 16 | * {@link com.tangosol.net.events.partition.cache.EntryEvent.Type#REMOVING REMOVING}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Removing { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Replicating.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any REPLICATING event. 15 | * 16 | * @author Aleks Seovic 2020.04.13 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Replicating { 23 | } 24 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Rollback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.TransferEvent TransferEvents} of type 16 | * {@link com.tangosol.net.events.partition.TransferEvent.Type#ROLLBACK ROLLBACK}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Rollback { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/ScopeName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to indicate a specific scope name. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface ScopeName { 23 | /** 24 | * Obtain the value used to identify a specific scope. 25 | * 26 | * @return value used to identify a specific scope 27 | */ 28 | String value(); 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/ServiceName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to indicate a specific service name. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface ServiceName { 23 | /** 24 | * The value used to identify a specific service. 25 | * 26 | * @return the value used to identify a specific service 27 | */ 28 | String value(); 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Started.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.CoherenceLifecycleEvent CoherenceLifecycleEvents} 16 | * of type {@link com.tangosol.net.events.CoherenceLifecycleEvent.Type#STARTED STARTED} or 17 | * {@link com.tangosol.net.events.SessionLifecycleEvent SessionEvents} of type 18 | * {@link com.tangosol.net.events.SessionLifecycleEvent.Type#STARTED STARTED}. 19 | * 20 | * @author Jonathan Knight 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface Started { 27 | } 28 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Starting.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.CoherenceLifecycleEvent CoherenceLifecycleEvents} 16 | * of type {@link com.tangosol.net.events.CoherenceLifecycleEvent.Type#STARTING STARTING} or 17 | * {@link com.tangosol.net.events.SessionLifecycleEvent SessionEvents} of type 18 | * {@link com.tangosol.net.events.SessionLifecycleEvent.Type#STARTING STARTING}. 19 | * 20 | * @author Jonathan Knight 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface Starting { 27 | } 28 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Stopped.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.CoherenceLifecycleEvent CoherenceLifecycleEvents} 16 | * of type {@link com.tangosol.net.events.CoherenceLifecycleEvent.Type#STOPPED STOPPED} or 17 | * {@link com.tangosol.net.events.SessionLifecycleEvent SessionEvents} of type 18 | * {@link com.tangosol.net.events.SessionLifecycleEvent.Type#STOPPED STOPPED}. 19 | * 20 | * @author Jonathan Knight 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface Stopped { 27 | } 28 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Stopping.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.CoherenceLifecycleEvent CoherenceLifecycleEvents} 16 | * of type {@link com.tangosol.net.events.CoherenceLifecycleEvent.Type#STOPPING STOPPING} or 17 | * {@link com.tangosol.net.events.SessionLifecycleEvent SessionEvents} of type 18 | * {@link com.tangosol.net.events.SessionLifecycleEvent.Type#STOPPING STOPPING}. 19 | * 20 | * @author Jonathan Knight 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface Stopping { 27 | } 28 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Synced.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used for any SYNCED event. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | @Documented 21 | @Retention(RetentionPolicy.RUNTIME) 22 | public @interface Synced { 23 | } 24 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Synchronous.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation that can be applied to {@link com.oracle.coherence.spring.event.CoherenceEventListener} annotated 15 | * methods to register them as {@link com.tangosol.util.MapListener#synchronous()} listeners. 16 | * 17 | * @author Jonathan Knight 18 | * @author Gunnar Hillert 19 | * @since 3.0 20 | */ 21 | @Documented 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface Synchronous { 24 | } 25 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Syncing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | import jakarta.inject.Qualifier; 14 | 15 | /** 16 | * A qualifier annotation used for any SYNCING event. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Qualifier 23 | @Documented 24 | @Retention(RetentionPolicy.RUNTIME) 25 | public @interface Syncing { 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Truncated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.cache.CacheLifecycleEvent.Type#TRUNCATED TRUNCATED} 16 | * {@link com.tangosol.net.events.partition.cache.CacheLifecycleEvent CacheLifecycleEvent}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Truncated { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Updated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.util.MapEvent MapEvents} of type 16 | * {@link com.tangosol.util.MapEvent#ENTRY_UPDATED} or that will receive 17 | * {@link com.tangosol.net.events.partition.cache.EntryEvent EntryEvents} of type 18 | * {@link com.tangosol.net.events.partition.cache.EntryEvent.Type#UPDATED UPDATED}. 19 | * 20 | * @author Jonathan Knight 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Documented 25 | @Retention(RetentionPolicy.RUNTIME) 26 | public @interface Updated { 27 | } 28 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/Updating.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.annotation.event; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Retention; 11 | import java.lang.annotation.RetentionPolicy; 12 | 13 | /** 14 | * A qualifier annotation used to annotate the parameter {@link com.oracle.coherence.spring.event.CoherenceEventListener} 15 | * annotated methods that will receive {@link com.tangosol.net.events.partition.cache.EntryEvent EntryEvents} of type 16 | * {@link com.tangosol.net.events.partition.cache.EntryEvent.Type#UPDATING UPDATING}. 17 | * 18 | * @author Jonathan Knight 19 | * @author Gunnar Hillert 20 | * @since 3.0 21 | */ 22 | @Documented 23 | @Retention(RetentionPolicy.RUNTIME) 24 | public @interface Updating { 25 | } 26 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/event/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides Coherence event-specific annotation suppport. 3 | */ 4 | package com.oracle.coherence.spring.annotation.event; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/annotation/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Annotation support. 3 | */ 4 | package com.oracle.coherence.spring.annotation; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/cache/package-info.java: -------------------------------------------------------------------------------- 1 | /** Support for Spring's cache abstraction. */ 2 | package com.oracle.coherence.spring.cache; 3 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/cachestore/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides Cache Store support. 3 | */ 4 | package com.oracle.coherence.spring.cachestore; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/annotation/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides Configuration-related annotation support. 3 | */ 4 | package com.oracle.coherence.spring.configuration.annotation; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring configuration Support. 3 | */ 4 | package com.oracle.coherence.spring.configuration; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/session/ServerSessionConfigurationBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2023, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.configuration.session; 8 | 9 | /** 10 | * Instances of {@link com.tangosol.net.SessionConfiguration} are used Coherence cluster member configurations. 11 | * 12 | * @author Gunnar Hillert 13 | */ 14 | public class ServerSessionConfigurationBean extends SessionConfigurationBean { 15 | public ServerSessionConfigurationBean() { 16 | super.setType(SessionType.SERVER); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/session/SessionConfigurationProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.configuration.session; 8 | 9 | import java.util.Optional; 10 | 11 | import com.tangosol.net.SessionConfiguration; 12 | 13 | /** 14 | * A provider of {@link com.tangosol.net.SessionConfiguration} instances. 15 | * 16 | * @author Jonathan Knight 17 | * @author Gunnar Hillert 18 | * @since 3.0 19 | */ 20 | public interface SessionConfigurationProvider { 21 | 22 | /** 23 | * Returns the optional {@link SessionConfiguration} that is provider provides. 24 | * @return the optional {@link SessionConfiguration} that is provider provides 25 | * or an empty {@link Optional} if this provider cannot provide a 26 | * configuration 27 | */ 28 | Optional getConfiguration(); 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/session/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Provides Coherence sesssion configuration support. 3 | */ 4 | package com.oracle.coherence.spring.configuration.session; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/support/CoherenceConfigurerCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.configuration.support; 8 | 9 | import com.oracle.coherence.spring.configuration.CoherenceConfigurer; 10 | import com.oracle.coherence.spring.configuration.DefaultCoherenceConfigurer; 11 | 12 | /** 13 | * Callback interface that can be used to customize the {@link CoherenceConfigurer}. 14 | * 15 | * @param the specific type of the {@link CoherenceConfigurer} 16 | * @author Gunnar Hillert 17 | * @since 3.0 18 | * @see DefaultCoherenceConfigurer 19 | */ 20 | @FunctionalInterface 21 | public interface CoherenceConfigurerCustomizer { 22 | 23 | /** 24 | * Callback to customize a {@link CoherenceConfigurer} instance. 25 | * @param configurer the coherenceConfigurer to customize 26 | */ 27 | void customize(T configurer); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/support/CoherenceInstanceType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.configuration.support; 8 | 9 | /** 10 | * An enum representing the type of the {@link com.tangosol.net.Coherence} instance. 11 | * 12 | * @author Gunnar Hillert 13 | * @since 3.0 14 | * @see com.tangosol.net.Coherence 15 | */ 16 | public enum CoherenceInstanceType { 17 | 18 | /** 19 | * Represents a Coherence client instance e.g. used when configuring Coherence*Extend or gRPC clients. 20 | */ 21 | CLIENT, 22 | 23 | /** 24 | * The instance is a cluster member. 25 | */ 26 | CLUSTER, 27 | 28 | } 29 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/configuration/support/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Classes supporting the {@code com.oracle.coherence.spring.configuration} package. 3 | */ 4 | package com.oracle.coherence.spring.configuration.support; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/event/liveevent/handler/UnsolicitedCommitEventHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.event.liveevent.handler; 8 | 9 | import java.lang.annotation.Annotation; 10 | 11 | import com.oracle.coherence.spring.annotation.event.Committed; 12 | import com.oracle.coherence.spring.event.liveevent.MethodEventObserver; 13 | import com.tangosol.net.events.partition.UnsolicitedCommitEvent; 14 | 15 | /** 16 | * Handler for {@link UnsolicitedCommitEvent}s. 17 | * 18 | * @author Gunnar Hillert 19 | * @since 3.0 20 | */ 21 | public class UnsolicitedCommitEventHandler extends ServiceEventHandler { 22 | public UnsolicitedCommitEventHandler(MethodEventObserver observer) { 23 | super(observer, UnsolicitedCommitEvent.Type.class); 24 | 25 | for (Annotation annotation : observer.getObservedQualifiers()) { 26 | if (annotation instanceof Committed) { 27 | addType(UnsolicitedCommitEvent.Type.COMMITTED); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/event/liveevent/handler/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Live Event Handlers. 3 | */ 4 | package com.oracle.coherence.spring.event.liveevent.handler; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/event/liveevent/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Live Event Support. 3 | */ 4 | package com.oracle.coherence.spring.event.liveevent; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/event/mapevent/MapEventType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.event.mapevent; 8 | 9 | /** 10 | * Event type enumeration. 11 | * 12 | * @author Gunnar Hillert 13 | * @since 3.0 14 | * @see com.tangosol.util.MapEvent 15 | */ 16 | public enum MapEventType { 17 | 18 | /** 19 | * This event indicates that an entry has been added to the map. 20 | */ 21 | INSERTED, 22 | 23 | /** 24 | * This event indicates that an entry has been updated in the map. 25 | */ 26 | UPDATED, 27 | 28 | /** 29 | * This event indicates that an entry has been removed from the map. 30 | */ 31 | DELETED 32 | } 33 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/event/mapevent/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Map Event Support. 3 | */ 4 | package com.oracle.coherence.spring.event.mapevent; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/event/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Coherence Eventing Support. 3 | */ 4 | package com.oracle.coherence.spring.event; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/messaging/CoherenceTopicListenerCandidates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.messaging; 8 | 9 | import java.lang.reflect.Method; 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * Holder for Coherence Topic Listeners to be configured. See {@link CoherenceTopicListenerSubscribers}. 15 | * 16 | * @author Vaso Putica 17 | * @since 3.0 18 | * 19 | */ 20 | public class CoherenceTopicListenerCandidates { 21 | private final Map> coherenceTopicListenerCandidateMethods; 22 | 23 | public CoherenceTopicListenerCandidates(Map> coherenceTopicListenerCandidateMethods) { 24 | super(); 25 | this.coherenceTopicListenerCandidateMethods = coherenceTopicListenerCandidateMethods; 26 | } 27 | 28 | public Map> getCoherenceTopicListenerCandidateMethods() { 29 | return this.coherenceTopicListenerCandidateMethods; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/messaging/SubscriberExceptionHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.messaging; 8 | 9 | import com.oracle.coherence.spring.messaging.exceptions.CoherenceSubscriberException; 10 | 11 | /** 12 | * Interface that {@link com.oracle.coherence.spring.annotation.CoherenceTopicListener} beans can implement to handle exceptions. 13 | * 14 | * @author Jonathan Knight 15 | * @since 3.0 16 | */ 17 | public interface SubscriberExceptionHandler { 18 | /** 19 | * Handle the given exception. 20 | * @param exception the exception to handle 21 | * @return {@code true} to continue processing messages, or {@code false} to close the subscriber. 22 | * 23 | */ 24 | Action handle(CoherenceSubscriberException exception); 25 | 26 | /** 27 | * An enumeration of possible actions to take after handling an exception. 28 | */ 29 | enum Action { 30 | /** 31 | * Continue to receive further messages. 32 | */ 33 | Continue, 34 | /** 35 | * Close the subscriber and stop receiving messages. 36 | */ 37 | Stop 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/messaging/exceptions/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Messaging related exceptions. 3 | */ 4 | package com.oracle.coherence.spring.messaging.exceptions; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/messaging/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Coherence Messaging Support. 3 | */ 4 | package com.oracle.coherence.spring.messaging; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/namespace/NamespaceHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.namespace; 8 | 9 | import com.tangosol.config.xml.AbstractNamespaceHandler; 10 | 11 | /** 12 | * Custom namespace handler for the {@code Spring} namespace. 13 | *

14 | * This namespace handler supports only one XML element: 15 | *

    16 | *
  • {@code <cdi:bean>beanName</cdi:bean>}
    , where {@code beanName} 17 | * is the unique name of a Spring bean. 18 | * This element can only be used as a child of the standard 19 | * {@code } element. 20 | *
21 | * 22 | * @author Ryan Lubke 23 | * @since 3.0 24 | */ 25 | public class NamespaceHandler extends AbstractNamespaceHandler { 26 | 27 | /** 28 | * Construct a {@code NamespaceHandler} instance. 29 | */ 30 | public NamespaceHandler() { 31 | registerProcessor("bean", new BeanProcessor()); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/namespace/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2020, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Spring namespace support. 10 | */ 11 | package com.oracle.coherence.spring.namespace; 12 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains classes for Coherence Spring integration. 3 | */ 4 | package com.oracle.coherence.spring; 5 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/java/com/oracle/coherence/spring/tracing/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Exposes Spring configuration to Coherence tracing infrastructure. 3 | */ 4 | 5 | package com.oracle.coherence.spring.tracing; 6 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/resources/META-INF/services/com.oracle.coherence.inject.Injector: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017-2020 original authors 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 | # https://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 | 17 | com.oracle.coherence.spring.CoherenceInjector 18 | -------------------------------------------------------------------------------- /coherence-spring-core/src/main/resources/META-INF/services/com.tangosol.coherence.config.SystemPropertyResolver: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | # 4 | # Licensed under the Universal Permissive License v 1.0 as shown at 5 | # https://oss.oracle.com/licenses/upl. 6 | # 7 | 8 | com.oracle.coherence.spring.configuration.support.SpringSystemPropertyResolver -------------------------------------------------------------------------------- /coherence-spring-core/src/main/resources/META-INF/services/com.tangosol.internal.tracing.PropertySource: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2025, Oracle and/or its affiliates. 3 | # 4 | # Licensed under the Universal Permissive License v 1.0 as shown at 5 | # https://oss.oracle.com/licenses/upl. 6 | # 7 | 8 | com.oracle.coherence.spring.tracing.SpringPropertySource -------------------------------------------------------------------------------- /coherence-spring-core/src/main/resources/coherence-spring.properties: -------------------------------------------------------------------------------- 1 | coherence.service.prefix = "${coherence.role}" 2 | coherence.log = log4j2 3 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/java/com/oracle/coherence/spring/StubInterceptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring; 8 | 9 | import com.tangosol.net.events.EventInterceptor; 10 | import com.tangosol.net.events.partition.cache.EntryEvent; 11 | 12 | /** 13 | * Stub Interceptor implementation for testing by {@link SpringNamespaceHandlerTests}. 14 | * 15 | * @author Patrick Peralta 16 | */ 17 | public class StubInterceptor implements EventInterceptor> { 18 | private volatile boolean m_fEventReceived = false; 19 | 20 | /** 21 | * {@inheritDoc} 22 | */ 23 | @Override 24 | public void onEvent(EntryEvent event) { 25 | this.m_fEventReceived = true; 26 | } 27 | 28 | /** 29 | * Return true if an event was received via {@link #onEvent}. 30 | * @return true if an event was received. 31 | */ 32 | public boolean eventReceived() { 33 | return this.m_fEventReceived; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/java/com/oracle/coherence/spring/event/mapevent/UppercaseEntryProcessor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.event.mapevent; 8 | 9 | import com.tangosol.util.InvocableMap; 10 | import data.Person; 11 | 12 | /** 13 | * @author Gunnar Hillert 14 | */ 15 | public class UppercaseEntryProcessor 16 | implements InvocableMap.EntryProcessor { 17 | @Override 18 | public Object process(InvocableMap.Entry entry) { 19 | Person p = entry.getValue(); 20 | p.setLastName(p.getLastName().toUpperCase()); 21 | entry.setValue(p); 22 | return null; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/java/com/oracle/coherence/spring/event/mapevent/UppercaseName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.event.mapevent; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.Inherited; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | 14 | import com.oracle.coherence.spring.annotation.MapEventTransformerBinding; 15 | 16 | /** 17 | * @author Gunnar Hillert 18 | */ 19 | @Inherited 20 | @MapEventTransformerBinding 21 | @Documented 22 | @Retention(RetentionPolicy.RUNTIME) 23 | public @interface UppercaseName { 24 | } 25 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/java/com/oracle/coherence/spring/event/mapevent/UppercaseNameTransformer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.event.mapevent; 8 | 9 | import com.tangosol.util.MapEvent; 10 | import com.tangosol.util.MapEventTransformer; 11 | import data.Person; 12 | 13 | /** 14 | * A custom implementation of a {@link MapEventTransformer}. 15 | * @author Gunnar Hillert 16 | */ 17 | class UppercaseNameTransformer implements MapEventTransformer { 18 | 19 | @Override 20 | @SuppressWarnings("unchecked") 21 | public MapEvent transform(MapEvent event) { 22 | String sOldName = transform(event.getOldValue()); 23 | String sNewName = transform(event.getNewValue()); 24 | return new MapEvent(event.getMap(), event.getId(), event.getKey(), sOldName, sNewName); 25 | } 26 | 27 | String transform(Person person) { 28 | if (person == null) { 29 | return null; 30 | } 31 | String name = person.getFirstName(); 32 | return (name != null) ? name.toUpperCase() : null; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/java/com/oracle/coherence/spring/event/mapevent/UppercaseTransformerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.event.mapevent; 8 | 9 | import com.oracle.coherence.spring.annotation.MapEventTransformerFactory; 10 | import com.tangosol.util.MapEventTransformer; 11 | import data.Person; 12 | 13 | /** 14 | * @author Gunnar Hillert 15 | */ 16 | @UppercaseName 17 | public class UppercaseTransformerFactory implements MapEventTransformerFactory { 18 | @Override 19 | public MapEventTransformer create(UppercaseName annotation) { 20 | return new UppercaseNameTransformer(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/resources/extend-core-test-coherence-cache-config-nameservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 15 | fooMap 16 | remote-coherence-extend 17 | 18 | 19 | 20 | 21 | 22 | remote-coherence-extend 23 | RemoteCoherenceExtendService 24 | CoherenceExtendTestsCluster 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/resources/grpc-core-test-coherence-cache-config-nameservice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 15 | fooMap 16 | remote-grpc 17 | 18 | 19 | 20 | 21 | 22 | remote-grpc 23 | RemoteGrpcCache 24 | GrpcSessionBeanTestsCluster 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/resources/pof-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | coherence-pof-config.xml 7 | 8 | 9 | 1000 10 | data.Person 11 | 12 | 13 | 1001 14 | data.PhoneNumber 15 | 16 | 17 | -------------------------------------------------------------------------------- /coherence-spring-core/src/test/resources/test-coherence-cache-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 15 | spring-cache 16 | local-cache-testing 17 | 18 | 19 | 20 | * 21 | local-cache-testing 22 | 23 | 24 | 25 | 26 | 27 | local-cache-testing 28 | 5 29 | FIXED 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/config/CoherenceRepositoriesRegistrar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.data.config; 8 | 9 | import java.lang.annotation.Annotation; 10 | 11 | import com.oracle.coherence.spring.data.support.CoherenceRepositoryConfigurationExtension; 12 | 13 | import org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport; 14 | import org.springframework.data.repository.config.RepositoryConfigurationExtension; 15 | 16 | /** 17 | * This class wil register support for Coherence repositories with the Spring runtime. 18 | * 19 | * @author Ryan Lubke 20 | * @since 3.0 21 | */ 22 | public class CoherenceRepositoriesRegistrar extends RepositoryBeanDefinitionRegistrarSupport { 23 | @Override 24 | protected Class getAnnotation() { 25 | return EnableCoherenceRepositories.class; 26 | } 27 | 28 | @Override 29 | protected RepositoryConfigurationExtension getExtension() { 30 | return new CoherenceRepositoryConfigurationExtension(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Coherence data configuration support. 10 | * 11 | * @author Ryan Lubke 12 | * @since 3.0 13 | */ 14 | @org.springframework.lang.NonNullApi 15 | package com.oracle.coherence.spring.data.config; 16 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/core/mapping/CoherencePersistentEntity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.data.core.mapping; 8 | 9 | import org.springframework.data.mapping.PersistentEntity; 10 | import org.springframework.data.mapping.model.BasicPersistentEntity; 11 | import org.springframework.data.util.TypeInformation; 12 | 13 | /** 14 | * Coherence implementation of {@link PersistentEntity}. 15 | * 16 | * @param the entity type 17 | * @author Ryan Lubke 18 | * @since 3.0 19 | */ 20 | public class CoherencePersistentEntity 21 | extends BasicPersistentEntity { 22 | 23 | public CoherencePersistentEntity(TypeInformation information) { 24 | super(information); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/core/mapping/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Coherence entity mapping support. 10 | * 11 | * @author Ryan Lubke 12 | * @since 3.0 13 | */ 14 | @org.springframework.lang.NonNullApi 15 | package com.oracle.coherence.spring.data.core.mapping; 16 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Coherence Spring Data integration. 10 | * 11 | * @author Ryan Lubke 12 | * @since 3.0 13 | */ 14 | package com.oracle.coherence.spring.data; 15 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/repository/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Coherence repository support. 10 | * 11 | * @author Ryan Lubke 12 | * @since 3.0 13 | */ 14 | @org.springframework.lang.NonNullApi 15 | package com.oracle.coherence.spring.data.repository; 16 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/repository/query/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Coherence finder query support. 10 | * 11 | * @author Ryan Lubke 12 | * @since 3.0 13 | */ 14 | @org.springframework.lang.NonNullApi 15 | package com.oracle.coherence.spring.data.repository.query; 16 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/java/com/oracle/coherence/spring/data/support/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Coherence Data utilities. 10 | * 11 | * @author Ryan Lubke 12 | * @since 3.0 13 | */ 14 | @org.springframework.lang.NonNullApi 15 | package com.oracle.coherence.spring.data.support; 16 | -------------------------------------------------------------------------------- /coherence-spring-data/src/main/resources/META-iNF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.data.repository.core.support.RepositoryFactorySupport=com.oracle.coherence.spring.data.support.CoherenceRepositoryFactorySupport -------------------------------------------------------------------------------- /coherence-spring-data/src/test/java/com/oracle/coherence/spring/data/model/BookProjection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.data.model; 8 | 9 | /** 10 | * Example of closed interface projection 11 | */ 12 | public interface BookProjection { 13 | String getTitle(); 14 | 15 | int getPages(); 16 | 17 | CharSequence getTitleSequence(); 18 | 19 | AuthorSummary getAuthor(); 20 | 21 | interface AuthorSummary { 22 | String getFirstName(); 23 | 24 | AddressProjection getAddress(); 25 | } 26 | 27 | interface AddressProjection { 28 | String getStreet(); 29 | String getNumber(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /coherence-spring-data/src/test/java/com/oracle/coherence/spring/data/model/NestedBookProjection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.data.model; 8 | 9 | import java.io.Serializable; 10 | 11 | /** 12 | * Example of nested projection 13 | */ 14 | public interface NestedBookProjection { 15 | AuthorSummary getAuthor(); 16 | 17 | String getTitle(); 18 | 19 | int getPages(); 20 | 21 | interface AuthorSummary { 22 | String getFirstName(); 23 | 24 | AddressProjection getAddress(); 25 | 26 | Serializable getUpperFirstName(); 27 | 28 | interface AddressProjection { 29 | String getStreet(); 30 | String getNumber(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /coherence-spring-data/src/test/java/com/oracle/coherence/spring/data/model/NestedOpenBookProjection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.data.model; 8 | 9 | import java.util.Optional; 10 | 11 | import org.springframework.beans.factory.annotation.Value; 12 | 13 | /** 14 | * Example of nested open projection 15 | */ 16 | public interface NestedOpenBookProjection { 17 | String getTitle(); 18 | 19 | int getPages(); 20 | 21 | AuthorSummary getAuthor(); 22 | 23 | interface AuthorSummary { 24 | String getFirstName(); 25 | 26 | AddressProjection getAddress(); 27 | 28 | // nested open projection 29 | @Value("#{target.firstName + ' ' + target.lastName}") 30 | Optional getFullName(); 31 | 32 | interface AddressProjection { 33 | String getStreet(); 34 | String getNumber(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /coherence-spring-data/src/test/java/com/oracle/coherence/spring/data/model/OpenBookProjection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.data.model; 8 | 9 | import java.util.Optional; 10 | 11 | import org.springframework.beans.factory.annotation.Value; 12 | 13 | /** 14 | * Example of open projection 15 | */ 16 | public interface OpenBookProjection { 17 | AuthorSummary getAuthor(); 18 | 19 | String getTitle(); 20 | 21 | int getPages(); 22 | 23 | // root level open projection 24 | @Value("#{'Author: ' + target.author.firstName + ', Title: ' + target.title + ', Pages: ' + target.pages}") 25 | Optional getBasics(); 26 | 27 | interface AuthorSummary { 28 | String getFirstName(); 29 | AddressProjection getAddress(); 30 | 31 | // nested open projection 32 | @Value("#{target.firstName + ' ' + target.lastName}") 33 | Optional getFullName(); 34 | 35 | interface AddressProjection { 36 | String getStreet(); 37 | String getNumber(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /coherence-spring-data/src/test/java/com/oracle/coherence/spring/data/model/repositories/CoherenceBookAsyncRepository.java: -------------------------------------------------------------------------------- 1 | package com.oracle.coherence.spring.data.model.repositories; 2 | 3 | import java.util.List; 4 | import java.util.concurrent.CompletableFuture; 5 | 6 | import com.oracle.coherence.spring.data.config.CoherenceMap; 7 | import com.oracle.coherence.spring.data.model.Author; 8 | import com.oracle.coherence.spring.data.model.Book; 9 | import com.oracle.coherence.spring.data.repository.CoherenceAsyncRepository; 10 | import com.tangosol.util.UUID; 11 | 12 | import org.springframework.scheduling.annotation.Async; 13 | 14 | @CoherenceMap("book") 15 | public interface CoherenceBookAsyncRepository extends CoherenceAsyncRepository { 16 | 17 | @Async 18 | CompletableFuture> findByAuthor(Author author); 19 | } 20 | -------------------------------------------------------------------------------- /coherence-spring-data/src/test/java/com/oracle/coherence/spring/data/model/repositories/CoherenceBookRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.data.model.repositories; 8 | 9 | import java.util.List; 10 | 11 | import com.oracle.coherence.spring.data.config.CoherenceMap; 12 | import com.oracle.coherence.spring.data.model.Author; 13 | import com.oracle.coherence.spring.data.model.Book; 14 | import com.oracle.coherence.spring.data.repository.CoherenceRepository; 15 | import com.tangosol.util.UUID; 16 | 17 | @CoherenceMap("book") 18 | public interface CoherenceBookRepository extends CoherenceRepository { 19 | 20 | List findByAuthor(Author author); 21 | } 22 | -------------------------------------------------------------------------------- /coherence-spring-data/src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /coherence-spring-docs/.java-version: -------------------------------------------------------------------------------- 1 | 1.8 2 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/appendix.adoc: -------------------------------------------------------------------------------- 1 | [[appendix]] 2 | = Appendices 3 | 4 | include::appendix-examples.adoc[] -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/authors.adoc: -------------------------------------------------------------------------------- 1 | Gunnar Hillert, Ryan Lubke, Vaso Putica, Jonathan Knight -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/coherence-spring-reference.pdfadoc: -------------------------------------------------------------------------------- 1 | [[coherence-spring-reference-documentation]] 2 | = Coherence Spring Reference Documentation 3 | include::authors.adoc[] 4 | Version {coherence-spring-version} 5 | :docinfo: shared 6 | :title-logo-image: image:coherence-logo.svg[top=25%, align=center, pdfwidth=5cm] 7 | :toc: 8 | include::attributes.adoc[] 9 | 10 | include::legal.adoc[leveloffset=+1] 11 | include::overview.adoc[leveloffset=+1] 12 | include::quickstart.adoc[leveloffset=+1] 13 | include::core.adoc[leveloffset=+1] 14 | include::spring-cache.adoc[leveloffset=+1] 15 | include::spring-session.adoc[leveloffset=+1] 16 | include::spring-data.adoc[leveloffset=+1] 17 | include::spring-boot.adoc[leveloffset=+1] 18 | include::spring-cloud-config.adoc[leveloffset=+1] 19 | 20 | [[appendices]] 21 | == Appendices 22 | 23 | include::appendix-examples.adoc[leveloffset=+1] -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/images/spring-session-demo-war.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/coherence-spring-docs/src/main/asciidoc/images/spring-session-demo-war.png -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/images/visual-vm-cache-get-value.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/coherence-spring-docs/src/main/asciidoc/images/visual-vm-cache-get-value.png -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/images/visual-vm-cache-put.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/coherence-spring-docs/src/main/asciidoc/images/visual-vm-cache-put.png -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/index-docinfo.xml: -------------------------------------------------------------------------------- 1 | Coherence Spring 2 | {coherence-spring-version} 3 | 4 | 2013, 2025 5 | 6 | 7 | 8 | Copyright (c) 2013, 2025, Oracle and/or its affiliates. 9 | Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 10 | 11 | 12 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/asciidoc/index.htmlsingleadoc: -------------------------------------------------------------------------------- 1 | [[coherence-spring-reference-documentation]] 2 | = Coherence Spring Reference Documentation 3 | include::authors.adoc[] 4 | :docinfo: shared 5 | include::attributes.adoc[] 6 | 7 | Version {coherence-spring-version} 8 | 9 | include::legal.adoc[leveloffset=+1] 10 | include::overview.adoc[leveloffset=+1] 11 | include::quickstart.adoc[leveloffset=+1] 12 | include::core.adoc[leveloffset=+1] 13 | include::spring-cache.adoc[leveloffset=+1] 14 | include::spring-session.adoc[leveloffset=+1] 15 | include::spring-data.adoc[leveloffset=+1] 16 | include::spring-boot.adoc[leveloffset=+1] 17 | include::spring-cloud-config.adoc[leveloffset=+1] 18 | include::appendix.adoc[leveloffset=+1] 19 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/main/xslt/dependencyVersions.xsl: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | 8 | 9 | |=== 10 | | Group ID | Artifact ID | Version 11 | 12 | 13 | 14 | 15 | | ` 16 | 17 | ` 18 | | ` 19 | 20 | ` 21 | | 22 | 23 | 24 | 25 | |=== 26 | 27 | 28 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/di/viewtransformer/Person.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.doc.di.viewtransformer; 8 | 9 | import java.io.Serializable; 10 | 11 | public class Person implements Serializable { 12 | 13 | private String name; 14 | private int age; 15 | 16 | public Person(String name, int age) { 17 | this.name = name; 18 | this.age = age; 19 | } 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | 29 | public Integer getAge() { 30 | return age; 31 | } 32 | 33 | public void setAge(int age) { 34 | this.age = age; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/di/wherefilter/Person.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.doc.di.wherefilter; 8 | 9 | import java.io.Serializable; 10 | 11 | public class Person implements Serializable { 12 | 13 | private String firstName; 14 | private String lastName; 15 | private int age; 16 | 17 | public Person(String firstName, String lastName, int age) { 18 | this.firstName = firstName; 19 | this.lastName = lastName; 20 | this.age = age; 21 | } 22 | 23 | public String getFirstName() { 24 | return firstName; 25 | } 26 | 27 | public String getLastName() { 28 | return lastName; 29 | } 30 | 31 | public Integer getAge() { 32 | return age; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/event/Order.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.doc.event; 8 | 9 | public class Order { 10 | 11 | private String customerId; 12 | private Long orderId; 13 | 14 | public String getCustomerId() { 15 | return customerId; 16 | } 17 | 18 | public void setCustomerId(String customerId) { 19 | this.customerId = customerId; 20 | } 21 | 22 | public Long getOrderId() { 23 | return orderId; 24 | } 25 | 26 | public void setOrderId(Long orderId) { 27 | this.orderId = orderId; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/event/Person.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.doc.event; 8 | 9 | public class Person { 10 | 11 | private String gender; 12 | private int age; 13 | 14 | public String getGender() { 15 | return gender; 16 | } 17 | 18 | public void setGender(String gender) { 19 | this.gender = gender; 20 | } 21 | 22 | public Integer getAge() { 23 | return age; 24 | } 25 | 26 | public void setAge(int age) { 27 | this.age = age; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/extractorbinding/Plant.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.extractorbinding; 9 | 10 | import java.io.Serializable; 11 | 12 | // end::hide[] 13 | public class Plant implements Serializable { 14 | private String name; 15 | private PlantType plantType; 16 | private int height; 17 | 18 | public Plant(String name, PlantType plantType, int height) { 19 | this.name = name; 20 | this.plantType = plantType; 21 | this.height = height; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public PlantType getPlantType() { 29 | return plantType; 30 | } 31 | 32 | public int getHeight() { 33 | return height; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/extractorbinding/PlantNameExtractor.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.extractorbinding; 9 | // end::hide[] 10 | 11 | import com.oracle.coherence.spring.annotation.ExtractorBinding; 12 | import com.oracle.coherence.spring.annotation.FilterBinding; 13 | 14 | import java.lang.annotation.Documented; 15 | import java.lang.annotation.Retention; 16 | import java.lang.annotation.RetentionPolicy; 17 | 18 | @ExtractorBinding // <1> 19 | @Documented 20 | @Retention(RetentionPolicy.RUNTIME) 21 | public @interface PlantNameExtractor { // <2> 22 | } 23 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/extractorbinding/PlantNameExtractorFactory.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.extractorbinding; 9 | // end::hide[] 10 | 11 | import com.oracle.coherence.spring.annotation.ExtractorFactory; 12 | import com.tangosol.util.Extractors; 13 | import com.tangosol.util.ValueExtractor; 14 | import org.springframework.stereotype.Component; 15 | 16 | @PlantNameExtractor // <1> 17 | @Component // <2> 18 | public class PlantNameExtractorFactory 19 | implements ExtractorFactory { 20 | @Override 21 | public ValueExtractor create(PlantNameExtractor annotation) { // <3> 22 | return Extractors.extract("name"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/extractorbinding/PlantType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.doc.extractorbinding; 8 | 9 | public enum PlantType { 10 | PALM, 11 | BANANA, 12 | BAMBOO 13 | } 14 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/filterbinding/LargePalmTrees.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.filterbinding; 9 | // end::hide[] 10 | import java.lang.annotation.Documented; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | 14 | import com.oracle.coherence.spring.annotation.FilterBinding; 15 | 16 | @FilterBinding // <1> 17 | @Documented 18 | @Retention(RetentionPolicy.RUNTIME) 19 | public @interface LargePalmTrees { // <2> 20 | } 21 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/filterbinding/LargePalmTreesFilterFactory.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.filterbinding; 9 | // end::hide[] 10 | 11 | import com.oracle.coherence.spring.annotation.FilterFactory; 12 | import com.tangosol.util.Extractors; 13 | import com.tangosol.util.Filter; 14 | import com.tangosol.util.Filters; 15 | import org.springframework.stereotype.Component; 16 | 17 | @LargePalmTrees // <1> 18 | @Component // <2> 19 | public class LargePalmTreesFilterFactory 20 | implements FilterFactory { 21 | @Override 22 | public Filter create(LargePalmTrees annotation) { // <3> 23 | Filter palm = Filters.equal("plantType", PlantType.PALM); 24 | Filter height = Filters.greaterEqual( 25 | Extractors.extract("height"), 20); 26 | return Filters.all(palm, height); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/filterbinding/PalmTrees.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.filterbinding; 9 | 10 | import com.oracle.coherence.spring.annotation.FilterBinding; 11 | 12 | import java.lang.annotation.Documented; 13 | import java.lang.annotation.Retention; 14 | import java.lang.annotation.RetentionPolicy; 15 | // end::hide[] 16 | @FilterBinding 17 | @Documented 18 | @Retention(RetentionPolicy.RUNTIME) 19 | public @interface PalmTrees { 20 | int value() default 0; 21 | } 22 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/filterbinding/PalmTreesFilterFactory.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.filterbinding; 9 | // end::hide[] 10 | 11 | import com.oracle.coherence.spring.annotation.FilterFactory; 12 | import com.tangosol.util.Extractors; 13 | import com.tangosol.util.Filter; 14 | import com.tangosol.util.Filters; 15 | import org.springframework.stereotype.Component; 16 | 17 | @PalmTrees // <1> 18 | @Component // <2> 19 | public class PalmTreesFilterFactory 20 | implements FilterFactory { 21 | @Override 22 | public Filter create(PalmTrees annotation) { // <3> 23 | Filter palm = Filters.equal("plantType", PlantType.PALM); 24 | Filter height = Filters.greaterEqual( 25 | Extractors.extract("height"), annotation.value()); // <4> 26 | return Filters.all(palm, height); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/filterbinding/Plant.java: -------------------------------------------------------------------------------- 1 | // tag::hide[] 2 | /* 3 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 4 | * 5 | * Licensed under the Universal Permissive License v 1.0 as shown at 6 | * https://oss.oracle.com/licenses/upl. 7 | */ 8 | package com.oracle.coherence.spring.doc.filterbinding; 9 | 10 | import java.io.Serializable; 11 | 12 | // end::hide[] 13 | public class Plant implements Serializable { 14 | private String name; 15 | private PlantType plantType; 16 | private int height; 17 | 18 | public Plant(String name, PlantType plantType, int height) { 19 | this.name = name; 20 | this.plantType = plantType; 21 | this.height = height; 22 | } 23 | 24 | public String getName() { 25 | return name; 26 | } 27 | 28 | public PlantType getPlantType() { 29 | return plantType; 30 | } 31 | 32 | public int getHeight() { 33 | return height; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/java/com/oracle/coherence/spring/doc/filterbinding/PlantType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.doc.filterbinding; 8 | 9 | public enum PlantType { 10 | PALM, 11 | BANANA, 12 | BAMBOO 13 | } 14 | -------------------------------------------------------------------------------- /coherence-spring-docs/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/config/annotation/SpringSessionCoherenceInstance.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.session.config.annotation; 8 | 9 | import java.lang.annotation.Documented; 10 | import java.lang.annotation.ElementType; 11 | import java.lang.annotation.Retention; 12 | import java.lang.annotation.RetentionPolicy; 13 | import java.lang.annotation.Target; 14 | 15 | import org.springframework.beans.factory.annotation.Qualifier; 16 | 17 | /** 18 | * Qualifier annotation for a {@link com.tangosol.net.Coherence} instance to be injected in 19 | * {@link com.oracle.coherence.spring.session.CoherenceIndexedSessionRepository}. 20 | * 21 | * @author Gunnar Hillert 22 | * @since 3.0 23 | */ 24 | @Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE, ElementType.ANNOTATION_TYPE }) 25 | @Retention(RetentionPolicy.RUNTIME) 26 | @Documented 27 | @Qualifier 28 | public @interface SpringSessionCoherenceInstance { 29 | 30 | } 31 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/config/annotation/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Session specific annotations. 3 | */ 4 | package com.oracle.coherence.spring.session.config.annotation; 5 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/config/annotation/web/http/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Http Session support and configuration. 3 | */ 4 | package com.oracle.coherence.spring.session.config.annotation.web.http; 5 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/events/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Session events. 3 | */ 4 | package com.oracle.coherence.spring.session.events; 5 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains classes for Spring Session support. 3 | */ 4 | package com.oracle.coherence.spring.session; 5 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/serialization/pof/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * POF serialization support. 3 | */ 4 | package com.oracle.coherence.spring.session.serialization.pof; 5 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/support/SessionEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.session.support; 8 | 9 | /** 10 | * Used by {@link SessionDebugMessageUtils}. 11 | * 12 | * @author Gunnar Hillert 13 | * @since 3.0 14 | */ 15 | public enum SessionEvent { 16 | /** 17 | * The session was created. 18 | */ 19 | CREATED, 20 | /** 21 | * The session was deleted. 22 | */ 23 | DELETED, 24 | /** 25 | * The session has expired. 26 | */ 27 | EXPIRED 28 | } 29 | -------------------------------------------------------------------------------- /coherence-spring-session/src/main/java/com/oracle/coherence/spring/session/support/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains various support classes. 3 | */ 4 | package com.oracle.coherence.spring.session.support; 5 | -------------------------------------------------------------------------------- /coherence-spring-session/src/test/java/com/oracle/coherence/spring/session/support/FixedSessionIdGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.session.support; 8 | 9 | import org.springframework.session.SessionIdGenerator; 10 | 11 | /** 12 | * Example of a custom {@link SessionIdGenerator}. 13 | * 14 | * @author Gunnar Hillert 15 | */ 16 | public class FixedSessionIdGenerator implements SessionIdGenerator { 17 | 18 | private final String id; 19 | 20 | public FixedSessionIdGenerator(String id) { 21 | this.id = id; 22 | } 23 | 24 | @Override 25 | public String generate() { 26 | return this.id; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /coherence-spring-session/src/test/resources/grpc-test-coherence-cache-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | * 17 | remote-grpc 18 | 19 | 20 | 21 | 22 | 23 | remote-grpc 24 | RemoteGrpcCache 25 | GrpcSessionTestsCluster 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /coherence-spring-session/src/test/resources/log4j2-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /coherence-spring-session/src/test/resources/server-coherence-cache-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 12 | 13 | * 14 | extend 15 | 16 | 17 | 18 | 19 | 20 | extend 21 | member 22 | 23 | 24 | 25 | true 26 | 27 | 28 | 29 | ExtendTcpCacheService 30 | true 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /coherence-spring-site/docs/css/styles.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at 4 | * https://oss.oracle.com/licenses/upl. 5 | */ 6 | 7 | .navLogo { 8 | border-radius: unset !important; 9 | } 10 | -------------------------------------------------------------------------------- /coherence-spring-site/docs/dev/04_issue-tracking.adoc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | Copyright (c) 2013, 2021, Oracle and/or its affiliates. 3 | 4 | Licensed under the Universal Permissive License v 1.0 as shown at 5 | https://oss.oracle.com/licenses/upl. 6 | /////////////////////////////////////////////////////////////////////////////// 7 | 8 | = Issue Tracking 9 | 10 | :description: Oracle Coherence Spring Website 11 | :keywords: coherence, spring, java, documentation 12 | 13 | // DO NOT remove this header - it might look like a duplicate of the header above, but 14 | // both they serve a purpose, and the docs will look wrong if it is removed. 15 | 16 | == Issue Tracking 17 | 18 | The https://github.com/coherence-community/coherence-spring/issues[Issue Tracking] system for the Coherence Spring project is hosted 19 | by https://github.com/[github.com]. It can be found here: https://github.com/coherence-community/coherence-spring/issues. 20 | -------------------------------------------------------------------------------- /coherence-spring-site/docs/images/GitHub-Mark-64px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/coherence-spring-site/docs/images/GitHub-Mark-64px.png -------------------------------------------------------------------------------- /coherence-spring-tests/src/main/java/com/oracle/coherence/spring/event/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains test-related helper classes for Coherence events. 3 | */ 4 | package com.oracle.coherence.spring.event; 5 | -------------------------------------------------------------------------------- /coherence-spring-tests/src/main/java/com/oracle/coherence/spring/test/junit/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains JUnit-related helper and extension classes. 3 | */ 4 | package com.oracle.coherence.spring.test.junit; 5 | -------------------------------------------------------------------------------- /coherence-spring-tests/src/main/java/com/oracle/coherence/spring/test/utils/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains test-relevant utility classes. 3 | */ 4 | package com.oracle.coherence.spring.test.utils; 5 | -------------------------------------------------------------------------------- /lib/spring-asciidoctor-extensions-block-switch-0.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/lib/spring-asciidoctor-extensions-block-switch-0.5.0.jar -------------------------------------------------------------------------------- /lib/spring-asciidoctor-extensions-spring-boot-0.5.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/lib/spring-asciidoctor-extensions-spring-boot-0.5.0.jar -------------------------------------------------------------------------------- /lib/spring-doc-resources-0.2.5.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/lib/spring-doc-resources-0.2.5.zip -------------------------------------------------------------------------------- /rules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | (?i).*Alpha(?:-?\d+)? 6 | (?i).*a(?:-?\d+)? 7 | (?i).*Beta(?:-?\d+)? 8 | (?i).*-B(?:-?\d+)? 9 | (?i).*RC(?:-?\d+)? 10 | (?i).*CR(?:-?\d+)? 11 | (?i).*M(?:-?\d+)? 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/cachestore-demo/README.adoc: -------------------------------------------------------------------------------- 1 | = Coherence Spring JPA Repository CacheStore Demo 2 | 3 | == Overview 4 | 5 | In this demo we show how to use the Coherence Spring Cache Store. The demo is split into multiple Maven modules in order 6 | to show-case `2` use-cases: 7 | 8 | * Embedded Coherence 9 | * Use a remote Coherence instance cache using 10 | https://docs.oracle.com/en/middleware/standalone/coherence/14.1.1.2206/develop-remote-clients/introduction-coherenceextend.html[Coherence*Extend] 11 | 12 | The Maven Project is structured as follows: 13 | 14 | * *coherence-cachestore-demo-app* Main entry point for the demo using an embedded Coherence instance 15 | * *coherence-cachestore-demo-server* Remote Coherence server 16 | * *coherence-cachestore-demo-core* Used to share common code between the local app and the remote Coherence server version. 17 | 18 | For further information, the Chapter **Cache Store** of the Coherence Spring reference documentation for detailed instructions. 19 | 20 | -------------------------------------------------------------------------------- /samples/cachestore-demo/coherence-spring-cachestore-demo-app/src/main/java/com/oracle/coherence/spring/example/CacheStoreDemo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.example; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | 12 | /** 13 | * Entry point to the Coherence Cache Store Demo Application. 14 | * 15 | * @author Jonathan Knight 2021.08.17 16 | */ 17 | @SpringBootApplication 18 | public class CacheStoreDemo { 19 | 20 | public static void main(String[] args) { 21 | SpringApplication.run(CacheStoreDemo.class, args); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /samples/cachestore-demo/coherence-spring-cachestore-demo-app/src/main/resources/application-remote.yml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | client: 4 | - name: default 5 | config: "remote-cache-config.xml" 6 | spring: 7 | datasource: 8 | url: jdbc:hsqldb:hsql://localhost:9001/maindb 9 | hikari: 10 | username: sa 11 | password: "" -------------------------------------------------------------------------------- /samples/cachestore-demo/coherence-spring-cachestore-demo-app/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: false 2 | coherence: 3 | logging: 4 | destination: slf4j 5 | severity-level: 6 6 | spring: 7 | jpa: 8 | open-in-view: false 9 | hibernate: 10 | ddl-auto: update 11 | properties: 12 | hibernate.show_sql: false 13 | hibernate.use_sql_comments: false 14 | hibernate.format_sql: true 15 | database-platform: org.hibernate.dialect.HSQLDialect 16 | -------------------------------------------------------------------------------- /samples/cachestore-demo/coherence-spring-cachestore-demo-app/src/test/java/com/oracle/coherence/spring/example/IsSpringUp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.example; 8 | 9 | import java.util.Map; 10 | import javax.management.MBeanServer; 11 | import javax.management.ObjectName; 12 | 13 | import com.oracle.bedrock.runtime.concurrent.RemoteCallable; 14 | import com.tangosol.net.management.MBeanHelper; 15 | 16 | public class IsSpringUp implements RemoteCallable { 17 | 18 | public static final IsSpringUp INSTANCE = new IsSpringUp(); 19 | 20 | @Override 21 | @SuppressWarnings("rawtypes") 22 | public Boolean call() throws Exception { 23 | try { 24 | MBeanServer server = MBeanHelper.findMBeanServer(); 25 | ObjectName name = new ObjectName("org.springframework.boot:type=Endpoint,name=Health"); 26 | Map map = (Map) server.invoke(name, "health", new Object[0], new String[0]); 27 | String status = String.valueOf(map.get("status")); 28 | return "UP".equalsIgnoreCase(status); 29 | } catch (Throwable ex) { 30 | return false; 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /samples/cachestore-demo/coherence-spring-cachestore-demo-app/src/test/resources/application.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | driver-class-name: org.hsqldb.jdbc.JDBCDriver 4 | url: jdbc:hsqldb:hsql://localhost/testdb 5 | username: sa 6 | password: 7 | jpa: 8 | open-in-view: false 9 | hibernate: 10 | ddl-auto: update 11 | properties: 12 | hibernate.show_sql: false 13 | hibernate.use_sql_comments: false 14 | hibernate.format_sql: true 15 | -------------------------------------------------------------------------------- /samples/cachestore-demo/coherence-spring-cachestore-demo-core/src/main/java/com/oracle/coherence/spring/example/model/PersonRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.example.model; 8 | 9 | // # tag::imports[] 10 | import com.oracle.coherence.spring.cachestore.JpaRepositoryCacheStore; 11 | import org.springframework.stereotype.Repository; 12 | // # end::imports[] 13 | 14 | /** 15 | * A JPA repository cache store for the {@link Person} entity. 16 | * 17 | * Note: The bean must be given a name 18 | * 19 | * @author Jonathan Knight 2021.08.17 20 | */ 21 | // # tag::personRepo[] 22 | @Repository 23 | public interface PersonRepository extends JpaRepositoryCacheStore { 24 | 25 | } 26 | // # end::personRepo[] 27 | -------------------------------------------------------------------------------- /samples/cachestore-demo/coherence-spring-cachestore-demo-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: false 2 | server: 3 | port: 8081 4 | logging: 5 | level: 6 | com.oracle.coherence: DEBUG 7 | coherence: 8 | sessions: 9 | server: 10 | - name: default 11 | config: "coherence-cache-config.xml" 12 | spring: 13 | datasource: 14 | url: jdbc:hsqldb:hsql://localhost:9001/maindb 15 | hikari: 16 | username: sa 17 | password: "" 18 | jpa: 19 | open-in-view: false 20 | hibernate: 21 | ddl-auto: update 22 | properties: 23 | # hibernate.dialect: HSQLDialect 24 | hibernate.show_sql: false 25 | hibernate.use_sql_comments: false 26 | hibernate.format_sql: true 27 | database-platform: org.hibernate.dialect.HSQLDialect 28 | 29 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/README.adoc: -------------------------------------------------------------------------------- 1 | = Circuit Breaker Cache Sample 2 | 3 | Please see the https://spring.coherence.community/4.0.1-SNAPSHOT/refdocs/reference/htmlsingle/index.html#spring-boot-caching-circuit-breaker[Spring Boot chapter on Caching] of Coherence Spring Reference documentation for a detailed guide. 4 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains Security Configuration. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker.config; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains Web Controllers. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker.controller; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/dao/BookRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.circuitbreaker.dao; 8 | 9 | import com.oracle.coherence.spring.samples.circuitbreaker.model.Book; 10 | 11 | import org.springframework.data.jpa.repository.JpaRepository; 12 | import org.springframework.stereotype.Repository; 13 | 14 | /** 15 | * JPA Repository for retrieving and persisting {@link Book}. 16 | * @author Gunnar Hillert 17 | */ 18 | @Repository 19 | public interface BookRepository extends JpaRepository { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/dao/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains Hibernate/JPA repositories. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker.dao; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/model/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains domain objects. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker.model; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Base application package. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/service/BookService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.circuitbreaker.service; 8 | 9 | import java.util.List; 10 | 11 | import com.oracle.coherence.spring.samples.circuitbreaker.model.Book; 12 | 13 | /** 14 | * A service to manage books. 15 | * @author Gunnar Hillert 16 | */ 17 | public interface BookService { 18 | 19 | /** 20 | * Get a paged list of events. 21 | * @return the list of events 22 | */ 23 | List getAllBooks(); 24 | 25 | /** 26 | * Create a new {@link Book}. 27 | * @param book the book to add 28 | * @return the added book 29 | */ 30 | Book addBook(Book book); 31 | 32 | /** 33 | * Get a single {@link Book} for the provided id. 34 | * @param id the id of the book 35 | * @return the book 36 | */ 37 | Book getBook(Long id); 38 | 39 | /** 40 | * Remove the {@link Book} from the cache. 41 | * @param id the id of the event to remove 42 | */ 43 | void removeBookFromCache(Long id); 44 | 45 | } 46 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/service/impl/BusinessException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.circuitbreaker.service.impl; 8 | 9 | /** 10 | * Simple business exception. 11 | * @author Gunnar Hillert 12 | */ 13 | public class BusinessException extends RuntimeException { 14 | 15 | public BusinessException(String s) { 16 | super(s); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/service/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Service Implementations. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker.service.impl; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/service/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains the services used by the Controllers. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker.service; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/main/resources/application-coherence-client.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | client: 4 | - name: default -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-app/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-server/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/CoherenceServerApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, 2023, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.circuitbreaker; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | 12 | /** 13 | * Main entry to the application. 14 | * @author Gunnar Hillert 15 | */ 16 | @SpringBootApplication 17 | public class CoherenceServerApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(CoherenceServerApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-server/src/main/java/com/oracle/coherence/spring/samples/circuitbreaker/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Base application package. 10 | */ 11 | package com.oracle.coherence.spring.samples.circuitbreaker; 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: false 2 | server: 3 | port: 8081 4 | logging: 5 | level: 6 | com.oracle.coherence: INFO 7 | coherence: 8 | sessions: 9 | server: 10 | - name: default 11 | config: "coherence-cache-config.xml" 12 | -------------------------------------------------------------------------------- /samples/circuit-breaker-cache-demo/circuit-breaker-cache-demo-server/src/test/java/com/oracle/coherence/spring/samples/circuitbreaker/CoherenceServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.circuitbreaker; 8 | 9 | import org.junit.jupiter.api.Test; 10 | 11 | import org.springframework.boot.test.context.SpringBootTest; 12 | import org.springframework.test.annotation.DirtiesContext; 13 | 14 | /** 15 | * @author Gunnar Hillert 16 | */ 17 | @SpringBootTest 18 | @DirtiesContext 19 | class CoherenceServerApplicationTests { 20 | 21 | @Test 22 | void contextLoads() { 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/CoherenceApp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | import org.springframework.cache.annotation.EnableCaching; 12 | 13 | /** 14 | * Entry point to the Coherence Spring Boot Demo Application. 15 | * 16 | * @author Gunnar Hillert 17 | * 18 | */ 19 | @SpringBootApplication 20 | @EnableCaching 21 | public class CoherenceApp { 22 | 23 | public static void main(String[] args) { 24 | SpringApplication.run(CoherenceApp.class, args); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/configuration/CacheConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.configuration; 8 | 9 | import org.springframework.context.annotation.Configuration; 10 | 11 | @Configuration 12 | public class CacheConfiguration { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/configuration/package-info.java: -------------------------------------------------------------------------------- 1 | package com.oracle.coherence.spring.demo.configuration; 2 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains Web Controllers 3 | */ 4 | package com.oracle.coherence.spring.demo.controller; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/dao/EventRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.dao; 8 | 9 | import org.springframework.data.jpa.repository.JpaRepository; 10 | import org.springframework.stereotype.Repository; 11 | 12 | import com.oracle.coherence.spring.demo.model.Event; 13 | 14 | /** 15 | * 16 | * @author Gunnar Hillert 17 | * 18 | */ 19 | @Repository 20 | public interface EventRepository extends JpaRepository { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/dao/PersonRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.dao; 8 | 9 | import org.springframework.data.jpa.repository.JpaRepository; 10 | import org.springframework.stereotype.Repository; 11 | 12 | import com.oracle.coherence.spring.demo.model.Person; 13 | 14 | /** 15 | * 16 | * @author Gunnar Hillert 17 | * 18 | */ 19 | @Repository 20 | public interface PersonRepository extends JpaRepository { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/dao/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains Hibernate/JPA repositories. 3 | */ 4 | package com.oracle.coherence.spring.demo.dao; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/model/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains domain objects. 3 | */ 4 | package com.oracle.coherence.spring.demo.model; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/service/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Service Implementations. 3 | */ 4 | package com.oracle.coherence.spring.demo.service.impl; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/java/com/oracle/coherence/spring/demo/service/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the services used by the Controllers. 3 | */ 4 | package com.oracle.coherence.spring.demo.service; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: false 2 | management: 3 | endpoint: 4 | env: 5 | enabled: true 6 | endpoints: 7 | web: 8 | exposure: 9 | include: health,info,env 10 | spring: 11 | jackson: 12 | serialization: 13 | indent-output: true 14 | jpa: 15 | open-in-view: false 16 | hibernate: 17 | ddl-auto: update 18 | properties: 19 | hibernate.show_sql: false 20 | hibernate.use_sql_comments: false 21 | hibernate.format_sql: true 22 | config: 23 | import: optional:configserver:http://localhost:8888 24 | # activate: 25 | # on-profile: development 26 | application: 27 | name: config-client 28 | cloud: 29 | config: 30 | username: coherence 31 | password: rocks 32 | # profiles: 33 | # active: development 34 | coherence: 35 | logging: 36 | severity-level: 0 37 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/test/java/com/oracle/coherence/spring/demo/CoherenceAppTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo; 8 | 9 | import org.junit.jupiter.api.Test; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | 12 | @SpringBootTest 13 | class CoherenceAppTests { 14 | 15 | @Test 16 | void contextLoads() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-app/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-server/src/main/java/com/oracle/coherence/spring/config/SpringCloudConfigServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.config; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | import org.springframework.cloud.config.server.EnableConfigServer; 12 | 13 | @SpringBootApplication 14 | @EnableConfigServer 15 | public class SpringCloudConfigServer { 16 | 17 | public static void main(String[] args) { 18 | SpringApplication.run(SpringCloudConfigServer.class, args); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8888 3 | spring: 4 | cloud: 5 | config: 6 | server: 7 | git: 8 | uri: file:///Users/hillert/dev/spring-cloud-config-repo 9 | clone-on-start: false 10 | security: 11 | user: 12 | name: coherence 13 | password: rocks -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-server/src/test/java/com/oracle/coherence/spring/config/SpringCloudConfigServerTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.config; 8 | 9 | import org.junit.jupiter.api.Test; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | 12 | @SpringBootTest 13 | class SpringCloudConfigServerTests { 14 | 15 | @Test 16 | void contextLoads() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /samples/coherence-spring-cloud-config-demo/coherence-spring-cloud-config-demo-server/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/README.adoc: -------------------------------------------------------------------------------- 1 | # Coherence Spring Demo 2 | 3 | In this demo we are show-casing Coherence support for Spring 4 | applications using the https://github.com/coherence-community/coherence-spring[Coherence Spring project]. 5 | 6 | In this demo we provide an example of using Coherence with the Spring Cache abstraction. Please check out 7 | the **Quickstart chapter** of the http://spring.coherence.community/[Coherence Spring Reference documentation] 8 | for further details. 9 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-boot/src/main/java/com/oracle/coherence/spring/demo/CoherenceSpringBootDemoApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | import org.springframework.cache.annotation.EnableCaching; 12 | 13 | /** 14 | * Entry point to the Coherence Spring Boot Demo Application. 15 | * 16 | * @author Gunnar Hillert 17 | * 18 | */ 19 | @SpringBootApplication 20 | @EnableCaching 21 | public class CoherenceSpringBootDemoApplication { 22 | 23 | public static void main(String[] args) { 24 | SpringApplication.run(CoherenceSpringBootDemoApplication.class, args); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-boot/src/main/java/com/oracle/coherence/spring/demo/configuration/CacheConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.configuration; 8 | 9 | import org.springframework.context.annotation.Configuration; 10 | 11 | //import com.oracle.coherence.spring.cache.CoherenceCacheManager; 12 | 13 | @Configuration 14 | public class CacheConfiguration { 15 | 16 | // @Bean 17 | // public CacheManager cacheManager(Coherence coherenceInstance) { 18 | // return new CoherenceCacheManager(coherenceInstance); 19 | // } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-boot/src/main/java/com/oracle/coherence/spring/demo/configuration/package-info.java: -------------------------------------------------------------------------------- 1 | package com.oracle.coherence.spring.demo.configuration; -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-boot/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: false 2 | coherence: 3 | logging: 4 | destination: slf4j 5 | severity-level: 6 6 | spring: 7 | jackson: 8 | serialization: 9 | indent-output: true 10 | jpa: 11 | open-in-view: false 12 | hibernate: 13 | ddl-auto: update 14 | properties: 15 | hibernate.show_sql: true 16 | hibernate.use_sql_comments: false 17 | hibernate.format_sql: true 18 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-boot/src/test/java/com/oracle/coherence/spring/demo/SpringDemoApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo; 8 | 9 | import org.junit.jupiter.api.Test; 10 | import org.springframework.boot.test.context.SpringBootTest; 11 | 12 | @SpringBootTest 13 | class SpringDemoApplicationTests { 14 | 15 | @Test 16 | void contextLoads() { 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-boot/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/java/com/oracle/coherence/spring/demo/configuration/CacheConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.configuration; 8 | 9 | import org.springframework.cache.annotation.EnableCaching; 10 | import org.springframework.context.annotation.Configuration; 11 | import org.springframework.context.annotation.Profile; 12 | 13 | import com.oracle.coherence.spring.configuration.annotation.EnableCoherence; 14 | 15 | @Configuration 16 | @Profile("!xml") 17 | @EnableCaching 18 | @EnableCoherence 19 | public class CacheConfiguration { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/java/com/oracle/coherence/spring/demo/configuration/package-info.java: -------------------------------------------------------------------------------- 1 | package com.oracle.coherence.spring.demo.configuration; -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/java/com/oracle/coherence/spring/demo/initializer/AppInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.initializer; 8 | 9 | import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 10 | 11 | import com.oracle.coherence.spring.demo.config.AppConfig; 12 | import com.oracle.coherence.spring.demo.config.WebMvcConfig; 13 | 14 | /** 15 | * 16 | * @author Gunnar Hillert 17 | * 18 | */ 19 | public class AppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 20 | 21 | @Override 22 | protected Class[] getRootConfigClasses() { 23 | return new Class[] { AppConfig.class }; 24 | } 25 | 26 | @Override 27 | protected Class[] getServletConfigClasses() { 28 | return new Class[] { WebMvcConfig.class }; 29 | } 30 | 31 | @Override 32 | protected String[] getServletMappings() { 33 | return new String[] { "/" }; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/resources/.gitkeep -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/webapp/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/samples/coherence-spring-demo/coherence-spring-demo-classic/src/main/webapp/.gitkeep -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-classic/src/test/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coherence-community/coherence-spring/5291997deaac8559082d286e9de17f24c0410174/samples/coherence-spring-demo/coherence-spring-demo-classic/src/test/resources/.gitkeep -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-core/src/main/java/com/oracle/coherence/spring/demo/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains Web Controllers 3 | */ 4 | package com.oracle.coherence.spring.demo.controller; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-core/src/main/java/com/oracle/coherence/spring/demo/dao/EventRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.dao; 8 | 9 | import org.springframework.data.jpa.repository.JpaRepository; 10 | import org.springframework.stereotype.Repository; 11 | 12 | import com.oracle.coherence.spring.demo.model.Event; 13 | 14 | /** 15 | * 16 | * @author Gunnar Hillert 17 | * 18 | */ 19 | @Repository 20 | public interface EventRepository extends JpaRepository { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-core/src/main/java/com/oracle/coherence/spring/demo/dao/PersonRepository.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, 2022, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.demo.dao; 8 | 9 | import org.springframework.data.jpa.repository.JpaRepository; 10 | import org.springframework.stereotype.Repository; 11 | 12 | import com.oracle.coherence.spring.demo.model.Person; 13 | 14 | /** 15 | * 16 | * @author Gunnar Hillert 17 | * 18 | */ 19 | @Repository 20 | public interface PersonRepository extends JpaRepository { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-core/src/main/java/com/oracle/coherence/spring/demo/dao/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains Hibernate/JPA repositories. 3 | */ 4 | package com.oracle.coherence.spring.demo.dao; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-core/src/main/java/com/oracle/coherence/spring/demo/model/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains domain objects. 3 | */ 4 | package com.oracle.coherence.spring.demo.model; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-core/src/main/java/com/oracle/coherence/spring/demo/service/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Service Implementations. 3 | */ 4 | package com.oracle.coherence.spring.demo.service.impl; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/coherence-spring-demo-core/src/main/java/com/oracle/coherence/spring/demo/service/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains the services used by the Controllers. 3 | */ 4 | package com.oracle.coherence.spring.demo.service; 5 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 4.0.0 11 | 12 | 13 | com.oracle.coherence.spring 14 | samples 15 | 4.3.2-SNAPSHOT 16 | 17 | 18 | coherence-spring-demo-parent 19 | 4.3.2-SNAPSHOT 20 | 21 | pom 22 | 23 | Coherence Spring Demo - Parent 24 | Demo project for Coherence Spring 25 | 26 | 27 | coherence-spring-demo-core 28 | coherence-spring-demo-classic 29 | coherence-spring-demo-boot 30 | 31 | 32 | -------------------------------------------------------------------------------- /samples/coherence-spring-demo/src/main/resources/spring-applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/main/java/com/oracle/coherence/spring/samples/hibernate/HibernateApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.hibernate; 8 | 9 | import com.oracle.coherence.spring.configuration.annotation.EnableCoherence; 10 | import org.modelmapper.ModelMapper; 11 | 12 | import org.springframework.boot.SpringApplication; 13 | import org.springframework.boot.autoconfigure.SpringBootApplication; 14 | import org.springframework.context.annotation.Bean; 15 | 16 | /** 17 | * Main entry to the application. 18 | * @author Gunnar Hillert 19 | */ 20 | @SpringBootApplication 21 | @EnableCoherence 22 | public class HibernateApplication { 23 | public static void main(String[] args) { 24 | SpringApplication.run(HibernateApplication.class, args); 25 | } 26 | 27 | @Bean 28 | public ModelMapper modelMapper() { 29 | return new ModelMapper(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/main/java/com/oracle/coherence/spring/samples/hibernate/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains REST Controllers. 10 | */ 11 | package com.oracle.coherence.spring.samples.hibernate.controller; 12 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/main/java/com/oracle/coherence/spring/samples/hibernate/dao/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Data Repositories. 10 | */ 11 | package com.oracle.coherence.spring.samples.hibernate.dao; 12 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/main/java/com/oracle/coherence/spring/samples/hibernate/dto/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Dto objects. 10 | */ 11 | package com.oracle.coherence.spring.samples.hibernate.dto; 12 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/main/java/com/oracle/coherence/spring/samples/hibernate/model/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Domain objects. 10 | */ 11 | package com.oracle.coherence.spring.samples.hibernate.model; 12 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/main/java/com/oracle/coherence/spring/samples/hibernate/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Base application package. 10 | */ 11 | package com.oracle.coherence.spring.samples.hibernate; 12 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | debug: false 2 | server: 3 | port: 9090 4 | spring: 5 | application: 6 | name: Coherence Spring Hibernate Demo 7 | jpa: 8 | properties: 9 | hibernate.cache.region.factory_class: com.oracle.coherence.hibernate.cache.v6.CoherenceRegionFactory 10 | hibernate.cache.use_query_cache: true 11 | hibernate.cache.use_second_level_cache: true 12 | hibernate.format_sql: true 13 | hibernate.generate_statistics: true 14 | hibernate.show_sql: true 15 | hibernate.use_sql_comments: false 16 | com.oracle.coherence.hibernate.cache.session_name: coherence_hibernate 17 | logging: 18 | level: 19 | root: info 20 | "Coherence": info 21 | org.springframework.web: info 22 | com.oracle.coherence.spring: info 23 | -------------------------------------------------------------------------------- /samples/hibernate-cache-demo/src/test/java/com/oracle/coherence/spring/samples/hibernate/HibernateApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.hibernate; 8 | 9 | import org.junit.jupiter.api.Test; 10 | 11 | import org.springframework.boot.test.context.SpringBootTest; 12 | import org.springframework.test.annotation.DirtiesContext; 13 | 14 | /** 15 | * @author Gunnar Hillert 16 | */ 17 | @SpringBootTest 18 | @DirtiesContext 19 | class HibernateApplicationTests { 20 | 21 | @Test 22 | void contextLoads() { 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /samples/spring-session-demo/README.adoc: -------------------------------------------------------------------------------- 1 | = Spring Session Sample 2 | 3 | This example provides a basic https://spring.io/projects/spring-session[Spring Session] and 4 | https://spring.io/projects/spring-security[Spring Security] demo using https://spring.io/projects/spring-boot[Spring Boot]. 5 | 6 | Please check out the **Spring Session chapter** of the http://spring.coherence.community/[Coherence Spring Reference documentation] 7 | for further details. 8 | 9 | == Additional Options 10 | 11 | .Generate a Docker image 12 | [source,shell,indent=1,subs="verbatim,quotes,attributes"] 13 | ---- 14 | $ mvn spring-boot:build-image -pl samples/spring-session-demo/spring-session-demo-app -Dspring-boot.build-image.imageName=coherence/spring_session_demo 15 | ---- 16 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/java/com/oracle/coherence/spring/samples/session/SpringSessionApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | import org.springframework.scheduling.annotation.EnableScheduling; 12 | 13 | /** 14 | * Main entry to the application. 15 | * @author Gunnar Hillert 16 | */ 17 | @SpringBootApplication 18 | @EnableScheduling 19 | public class SpringSessionApplication { 20 | 21 | public static void main(String[] args) { 22 | SpringApplication.run(SpringSessionApplication.class, args); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/java/com/oracle/coherence/spring/samples/session/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains Spring Configuration classes. 10 | */ 11 | package com.oracle.coherence.spring.samples.session.config; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/java/com/oracle/coherence/spring/samples/session/controller/HelloController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session.controller; 8 | 9 | import com.tangosol.net.Coherence; 10 | 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.session.FindByIndexNameSessionRepository; 13 | import org.springframework.web.bind.annotation.GetMapping; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | /** 17 | * Main REST Controller. Responds to a GET for the URL {@code /hello} that returns the string {@code Hello World}. 18 | * @author Gunnar Hillert 19 | */ 20 | @RestController 21 | public class HelloController { 22 | 23 | @Autowired 24 | private FindByIndexNameSessionRepository findByIndexNameSessionRepository; 25 | 26 | @Autowired 27 | private Coherence coherence; 28 | 29 | @GetMapping("/hello") 30 | public String helloWorld() { 31 | return "Hello Coherence"; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/java/com/oracle/coherence/spring/samples/session/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains REST Controllers. 10 | */ 11 | package com.oracle.coherence.spring.samples.session.controller; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/java/com/oracle/coherence/spring/samples/session/filter/AuthenticationRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session.filter; 8 | 9 | /** 10 | * Represents a JSON-based authentication request. 11 | * @author Gunnar Hillert 12 | */ 13 | public class AuthenticationRequest { 14 | 15 | private String username; 16 | private String password; 17 | 18 | public AuthenticationRequest() { 19 | } 20 | 21 | public String getUsername() { 22 | return this.username; 23 | } 24 | 25 | public void setUsername(String username) { 26 | this.username = username; 27 | } 28 | 29 | public String getPassword() { 30 | return this.password; 31 | } 32 | 33 | public void setPassword(String password) { 34 | this.password = password; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/java/com/oracle/coherence/spring/samples/session/filter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains Authentication filter support. 10 | */ 11 | package com.oracle.coherence.spring.samples.session.filter; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/java/com/oracle/coherence/spring/samples/session/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Base application package. 10 | */ 11 | package com.oracle.coherence.spring.samples.session; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/resources/application-coherence-client.yaml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | server: # disable the server session 4 | client: 5 | - name: default 6 | config: remote-cache-config.xml 7 | # spring: 8 | # session: 9 | # use-entry-processor: false 10 | coherence.tcmp.enabled: false 11 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | session: 3 | timeout: 15m 4 | application: 5 | name: Spring Session Demo 6 | security: 7 | user: 8 | name: coherence 9 | password: rocks 10 | debug: false 11 | management: 12 | endpoint: 13 | sessions: 14 | enabled: true 15 | loggers: 16 | enabled: true 17 | endpoints: 18 | web: 19 | exposure: 20 | include: "*" 21 | coherence: 22 | spring: 23 | session: 24 | enabled: true 25 | sessions: 26 | server: 27 | - name: default 28 | config: "coherence-cache-config.xml" 29 | logging: 30 | level: 31 | root: warn 32 | "Coherence": info 33 | org.springframework.security: info 34 | org.springframework.web: info 35 | com.oracle.coherence.spring: info 36 | com.oracle.coherence.spring.samples.session: info 37 | com.oracle.coherence.spring.session: debug 38 | server: 39 | port: 8090 40 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/test/java/com/oracle/coherence/spring/samples/session/SpringSessionApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session; 8 | 9 | import org.junit.jupiter.api.Test; 10 | 11 | import org.springframework.boot.test.context.SpringBootTest; 12 | import org.springframework.test.annotation.DirtiesContext; 13 | 14 | /** 15 | * @author Gunnar Hillert 16 | */ 17 | @SpringBootTest 18 | @DirtiesContext 19 | class SpringSessionApplicationTests { 20 | 21 | @Test 22 | void contextLoads() { 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-app/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-server/src/main/java/com/oracle/coherence/spring/samples/session/CoherenceServerApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session; 8 | 9 | import org.springframework.boot.SpringApplication; 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; 11 | 12 | /** 13 | * Main entry to the application. 14 | * @author Gunnar Hillert 15 | */ 16 | @SpringBootApplication 17 | public class CoherenceServerApplication { 18 | 19 | public static void main(String[] args) { 20 | SpringApplication.run(CoherenceServerApplication.class, args); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-server/src/main/java/com/oracle/coherence/spring/samples/session/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Base application package. 10 | */ 11 | package com.oracle.coherence.spring.samples.session; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-server/src/main/resources/application-pof.yml: -------------------------------------------------------------------------------- 1 | coherence: 2 | sessions: 3 | server: 4 | - name: default 5 | config: "coherence-cache-config-pof.xml" 6 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-server/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | debug: false 2 | server: 3 | port: 8081 4 | logging: 5 | level: 6 | com.oracle.coherence: INFO 7 | coherence: 8 | sessions: 9 | server: 10 | - name: default 11 | config: "coherence-cache-config.xml" 12 | spring: 13 | session: 14 | store-type: none 15 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-server/src/main/resources/pof-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 12 | coherence-pof-config.xml 13 | 14 | 2001 15 | org.springframework.session.MapSession 16 | 17 | com.oracle.coherence.spring.session.serialization.pof.MapSessionPofSerializer 18 | 19 | 20 | 21 | 4000 22 | com.oracle.coherence.spring.session.SessionUpdateEntryProcessor 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-server/src/test/java/com/oracle/coherence/spring/samples/session/CoherenceServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session; 8 | 9 | import org.junit.jupiter.api.Test; 10 | 11 | import org.springframework.boot.test.context.SpringBootTest; 12 | import org.springframework.test.annotation.DirtiesContext; 13 | 14 | /** 15 | * @author Gunnar Hillert 16 | */ 17 | @SpringBootTest 18 | @DirtiesContext 19 | class CoherenceServerApplicationTests { 20 | 21 | @Test 22 | void contextLoads() { 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/java/com/oracle/coherence/spring/samples/session/config/AppConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session.config; 8 | 9 | import org.springframework.context.annotation.ComponentScan; 10 | import org.springframework.context.annotation.Configuration; 11 | 12 | /** 13 | * Spring Configuration class. 14 | * @author Gunnar Hillert 15 | */ 16 | @Configuration 17 | @ComponentScan(basePackages = "com.oracle.coherence.spring.samples.session") 18 | public class AppConfig { 19 | } 20 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/java/com/oracle/coherence/spring/samples/session/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains Spring Configuration classes. 10 | */ 11 | package com.oracle.coherence.spring.samples.session.config; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/java/com/oracle/coherence/spring/samples/session/controller/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains Web Controllers. 10 | */ 11 | package com.oracle.coherence.spring.samples.session.controller; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/java/com/oracle/coherence/spring/samples/session/initializer/AppInitializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | package com.oracle.coherence.spring.samples.session.initializer; 8 | 9 | import com.oracle.coherence.spring.samples.session.config.AppConfig; 10 | import com.oracle.coherence.spring.samples.session.config.WebMvcConfig; 11 | 12 | import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; 13 | 14 | /** 15 | * Spring Initializer for the DispatcherServlet. 16 | * @author Gunnar Hillert 17 | */ 18 | public class AppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { 19 | 20 | @Override 21 | protected Class[] getRootConfigClasses() { 22 | return new Class[] { AppConfig.class }; 23 | } 24 | 25 | @Override 26 | protected Class[] getServletConfigClasses() { 27 | return new Class[] { WebMvcConfig.class }; 28 | } 29 | 30 | @Override 31 | protected String[] getServletMappings() { 32 | return new String[] { "/" }; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/java/com/oracle/coherence/spring/samples/session/initializer/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024, Oracle and/or its affiliates. 3 | * 4 | * Licensed under the Universal Permissive License v 1.0 as shown at 5 | * https://oss.oracle.com/licenses/upl. 6 | */ 7 | 8 | /** 9 | * Contains initializer for the DispatcherServlet. 10 | */ 11 | package com.oracle.coherence.spring.samples.session.initializer; 12 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/resources/coherence-spring.properties: -------------------------------------------------------------------------------- 1 | coherence.log = log4j2 2 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/resources/pof-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 12 | 13 | 14 | coherence-pof-config.xml 15 | 16 | 2001 17 | org.springframework.session.MapSession 18 | 19 | com.oracle.coherence.spring.session.serialization.pof.MapSessionPofSerializer 20 | 21 | 22 | 23 | 4000 24 | com.oracle.coherence.spring.session.SessionUpdateEntryProcessor 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /samples/spring-session-demo/spring-session-demo-war/src/main/webapp/WEB-INF/view/hello.jsp: -------------------------------------------------------------------------------- 1 | <%@page session="true" %> 2 | 3 | 4 | 5 |

Hello World!

6 |
7 | Counter: <%= request.getSession().getAttribute("counter") %> 8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /src/checkstyle/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/config/dependency-check-suppression.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------