Skip to content

Commit

Permalink
Fix up missing pieces from the 3.8->3.9 move
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdennis committed Aug 25, 2020
1 parent c3b3962 commit 77cfd90
Show file tree
Hide file tree
Showing 29 changed files with 167 additions and 163 deletions.
8 changes: 4 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= The Ehcache 3.x line is currently the development line.

Status of the build:
Status of the build:
[link="https://dev.azure.com/TerracottaCI/ehcache/_build/latest?definitionId=14"]
image::https://dev.azure.com/TerracottaCI/ehcache/_apis/build/status/ehcache3[Build Status]
Expand All @@ -12,11 +12,11 @@ For samples, documentation, and usage information, please see http://ehcache.org
== Current release
We released 3.8.1 on September 4th 2019.
We released 3.9.0 on August 25th 2020.
The https://github.com/ehcache/ehcache3/releases/tag/v3.8.1[release notes] contain the links to the artifacts and the documentation to help you get started.
The https://github.com/ehcache/ehcache3/releases/tag/v3.9.0[release notes] contain the links to the artifacts and the documentation to help you get started.
You should consider upgrading to 3.8.x as it does all previous 3.x do and more with a fully compatible API.
You should consider upgrading to 3.9.x as it does all previous 3.x do and more with a fully compatible API.
== Current development & next release
Expand Down
2 changes: 1 addition & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ if [ $is_major ]; then
echo " layout: \"docs35_page\"" >> _config.yml
echo " ehc_version: \"${major_version}\"" >> _config.yml
echo " ehc_javadoc_version: \"${version}\"" >> _config.yml
echo " ehc_checkout_dir_var: \"sourcedir38\"" >> _config.yml
echo " ehc_checkout_dir_var: \"sourcedir39\"" >> _config.yml

sed -i '' "s/#needle\_for\_sourcedir/ - sourcedir${short_major_version}=\/_eh${short_major_version}\\
#needle_for_sourcedir/" _config.yml
Expand Down
24 changes: 12 additions & 12 deletions docs/src/docs/asciidoc/user/107.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
= The Ehcache 3.x JSR-107 Provider
ifndef::sourcedir38[]
ifndef::sourcedir39[]
include::{includedir}/common.adoc[]
endif::sourcedir38[]
endif::sourcedir39[]

ifdef::notBuildingForSite[]
include::{includedir}/menu.adoc[]
Expand Down Expand Up @@ -59,7 +59,7 @@ Here is a code sample that demonstrates the usage of the basic JCache configurat

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=basicConfigurationExample]
include::{sourcedir39}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=basicConfigurationExample]
----

<1> Retrieves the default CachingProvider implementation from the application's classpath.
Expand Down Expand Up @@ -91,7 +91,7 @@ you can still get to the underlying Ehcache `CacheRuntimeConfiguration`:

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=mutableConfigurationExample]
include::{sourcedir39}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=mutableConfigurationExample]
----

<1> Create a JCache cache using the `MutableConfiguration` interface from the JCache specification.
Expand All @@ -109,7 +109,7 @@ The way you do this is as follows:

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=ehcacheCacheManagerConfigurationExample]
include::{sourcedir39}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=ehcacheCacheManagerConfigurationExample]
----
<1> Cast the `CachingProvider` into the Ehcache specific implementation `org.ehcache.jsr107.EhcacheCachingProvider`,
<2> Create a configuration using the specific Ehcache `DefaultConfiguration` and pass it some `CacheManager` level configurations,
Expand All @@ -122,7 +122,7 @@ When using this mechanism, no JCache `CompleteConfiguration` is used and so you

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=ehcacheBasedConfigurationExample]
include::{sourcedir39}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=ehcacheBasedConfigurationExample]
----

<1> Create an Ehcache `CacheConfiguration`.
Expand All @@ -142,14 +142,14 @@ The following is an example of an XML configuration:

[source%nowrap,xml,indent=0]
----
include::{sourcedir38}/107/src/test/resources/org/ehcache/docs/ehcache-jsr107-config.xml[]
include::{sourcedir39}/107/src/test/resources/org/ehcache/docs/ehcache-jsr107-config.xml[]
----

Here is an example of how to access the XML configuration using JCache:

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=jsr107UsingXMLConfigExample]
include::{sourcedir39}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=jsr107UsingXMLConfigExample]
----

<1> Invoke `javax.cache.spi.CachingProvider.getCacheManager(java.net.URI, java.lang.ClassLoader)`
Expand Down Expand Up @@ -179,7 +179,7 @@ You can do this at two different levels:

[source%nowrap,xml,indent=0]
----
include::{sourcedir38}/107/src/test/resources/org/ehcache/docs/ehcache-107-mbeans-cache-manager-config.xml[lines=17..-1]
include::{sourcedir39}/107/src/test/resources/org/ehcache/docs/ehcache-107-mbeans-cache-manager-config.xml[lines=17..-1]
----

<1> Using the JCache service extension, you can enable MBeans by default.
Expand All @@ -201,7 +201,7 @@ To do this, add a `jsr107` service in your XML configuration file:

[source%nowrap,xml,indent=0]
----
include::{sourcedir38}/107/src/test/resources/org/ehcache/docs/ehcache-jsr107-template-override.xml[]
include::{sourcedir39}/107/src/test/resources/org/ehcache/docs/ehcache-jsr107-template-override.xml[]
----

<1> First, declare a namespace for the JCache extension, e.g. `jsr107`.
Expand All @@ -218,7 +218,7 @@ Using the above configuration, you can not only supplement but also override the

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=jsr107SupplementWithTemplatesExample]
include::{sourcedir39}/107/src/test/java/org/ehcache/docs/EhCache107ConfigurationIntegrationDocTest.java[tag=jsr107SupplementWithTemplatesExample]
----

<1> Assume existing JCache configuration code, which is store-by-value by default
Expand Down Expand Up @@ -283,5 +283,5 @@ If you need _Ehcache through JCache_ behaviour, the following shows the relevant

[source%nowrap,xml,indent=0]
----
include::{sourcedir38}/107/src/test/resources/org/ehcache/docs/ehcache-jsr107-cache-through.xml[tag=cacheThroughCAS]
include::{sourcedir39}/107/src/test/resources/org/ehcache/docs/ehcache-jsr107-cache-through.xml[tag=cacheThroughCAS]
----
10 changes: 5 additions & 5 deletions docs/src/docs/asciidoc/user/cache-event-listeners.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
= Cache Event Listeners
ifndef::sourcedir38[]
ifndef::sourcedir39[]
include::{includedir}/common.adoc[]
endif::sourcedir38[]
endif::sourcedir39[]

ifdef::notBuildingForSite[]
include::{includedir}/menu.adoc[]
Expand All @@ -18,7 +18,7 @@ Listeners are registered at the cache level - and therefore only receive events

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/impl/src/test/java/org/ehcache/docs/GettingStarted.java[tag=cacheEventListener]
include::{sourcedir39}/impl/src/test/java/org/ehcache/docs/GettingStarted.java[tag=cacheEventListener]
----

<1> Create a `CacheEventListenerConfiguration` using the builder indicating the listener and the events to receive (in this case create and update events)
Expand Down Expand Up @@ -57,7 +57,7 @@ Cache event listeners may also be added and removed while the cache is being use

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/impl/src/test/java/org/ehcache/docs/GettingStarted.java[tag=registerListenerAtRuntime]
include::{sourcedir39}/impl/src/test/java/org/ehcache/docs/GettingStarted.java[tag=registerListenerAtRuntime]
----

<1> Create a `CacheEventListener` implementation instance.
Expand All @@ -73,7 +73,7 @@ Advanced users may want to tune the level of concurrency which may be used for d

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/impl/src/test/java/org/ehcache/docs/GettingStarted.java[tag=configuringEventProcessingQueues]
include::{sourcedir39}/impl/src/test/java/org/ehcache/docs/GettingStarted.java[tag=configuringEventProcessingQueues]
----

<1> Indicate the level of concurrency desired
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/user/caching-concepts.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
= Concepts Related to Caching
ifndef::sourcedir38[]
ifndef::sourcedir39[]
include::{includedir}/common.adoc[]
endif::sourcedir38[]
endif::sourcedir39[]

ifdef::notBuildingForSite[]
include::{includedir}/menu.adoc[]
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/user/caching-patterns.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
= Cache Usage Patterns
ifndef::sourcedir38[]
ifndef::sourcedir39[]
include::{includedir}/common.adoc[]
endif::sourcedir38[]
endif::sourcedir39[]

ifdef::notBuildingForSite[]
include::{includedir}/menu.adoc[]
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/user/caching-terms.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
= Terms Related to Caching
ifndef::sourcedir38[]
ifndef::sourcedir39[]
include::{includedir}/common.adoc[]
endif::sourcedir38[]
endif::sourcedir39[]

ifdef::notBuildingForSite[]
include::{includedir}/menu.adoc[]
Expand Down
4 changes: 2 additions & 2 deletions docs/src/docs/asciidoc/user/class-loading.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
= Class loading
ifndef::sourcedir38[]
ifndef::sourcedir39[]
include::{includedir}/common.adoc[]
endif::sourcedir38[]
endif::sourcedir39[]

ifdef::notBuildingForSite[]
include::{includedir}/menu.adoc[]
Expand Down
20 changes: 10 additions & 10 deletions docs/src/docs/asciidoc/user/clustered-cache.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
---
= Clustered Cache
ifndef::sourcedir38[]
ifndef::sourcedir39[]
include::{includedir}/common.adoc[]
endif::sourcedir38[]
endif::sourcedir39[]

ifdef::notBuildingForSite[]
include::{includedir}/menu.adoc[]
Expand Down Expand Up @@ -157,7 +157,7 @@ Here is a code sample that shows how to configure a cache manager with clusterin

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheManagerExample]
include::{sourcedir39}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheManagerExample]
----

<1> Returns the `org.ehcache.config.builders.CacheManagerBuilder` instance.
Expand All @@ -174,7 +174,7 @@ This code sample demonstrates the usage of the concepts explained in the previou

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheManagerWithServerSideConfigExample]
include::{sourcedir39}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheManagerWithServerSideConfigExample]
----

<1> `defaultServerResource(String)` on `ClusteringServiceConfigurationBuilder` instance sets the default server off-heap resource for the cache manager.
Expand All @@ -201,7 +201,7 @@ When configuring a cache manager to connect to a cluster tier manager there are

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheManagerLifecycle]
include::{sourcedir39}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheManagerLifecycle]
----
<1> In auto create mode if no cluster tier manager exists then one is created with the supplied configuration.
If it exists and its configuration matches the supplied configuration then a connection is established.
Expand All @@ -220,7 +220,7 @@ If it does not exist then the cache manager will fail to initialize.

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheTieredExample]
include::{sourcedir39}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheTieredExample]
----

<1> Configuring the heap tier for cache.
Expand All @@ -230,7 +230,7 @@ The equivalent XML configuration is as follows:

[source%nowrap,xml,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/resources/configs/docs/ehcache-clustered.xml[tag=tieringSample]
include::{sourcedir39}/clustered/client/src/test/resources/configs/docs/ehcache-clustered.xml[tag=tieringSample]
----

<1> Specify the heap tier for cache.
Expand All @@ -253,7 +253,7 @@ This comes with a latency penalty on the write operation required to give this g

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheConsistency]
include::{sourcedir39}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=clusteredCacheConsistency]
----

<1> Specify the consistency level through the use of additional service configuration, using _strong_ consistency here.
Expand All @@ -263,7 +263,7 @@ The equivalent XML configuration is as follows:

[source%nowrap,xml,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/resources/configs/docs/ehcache-clustered.xml[tag=consistencySample]
include::{sourcedir39}/clustered/client/src/test/resources/configs/docs/ehcache-clustered.xml[tag=consistencySample]
----

<1> Specify the consistency level through a custom service configuration from the `clustered` namespace.
Expand Down Expand Up @@ -293,7 +293,7 @@ The example code below shows how this can be implemented.

[source%nowrap,java,indent=0]
----
include::{sourcedir38}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=unspecifiedClusteredCacheExample]
include::{sourcedir39}/clustered/client/src/test/java/org/ehcache/clustered/client/docs/GettingStarted.java[tag=unspecifiedClusteredCacheExample]
----

<1> Configure the first cache manager with auto create on reconnect
Expand Down
8 changes: 4 additions & 4 deletions docs/src/docs/asciidoc/user/common.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
---
ifndef::sourcedir38[]
:version: 3.8
ifndef::sourcedir39[]
:version: 3.9
:notBuildingForSite: true
ifdef::basebackend-html[:outfilesuffix: .html]
:source-highlighter: coderay
Expand All @@ -11,9 +11,9 @@ ifdef::basebackend-html[:outfilesuffix: .html]
:icons: font
:iconfont-remote!:
:iconfont-name: font-awesome.min
:sourcedir38: {gradle-rootdir}
:sourcedir39: {gradle-rootdir}
:imagesdir: images
:sectanchors:
:idprefix:
:idseparator: -
endif::sourcedir38[]
endif::sourcedir39[]
Loading

0 comments on commit 77cfd90

Please sign in to comment.