Interface Segment<K,​V>

    • Method Detail

      • fill

        V fill​(K key,
               V value)
        See OffHeapHashMap.fill(Object, Object) for a detailed description.
        Parameters:
        key - key with which the specified value is to be associated
        value - value to be associated with the specified key
        Returns:
        the previous value associated with key, or null if there was no mapping for key (irrespective of whether the value was successfully installed).
      • fill

        V fill​(K key,
               V value,
               int metadata)
      • put

        V put​(K key,
              V value,
              int metadata)
      • getMetadata

        java.lang.Integer getMetadata​(K key,
                                      int mask)
      • getAndSetMetadata

        java.lang.Integer getAndSetMetadata​(K key,
                                            int mask,
                                            int values)
      • getValueAndSetMetadata

        V getValueAndSetMetadata​(K key,
                                 int mask,
                                 int values)
      • getLock

        java.util.concurrent.locks.ReentrantReadWriteLock getLock()
                                                           throws java.lang.UnsupportedOperationException
        Return the ReentrantReadWriteLock used by this segment.
        Returns:
        RRWL for this segment
        Throws:
        java.lang.UnsupportedOperationException - if this segment does not use a RRWL
      • removeNoReturn

        boolean removeNoReturn​(java.lang.Object key)
      • destroy

        void destroy()
      • shrink

        boolean shrink()
      • computeIfAbsentWithMetadata

        MetadataTuple<V> computeIfAbsentWithMetadata​(K key,
                                                     java.util.function.Function<? super K,​? extends MetadataTuple<V>> mappingFunction)