Class AtomixAtomicCounterMap<K>

  • All Implemented Interfaces:
    org.onosproject.store.service.AsyncAtomicCounterMap<K>, org.onosproject.store.service.DistributedPrimitive

    public class AtomixAtomicCounterMap<K>
    extends Object
    implements org.onosproject.store.service.AsyncAtomicCounterMap<K>
    Atomix atomic counter map.
    • Constructor Detail

      • AtomixAtomicCounterMap

        public AtomixAtomicCounterMap​(io.atomix.core.map.AsyncAtomicCounterMap<K> atomixMap)
    • Method Detail

      • name

        public String name()
        Specified by:
        name in interface org.onosproject.store.service.DistributedPrimitive
      • incrementAndGet

        public CompletableFuture<Long> incrementAndGet​(K key)
        Specified by:
        incrementAndGet in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • decrementAndGet

        public CompletableFuture<Long> decrementAndGet​(K key)
        Specified by:
        decrementAndGet in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • getAndIncrement

        public CompletableFuture<Long> getAndIncrement​(K key)
        Specified by:
        getAndIncrement in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • getAndDecrement

        public CompletableFuture<Long> getAndDecrement​(K key)
        Specified by:
        getAndDecrement in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • addAndGet

        public CompletableFuture<Long> addAndGet​(K key,
                                                 long delta)
        Specified by:
        addAndGet in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • getAndAdd

        public CompletableFuture<Long> getAndAdd​(K key,
                                                 long delta)
        Specified by:
        getAndAdd in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • get

        public CompletableFuture<Long> get​(K key)
        Specified by:
        get in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • put

        public CompletableFuture<Long> put​(K key,
                                           long newValue)
        Specified by:
        put in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • putIfAbsent

        public CompletableFuture<Long> putIfAbsent​(K key,
                                                   long newValue)
        Specified by:
        putIfAbsent in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • replace

        public CompletableFuture<Boolean> replace​(K key,
                                                  long expectedOldValue,
                                                  long newValue)
        Specified by:
        replace in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • remove

        public CompletableFuture<Long> remove​(K key)
        Specified by:
        remove in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • remove

        public CompletableFuture<Boolean> remove​(K key,
                                                 long value)
        Specified by:
        remove in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • size

        public CompletableFuture<Integer> size()
        Specified by:
        size in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • isEmpty

        public CompletableFuture<Boolean> isEmpty()
        Specified by:
        isEmpty in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>
      • clear

        public CompletableFuture<Void> clear()
        Specified by:
        clear in interface org.onosproject.store.service.AsyncAtomicCounterMap<K>