Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LPD-40485 Ehcache] LPD-41245 Upgrade to Ehcache 3 #7721

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c4ae5c9
LPD-43563 Remove support for reading and handling cache manager event…
dantewang Dec 5, 2024
a57c155
LPD-43563 Remove support for reading and handling cache event listene…
dantewang Dec 5, 2024
7bd3fa0
LPD-43563 Now it should be a Util, not a component
dantewang Dec 5, 2024
6b7bf10
LPD-43563 Sem ver
dantewang Dec 5, 2024
bd37077
LPD-41245 Update dependency to Ehcache 3.10.8
dantewang Dec 6, 2024
9cf821f
LPD-41245 Migrate all Ehcache XML configurations to the version 3 format
dantewang Dec 6, 2024
086871d
LPD-41245 Migrate configuration parsing to Ehcache 3, getting the def…
dantewang Dec 6, 2024
82b7aa5
LPD-41245 Migrate ManagementService, create and register MBean interf…
dantewang Dec 6, 2024
fc0594a
LPD-41245 Migrate event listeners
dantewang Dec 6, 2024
ff8270b
LPD-41245 Migrate BaseEhcachePortalCacheManager, properly handle the …
dantewang Dec 6, 2024
c7a0c82
LPD-41245 Migrate EhcachePortalCache and ShardedEhcachePortalCache to…
dantewang Dec 6, 2024
e9ae107
LPD-41245 Suppress cache creation logs
dantewang Dec 6, 2024
50cd68f
LPD-41245 Implement custom ExpiryPolicy and insert to all caches to k…
dantewang Dec 6, 2024
4ed3279
LPD-41245 Migrate tests
dantewang Dec 6, 2024
b4de7c6
LPD-41245 SF, remove unused methods
dantewang Dec 6, 2024
156a77f
LPD-41245 Ehcache 3 no longer fires removeAll event, notify the liste…
dantewang Dec 6, 2024
05fbcfc
LPD-41245 Ehcache 3 no longer fires remove event when there's nothing…
dantewang Dec 6, 2024
31c5015
LPD-41245 Clean up bnd.bnd
dantewang Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<ehcache
dynamicConfig="true"
monitoring="off"
name="module-multi-vm"
updateCheck="false"
<config
xmlns="http://www.ehcache.org/v3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
xsi:schemaLocation="http://www.ehcache.org/v3 https://www.ehcache.org/schema/ehcache-core-3.10.xsd"
>
<cache
eternal="false"
maxElementsInMemory="10000"
name="com.liferay.dynamic.data.mapping.data.provider.rest.internal.DDMRESTDataProvider"
overflowToDisk="false"
timeToIdleSeconds="600"
alias="com.liferay.dynamic.data.mapping.data.provider.rest.internal.DDMRESTDataProvider"
>
<expiry>
<tti>600</tti>
</expiry>
<heap>10000</heap>
</cache>
</ehcache>
</config>
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<ehcache
dynamicConfig="true"
monitoring="off"
name="module-single-vm"
updateCheck="false"
<config
xmlns="http://www.ehcache.org/v3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
xsi:schemaLocation="http://www.ehcache.org/v3 https://www.ehcache.org/schema/ehcache-core-3.10.xsd"
>
<cache
eternal="false"
maxElementsInMemory="100000"
name="com.liferay.ip.geocoder.internal.IPGeocoderImpl"
overflowToDisk="false"
timeToIdleSeconds="3600"
alias="com.liferay.ip.geocoder.internal.IPGeocoderImpl"
>
<expiry>
<tti>3600</tti>
</expiry>
<heap>100000</heap>
</cache>
</ehcache>
</config>
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<ehcache
dynamicConfig="true"
monitoring="off"
name="module-multi-vm"
updateCheck="false"
<config
xmlns="http://www.ehcache.org/v3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ehcache.org/ehcache.xsd"
xsi:schemaLocation="http://www.ehcache.org/v3 https://www.ehcache.org/schema/ehcache-core-3.10.xsd"
>
<cache
eternal="false"
maxElementsInMemory="10000"
name="com.liferay.journal.util.JournalContent"
overflowToDisk="false"
timeToIdleSeconds="600"
alias="com.liferay.journal.util.JournalContent"
>
<expiry>
<tti>600</tti>
</expiry>
<heap>10000</heap>
</cache>
</ehcache>
</config>
2 changes: 1 addition & 1 deletion modules/apps/portal-cache/portal-cache-api/bnd.bnd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Bundle-Name: Liferay Portal Cache API
Bundle-SymbolicName: com.liferay.portal.cache.api
Bundle-Version: 12.2.1
Bundle-Version: 13.0.0
Export-Package:\
com.liferay.portal.cache,\
com.liferay.portal.cache.configuration,\
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,39 @@ public class PortalCacheConfiguration {

public PortalCacheConfiguration(
String portalCacheName,
Set<Properties> portalCacheListenerPropertiesSet) {
Set<Properties> portalCacheReplicatorPropertiesSet) {

if (portalCacheName == null) {
throw new NullPointerException("Portal cache name is null");
}

_portalCacheName = portalCacheName;

if (portalCacheListenerPropertiesSet == null) {
_portalCacheListenerPropertiesSet = Collections.emptySet();
if (portalCacheReplicatorPropertiesSet == null) {
_portalCacheReplicatorPropertiesSet = Collections.emptySet();
}
else {
_portalCacheListenerPropertiesSet = new HashSet<>(
portalCacheListenerPropertiesSet);
_portalCacheReplicatorPropertiesSet = new HashSet<>(
portalCacheReplicatorPropertiesSet);
}
}

public Set<Properties> getPortalCacheListenerPropertiesSet() {
return _portalCacheListenerPropertiesSet;
}

public String getPortalCacheName() {
return _portalCacheName;
}

public Set<Properties> getPortalCacheReplicatorPropertiesSet() {
return _portalCacheReplicatorPropertiesSet;
}

public PortalCacheConfiguration newPortalCacheConfiguration(
String portalCacheName) {

return new PortalCacheConfiguration(
portalCacheName, _portalCacheListenerPropertiesSet);
portalCacheName, _portalCacheReplicatorPropertiesSet);
}

private final Set<Properties> _portalCacheListenerPropertiesSet;
private final String _portalCacheName;
private final Set<Properties> _portalCacheReplicatorPropertiesSet;

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
package com.liferay.portal.cache.configuration;

import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

Expand All @@ -18,18 +16,9 @@
public class PortalCacheManagerConfiguration {

public PortalCacheManagerConfiguration(
Set<Properties> portalCacheManagerListenerPropertiesSet,
PortalCacheConfiguration defaultPortalCacheConfiguration,
Set<PortalCacheConfiguration> portalCacheConfigurations) {

if (portalCacheManagerListenerPropertiesSet == null) {
_portalCacheManagerListenerPropertiesSet = Collections.emptySet();
}
else {
_portalCacheManagerListenerPropertiesSet = new HashSet<>(
portalCacheManagerListenerPropertiesSet);
}

_defaultPortalCacheConfiguration = defaultPortalCacheConfiguration;

if (portalCacheConfigurations != null) {
Expand Down Expand Up @@ -65,11 +54,6 @@ public PortalCacheConfiguration getPortalCacheConfiguration(
return portalCacheConfiguration;
}

public Set<Properties> getPortalCacheManagerListenerPropertiesSet() {
return Collections.unmodifiableSet(
_portalCacheManagerListenerPropertiesSet);
}

public Set<String> getPortalCacheNames() {
return Collections.unmodifiableSet(_portalCacheConfigurations.keySet());
}
Expand All @@ -91,6 +75,5 @@ public void setDefaultPortalCacheConfiguration(
private PortalCacheConfiguration _defaultPortalCacheConfiguration;
private final Map<String, PortalCacheConfiguration>
_portalCacheConfigurations = new ConcurrentHashMap<>();
private final Set<Properties> _portalCacheManagerListenerPropertiesSet;

}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version 3.2.0
version 4.0.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version 11.0.0
version 12.0.0
36 changes: 0 additions & 36 deletions modules/apps/portal-cache/portal-cache-ehcache-impl/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,4 @@ Bundle-Name: Liferay Portal Cache Ehcache Implementation
Bundle-SymbolicName: com.liferay.portal.cache.ehcache.impl
Bundle-Version: 4.0.35
DynamicImport-Package: *
Import-Package:\
!org.hibernate.*,\
\
!org.quartz,\
!org.quartz.impl,\
!org.quartz.impl.jdbcjobstore,\
!org.quartz.impl.matchers,\
!org.quartz.simpl,\
\
!org.terracotta.quartz,\
!org.terracotta.toolkit,\
!org.terracotta.toolkit.atomic,\
!org.terracotta.toolkit.builder,\
!org.terracotta.toolkit.cache,\
!org.terracotta.toolkit.cluster,\
!org.terracotta.toolkit.collections,\
!org.terracotta.toolkit.concurrent.locks,\
!org.terracotta.toolkit.config,\
!org.terracotta.toolkit.events,\
!org.terracotta.toolkit.feature,\
!org.terracotta.toolkit.internal,\
!org.terracotta.toolkit.internal.cache,\
!org.terracotta.toolkit.internal.cluster,\
!org.terracotta.toolkit.internal.collections,\
!org.terracotta.toolkit.internal.concurrent.locks,\
!org.terracotta.toolkit.internal.feature,\
!org.terracotta.toolkit.monitoring,\
!org.terracotta.toolkit.nonstop,\
!org.terracotta.toolkit.rejoin,\
!org.terracotta.toolkit.search,\
!org.terracotta.toolkit.search.attribute,\
!org.terracotta.toolkit.store,\
\
!sun.misc,\
\
*
-dsannotations-options: inherit
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
compileInclude group: "com.liferay", name: "net.sf.ehcache", version: "2.10.6.LIFERAY-PATCHED-2"
compileInclude group: "org.ehcache", name: "ehcache", version: "3.10.8"

compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "default"
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "default"
Expand Down
Loading