Repository navigation
Added SQL analysis example to Spring Session - #814
TomaszGaweda wants to merge 3 commits into
Conversation
|
|
||
| <properties> | ||
| <hazelcast.version>5.6.0</hazelcast.version> | ||
| <hazelcast.version>5.7.0</hazelcast.version> |
There was a problem hiding this comment.
Could this inherit from parent to avoid hardcoding?
There was a problem hiding this comment.
various samples use different versions though
| jet: | ||
| enabled: true | ||
| resource-upload-enabled: true | ||
|
|
There was a problem hiding this comment.
nit consistency with other config.
| Instant lastAccessedTime = s.getLastAccessedTime(); | ||
| Duration howLongInactive = Duration.between(lastAccessedTime, Instant.now()); | ||
| String timeStatus = howLongInactive.compareTo(MAX_INACTIVE_DURATION) > 0 |
There was a problem hiding this comment.
| Instant lastAccessedTime = s.getLastAccessedTime(); | |
| Duration howLongInactive = Duration.between(lastAccessedTime, Instant.now()); | |
| String timeStatus = howLongInactive.compareTo(MAX_INACTIVE_DURATION) > 0 | |
| String timeStatus = Instant.now().isAfter(s.getLastAccessedTime().plus(MAX_INACTIVE_DURATION)) |
existing functionality, but more readable
| LocalDateTime timestamp = lastAccessedTime == null ? null | ||
| : LocalDateTime.ofInstant(Instant.ofEpochMilli(lastAccessedTime.getTime()), ZoneOffset.UTC); |
There was a problem hiding this comment.
serializing localdatetimes sounds potentially problematic - why not as instants?
There was a problem hiding this comment.
no particular reason tbh - just an example. There is no method with Instant as parameter, so either LocalDate or LocalDateTime
| } | ||
| } | ||
|
|
||
| private static String formatSqlResult(SqlResult result) { |
There was a problem hiding this comment.
Is there not some library we can use for this formatting instead?
Also, \n -> System.lineSeperator().
There was a problem hiding this comment.
I think of removing it at all. Quite a bad code to show, right? 😅
Added SQL analysis example to Spring Session to be used with blog post.,