Package io.keikai.doc.collab.structs
Class GC
- java.lang.Object
-
- io.keikai.doc.collab.structs.AbstractStruct
-
- io.keikai.doc.collab.structs.GC
-
public class GC extends AbstractStruct
-
-
Field Summary
Fields Modifier and Type Field Description static intSTRUCT_GC_REF_NUMBER
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()java.lang.IntegergetMissing(Transaction transaction, StructStore store)Since GC structs are always considered deleted, they don't have missing parts.voidintegrate(Transaction transaction, int offset)Integrate this struct into a transaction.booleanisDeleted()booleanmergeWith(AbstractStruct right)Merge this struct with the item to the right.voidwrite(UpdateEncoder encoder, int offset)Write data to the encoder.-
Methods inherited from class io.keikai.doc.collab.structs.AbstractStruct
getId, length, setLength, write
-
-
-
-
Field Detail
-
STRUCT_GC_REF_NUMBER
public static final int STRUCT_GC_REF_NUMBER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GC
public GC(ID id, int length)
-
-
Method Detail
-
isDeleted
public boolean isDeleted()
- Overrides:
isDeletedin classAbstractStruct- Returns:
- boolean indicating if this struct is deleted
-
delete
public void delete()
-
mergeWith
public boolean mergeWith(AbstractStruct right)
Description copied from class:AbstractStructMerge this struct with the item to the right. This method assumes that `this.id.clock + this.length === right.id.clock`. Also, this method does *not* remove the right struct from the StructStore!- Overrides:
mergeWithin classAbstractStruct- Parameters:
right-- Returns:
- boolean indicating whether the merge was successful.
-
integrate
public void integrate(Transaction transaction, int offset)
Description copied from class:AbstractStructIntegrate this struct into a transaction.- Overrides:
integratein classAbstractStruct- Parameters:
transaction- The transaction object.offset- The offset value.
-
write
public void write(UpdateEncoder encoder, int offset)
Description copied from class:AbstractStructWrite data to the encoder.- Overrides:
writein classAbstractStruct- Parameters:
encoder- The UpdateEncoderV1 encoder.offset- The offset value.
-
getMissing
public java.lang.Integer getMissing(Transaction transaction, StructStore store)
Since GC structs are always considered deleted, they don't have missing parts.- Parameters:
transaction- The transaction object.store- The struct store.- Returns:
- null since there's no missing client ID.
-
-