Enum Class CaldavSyncService.OutboundPhase
- All Implemented Interfaces:
Serializable,Comparable<CaldavSyncService.OutboundPhase>,Constable
- Enclosing class:
CaldavSyncService
Why an enumerated set and not a boolean. These three used to sit
behind one parameter called verifyMirror, and a name describing one
of them governed all three. Connecting asked for no verification, which is
right — the check lists whole collections and was measured at 30 seconds —
and silently lost the two cheap ones with it, so an event a user had
created before connecting was copied by nothing until a sweep came round
a quarter of an hour later (EXO-89804). Nobody decided that; adjacency did.
A second boolean beside the first would have reproduced the defect one
notch along: the fourth piece of outward work would arrive as a third
boolean, every call site would grow another unlabelled false, and
sync(id, login, true, false, true) says nothing at all about what
the pass will do. A set names each piece where the call is written —
EnumSet.of(SETTLE_OWED_COPIES, SEED_UPCOMING_COPIES) reads as the
decision it is — and a phase added tomorrow changes no existing signature
and no existing call: it is absent from every set that does not name it,
which is the only safe default for work that talks to somebody's server.
The order they are declared in is the order they are done in
(CaldavSyncService.runOutboundPhases(long, String, Set) walks values()), so the
ordering is stated once and cannot drift between a sweep and a connection.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCopies the upcoming events the account has never been given — the backfill a freshly connected account needs, and the only thing that carries an event created before the account existed.Writes the copies eXo already knows it owes and has not managed to make.Reads back every copy eXo has written and repairs what has drifted. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static CaldavSyncService.OutboundPhase[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SETTLE_OWED_COPIES
Writes the copies eXo already knows it owes and has not managed to make. Cheap on a converged account: one index lookup answering no rows. -
SEED_UPCOMING_COPIES
Copies the upcoming events the account has never been given — the backfill a freshly connected account needs, and the only thing that carries an event created before the account existed. -
VERIFY_MIRROR
Reads back every copy eXo has written and repairs what has drifted. Lists whole collections, measured at a full 30-second request timeout against one real account: the sweep's alone, never a user's.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-