Record Class MirrorRelocation
- Record Components:
destination- where the copies are now written, canonical — null when no destination could be established at all, which is the state an unreachable account, or one whose server names no default calendar, sits in until that changesmoved- how many copies were written into the destination and their mapping re-pointedrefused- how many old copies the server would not remove, and which therefore stay where they werefailed- how many copies could not be written into the destinationunmovable- how many mapping rows eXo can no longer render an object for, and which are therefore left exactly where they are
Counted rather than merely logged, because the two failures this can meet are not the same and the caller acts differently on each. A copy the server refused to remove leaves a duplicate the user can see, and the change is not finished; a copy eXo can no longer render leaves nothing to move and never will, whatever is retried.
-
Constructor Summary
ConstructorsConstructorDescriptionMirrorRelocation(String destination, int moved, int refused, int failed, int unmovable) Creates an instance of aMirrorRelocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether a destination was established at all.booleancomplete()Whether the destination change may be stamped as applied.static MirrorRelocationdeferred()The answer when no destination could be established — the account cannot be reached, or the registration asks for a default calendar the account names none of.Returns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.intfailed()Returns the value of thefailedrecord component.final inthashCode()Returns a hash code value for this object.intmoved()Returns the value of themovedrecord component.intrefused()Returns the value of therefusedrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theunmovablerecord component.
-
Constructor Details
-
MirrorRelocation
Creates an instance of aMirrorRelocationrecord class.- Parameters:
destination- the value for thedestinationrecord componentmoved- the value for themovedrecord componentrefused- the value for therefusedrecord componentfailed- the value for thefailedrecord componentunmovable- the value for theunmovablerecord component
-
-
Method Details
-
deferred
The answer when no destination could be established — the account cannot be reached, or the registration asks for a default calendar the account names none of.- Returns:
- a relocation that did nothing and applied nothing
-
applicable
public boolean applicable()Whether a destination was established at all.The caller's gate on doing any settings work this pass: comparing the contents of copies against a render is wasted when eXo does not yet know which collection they belong in.
- Returns:
- true when the copies have a destination
-
complete
public boolean complete()Whether the destination change may be stamped as applied.A refused removal and a failed write both mean the next pass has work left to do, and the stamp is what would stop it looking. An unmovable row does not block: it is a permanent property of a mapping that stands for no event eXo can render, it will answer the same on every retry, and letting it hold the stamp open would put every account holding one into a full-content comparison round for ever — which is the cost this whole mechanism exists to pay only once.
- Returns:
- true when nothing this pass tried to do failed
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
destination
Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-
moved
public int moved()Returns the value of themovedrecord component.- Returns:
- the value of the
movedrecord component
-
refused
public int refused()Returns the value of therefusedrecord component.- Returns:
- the value of the
refusedrecord component
-
failed
public int failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-
unmovable
public int unmovable()Returns the value of theunmovablerecord component.- Returns:
- the value of the
unmovablerecord component
-