Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Storage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU Software
OSDU Data Platform
System
Storage
Merge requests
!540
added ability to config redis password and ssl (GONRG-5301)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
added ability to config redis password and ssl (GONRG-5301)
gcp-password-for-redis
into
master
Overview
0
Commits
2
Pipelines
4
Changes
6
Merged
Rustam Lotsmanenko (EPAM)
requested to merge
gcp-password-for-redis
into
master
2 years ago
Overview
0
Commits
2
Pipelines
4
Changes
6
Expand
added ability to config redis password and ssl
Edited
2 years ago
by
Riabokon Stanislav(EPAM)[GCP]
1
0
Merge request reports
Compare
master
version 1
31144a53
2 years ago
master (base)
and
latest version
latest version
36a744b9
2 commits,
2 years ago
version 1
31144a53
1 commit,
2 years ago
6 files
+
96
−
24
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
provider/storage-gcp/src/main/java/org/opengroup/osdu/storage/provider/gcp/web/cache/CacheConfig.java
0 → 100644
+
69
−
0
Options
/*
* Copyright 2020-2022 Google LLC
* Copyright 2020-2022 EPAM Systems, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org.opengroup.osdu.storage.provider.gcp.web.cache
;
import
lombok.RequiredArgsConstructor
;
import
org.opengroup.osdu.storage.provider.gcp.web.config.GcpAppServiceConfig
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
@Configuration
@RequiredArgsConstructor
public
class
CacheConfig
{
private
final
GcpAppServiceConfig
gcpAppServiceConfig
;
@Bean
public
GroupCache
groupCache
()
{
String
redisGroupHost
=
gcpAppServiceConfig
.
getRedisGroupHost
();
Integer
redisGroupPort
=
gcpAppServiceConfig
.
getRedisGroupPort
();
String
redisGroupPassword
=
gcpAppServiceConfig
.
getRedisGroupPassword
();
Integer
redisGroupExpiration
=
gcpAppServiceConfig
.
getRedisGroupExpiration
();
Boolean
redisGroupWithSsl
=
gcpAppServiceConfig
.
getRedisGroupWithSsl
();
return
redisGroupPassword
!=
null
?
new
GroupCache
(
redisGroupHost
,
redisGroupPort
,
redisGroupPassword
,
redisGroupExpiration
,
redisGroupWithSsl
)
:
new
GroupCache
(
redisGroupHost
,
redisGroupPort
,
redisGroupExpiration
);
}
@Bean
(
"LegalTagCache"
)
public
LegalTagCache
legalTagCache
()
{
String
redisStorageHost
=
gcpAppServiceConfig
.
getRedisStorageHost
();
Integer
redisStoragePort
=
gcpAppServiceConfig
.
getRedisStoragePort
();
String
redisStoragePassword
=
gcpAppServiceConfig
.
getRedisStoragePassword
();
Integer
redisStorageExpiration
=
gcpAppServiceConfig
.
getRedisStorageExpiration
();
Boolean
redisStorageWithSsl
=
gcpAppServiceConfig
.
getRedisStorageWithSsl
();
return
redisStoragePassword
!=
null
?
new
LegalTagCache
(
redisStorageHost
,
redisStoragePort
,
redisStoragePassword
,
redisStorageExpiration
,
redisStorageWithSsl
)
:
new
LegalTagCache
(
redisStorageHost
,
redisStoragePort
,
redisStorageExpiration
);
}
@Bean
public
SchemaCache
schemaCache
()
{
String
redisStorageHost
=
gcpAppServiceConfig
.
getRedisStorageHost
();
Integer
redisStoragePort
=
gcpAppServiceConfig
.
getRedisStoragePort
();
String
redisStoragePassword
=
gcpAppServiceConfig
.
getRedisStoragePassword
();
Integer
redisStorageExpiration
=
gcpAppServiceConfig
.
getRedisStorageExpiration
();
Boolean
redisStorageWithSsl
=
gcpAppServiceConfig
.
getRedisStorageWithSsl
();
return
redisStoragePassword
!=
null
?
new
SchemaCache
(
redisStorageHost
,
redisStoragePort
,
redisStoragePassword
,
redisStorageExpiration
,
redisStorageWithSsl
)
:
new
SchemaCache
(
redisStorageHost
,
redisStoragePort
,
redisStorageExpiration
);
}
}
Loading