Package io.meeds.commons.digest.service
Class DigestEnrollmentStorage
java.lang.Object
io.meeds.commons.digest.service.DigestEnrollmentStorage
Keeps NTF_DIGEST_USERS, the work list of the digest sender job, in sync with
the choices of the users: the row holds only what the job needs to answer
"which users are due now?".
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfindEnrolled(Collection<String> usernames) Answers "which of these users has a digest enabled?" with one indexed read of the work list, so that the caller reads the settings of those users only.voidupdateTimeZone(String username, String timeZone) Refreshes the timezone copy of an enrolled user; a user without a row has no digest, nothing to refresh.
-
Constructor Details
-
DigestEnrollmentStorage
-
-
Method Details
-
findEnrolled
Answers "which of these users has a digest enabled?" with one indexed read of the work list, so that the caller reads the settings of those users only. A row exists in the work list if and only if a frequency is on.- Parameters:
usernames- the users to narrow down- Returns:
- those of them having a row, in no particular order
-
updateTimeZone
Refreshes the timezone copy of an enrolled user; a user without a row has no digest, nothing to refresh. -
enroll
-