Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
1377c51c
Commit
1377c51c
authored
Nov 19, 2015
by
Tom Evans
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #387 from tevans/OF-974
OF-974: Migrate cache content
parents
e5e67a1b
18af4f0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
CacheFactory.java
src/java/org/jivesoftware/util/cache/CacheFactory.java
+4
-2
No files found.
src/java/org/jivesoftware/util/cache/CacheFactory.java
View file @
1377c51c
...
...
@@ -732,12 +732,13 @@ public class CacheFactory {
@SuppressWarnings
(
"unchecked"
)
public
static
synchronized
void
joinedCluster
()
{
cacheFactoryStrategy
=
clusteredCacheFactoryStrategy
;
// Loop through local caches and switch them to clustered cache (
purge
content)
// Loop through local caches and switch them to clustered cache (
copy
content)
for
(
Cache
cache
:
getAllCaches
())
{
// skip local-only caches
if
(
localOnly
.
contains
(
cache
.
getName
()))
continue
;
CacheWrapper
cacheWrapper
=
((
CacheWrapper
)
cache
);
Cache
clusteredCache
=
cacheFactoryStrategy
.
createCache
(
cacheWrapper
.
getName
());
clusteredCache
.
putAll
(
cache
);
cacheWrapper
.
setWrappedCache
(
clusteredCache
);
}
clusteringStarting
=
false
;
...
...
@@ -753,12 +754,13 @@ public class CacheFactory {
clusteringStarted
=
false
;
cacheFactoryStrategy
=
localCacheFactoryStrategy
;
// Loop through clustered caches and change them to local caches (
purge
content)
// Loop through clustered caches and change them to local caches (
copy
content)
for
(
Cache
cache
:
getAllCaches
())
{
// skip local-only caches
if
(
localOnly
.
contains
(
cache
.
getName
()))
continue
;
CacheWrapper
cacheWrapper
=
((
CacheWrapper
)
cache
);
Cache
standaloneCache
=
cacheFactoryStrategy
.
createCache
(
cacheWrapper
.
getName
());
standaloneCache
.
putAll
(
cache
);
cacheWrapper
.
setWrappedCache
(
standaloneCache
);
}
log
.
info
(
"Clustering stopped; cache migration complete"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment