@@ -19,6 +19,10 @@ public class AccessControlLogEntry implements Serializable {
19
19
public static final String USERNAME = "username" ;
20
20
public static final String AGE_SECONDS = "age-seconds" ;
21
21
public static final String CLIENT_INFO = "client-info" ;
22
+ // Redis 7.2
23
+ public static final String ENTRY_ID = "entry-id" ;
24
+ public static final String TIMESTAMP_CREATED = "timestamp-created" ;
25
+ public static final String TIMESTAMP_LAST_UPDATED = "timestamp-last-updated" ;
22
26
23
27
private long count ;
24
28
private final String reason ;
@@ -28,6 +32,9 @@ public class AccessControlLogEntry implements Serializable {
28
32
private final String ageSeconds ;
29
33
private final Map <String , String > clientInfo ;
30
34
private final Map <String , Object > logEntry ;
35
+ private final long entryId ;
36
+ private final long timestampCreated ;
37
+ private final long timestampLastUpdated ;
31
38
32
39
public AccessControlLogEntry (Map <String , Object > map ) {
33
40
count = (long ) map .get (COUNT );
@@ -38,6 +45,9 @@ public AccessControlLogEntry(Map<String, Object> map) {
38
45
ageSeconds = (String ) map .get (AGE_SECONDS );
39
46
clientInfo = getMapFromRawClientInfo ((String ) map .get (CLIENT_INFO ));
40
47
logEntry = map ;
48
+ entryId = (long ) map .get (ENTRY_ID );
49
+ timestampCreated = (long ) map .get (TIMESTAMP_CREATED );
50
+ timestampLastUpdated = (long ) map .get (TIMESTAMP_LAST_UPDATED );
41
51
}
42
52
43
53
public long getCount () {
@@ -75,6 +85,18 @@ public Map<String, Object> getlogEntry() {
75
85
return logEntry ;
76
86
}
77
87
88
+ public long getEntryId () {
89
+ return entryId ;
90
+ }
91
+
92
+ public long getTimestampCreated () {
93
+ return timestampCreated ;
94
+ }
95
+
96
+ public long getTimestampLastUpdated () {
97
+ return timestampLastUpdated ;
98
+ }
99
+
78
100
/**
79
101
* Convert the client-info string into a Map of String. When the value is empty, the value in the
80
102
* map is set to an empty string The key order is maintained to reflect the string return by Redis
@@ -95,6 +117,8 @@ private Map<String, String> getMapFromRawClientInfo(String clientInfo) {
95
117
public String toString () {
96
118
return "AccessControlLogEntry{" + "count=" + count + ", reason='" + reason + '\''
97
119
+ ", context='" + context + '\'' + ", object='" + object + '\'' + ", username='" + username
98
- + '\'' + ", ageSeconds='" + ageSeconds + '\'' + ", clientInfo=" + clientInfo + '}' ;
120
+ + '\'' + ", ageSeconds='" + ageSeconds + '\'' + ", clientInfo=" + clientInfo
121
+ + ", entryId=" + entryId + ", timestampCreated=" + timestampCreated
122
+ + ", timestampLastUpdated=" + timestampLastUpdated + '}' ;
99
123
}
100
124
}
0 commit comments