org.springframework.session.data.redis.RedisFlushMode Java Examples
The following examples show how to use
org.springframework.session.data.redis.RedisFlushMode.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RedisHttpSessionConfiguration.java From spring-session with Apache License 2.0 | 6 votes |
@Override @SuppressWarnings("deprecation") public void setImportMetadata(AnnotationMetadata importMetadata) { Map<String, Object> attributeMap = importMetadata .getAnnotationAttributes(EnableRedisHttpSession.class.getName()); AnnotationAttributes attributes = AnnotationAttributes.fromMap(attributeMap); this.maxInactiveIntervalInSeconds = attributes.getNumber("maxInactiveIntervalInSeconds"); String redisNamespaceValue = attributes.getString("redisNamespace"); if (StringUtils.hasText(redisNamespaceValue)) { this.redisNamespace = this.embeddedValueResolver.resolveStringValue(redisNamespaceValue); } FlushMode flushMode = attributes.getEnum("flushMode"); RedisFlushMode redisFlushMode = attributes.getEnum("redisFlushMode"); if (flushMode == FlushMode.ON_SAVE && redisFlushMode != RedisFlushMode.ON_SAVE) { flushMode = redisFlushMode.getFlushMode(); } this.flushMode = flushMode; this.saveMode = attributes.getEnum("saveMode"); String cleanupCron = attributes.getString("cleanupCron"); if (StringUtils.hasText(cleanupCron)) { this.cleanupCron = cleanupCron; } }
Example #2
Source File: ChoerodonRedisHttpSessionConfiguration.java From oauth-server with Apache License 2.0 | 4 votes |
public ChoerodonRedisHttpSessionConfiguration() { this.redisFlushMode = RedisFlushMode.ON_SAVE; }
Example #3
Source File: ChoerodonRedisHttpSessionConfiguration.java From oauth-server with Apache License 2.0 | 4 votes |
public void setRedisFlushMode(RedisFlushMode redisFlushMode) { Assert.notNull(redisFlushMode, "redisFlushMode cannot be null"); this.redisFlushMode = redisFlushMode; }
Example #4
Source File: RedisHttpSessionConfiguration.java From spring-session with Apache License 2.0 | 4 votes |
@Deprecated public void setRedisFlushMode(RedisFlushMode redisFlushMode) { Assert.notNull(redisFlushMode, "redisFlushMode cannot be null"); setFlushMode(redisFlushMode.getFlushMode()); }
Example #5
Source File: RedisWebSessionConfiguration.java From spring-session with Apache License 2.0 | 4 votes |
@Deprecated public void setRedisFlushMode(RedisFlushMode redisFlushMode) { Assert.notNull(redisFlushMode, "redisFlushMode cannot be null"); }
Example #6
Source File: RedisHttpSessionConfigurationTests.java From spring-session with Apache License 2.0 | 4 votes |
CustomFlushImmediatelySetLegacyConfiguration() { setRedisFlushMode(RedisFlushMode.IMMEDIATE); }