]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/storage/profiles/SignalProfileEntry.java
Cache profiles for 24h before retrieving them again
[signal-cli] / src / main / java / org / asamk / signal / storage / profiles / SignalProfileEntry.java
diff --git a/src/main/java/org/asamk/signal/storage/profiles/SignalProfileEntry.java b/src/main/java/org/asamk/signal/storage/profiles/SignalProfileEntry.java
new file mode 100644 (file)
index 0000000..0423e12
--- /dev/null
@@ -0,0 +1,30 @@
+package org.asamk.signal.storage.profiles;
+
+import org.signal.zkgroup.profiles.ProfileKey;
+
+public class SignalProfileEntry {
+
+    private ProfileKey profileKey;
+
+    private long lastUpdateTimestamp;
+
+    private SignalProfile profile;
+
+    public SignalProfileEntry(final ProfileKey profileKey, final long lastUpdateTimestamp, final SignalProfile profile) {
+        this.profileKey = profileKey;
+        this.lastUpdateTimestamp = lastUpdateTimestamp;
+        this.profile = profile;
+    }
+
+    public ProfileKey getProfileKey() {
+        return profileKey;
+    }
+
+    public long getLastUpdateTimestamp() {
+        return lastUpdateTimestamp;
+    }
+
+    public SignalProfile getProfile() {
+        return profile;
+    }
+}