pt.unl.fct.di.novasys.babel.crdts.operation.utils

Class CounterOperation



  • public class CounterOperation
    extends Operation
    An operation issued by the operation-based counter CRDT (OpCounter) that extends a generic Operation. Beyond storing the information of its super class, it stores information about the value (amount incremented or decremented on the counter)
    • Field Detail

      • serializer

        public static pt.unl.fct.di.novasys.network.ISerializer<CounterOperation> serializer
        A serializer that serializes a CounterOperation into (and from) a ByteBuf.
    • Constructor Detail

      • CounterOperation

        public CounterOperation(OperationType opType,
                                String crdtId,
                                CRDTsTypes crdtType,
                                int value)
        Creates a counter operation
        Parameters:
        opType - the operation type (i.e., increment or decrement)
        crdtId - the CRDT identifier
        crdtType - the CRDT type where the operation was issued (e.g., OpCounter)
        value - the value of the counter
    • Method Detail

      • getValue

        public int getValue()

Copyright © 2024. All rights reserved.