ConcurrentSkipListMap Class

Definition

A scalable concurrent ConcurrentNavigableMap implementation.

[Android.Runtime.Register("java/util/concurrent/ConcurrentSkipListMap", DoNotGenerateAcw=true)]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })]
public class ConcurrentSkipListMap : Java.Util.AbstractMap, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable, Java.Lang.ICloneable
[<Android.Runtime.Register("java/util/concurrent/ConcurrentSkipListMap", DoNotGenerateAcw=true)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })>]
type ConcurrentSkipListMap = class
    inherit AbstractMap
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface ICloneable
Inheritance
ConcurrentSkipListMap
Attributes
Implements

Remarks

A scalable concurrent ConcurrentNavigableMap implementation. The map is sorted according to the Comparable natural ordering of its keys, or by a Comparator provided at map creation time, depending on which constructor is used.

This class implements a concurrent variant of SkipLists providing expected average log(n) time cost for the containsKey, get, put and remove operations and their variants. Insertion, removal, update, and access operations safely execute concurrently by multiple threads.

Iterators and spliterators are <i>weakly consistent</i>.

Ascending key ordered views and their iterators are faster than descending ones.

All Map.Entry pairs returned by methods in this class and its views represent snapshots of mappings at the time they were produced. They do <em>not</em> support the Entry.setValue method. (Note however that it is possible to change mappings in the associated map using put, putIfAbsent, or replace, depending on exactly which effect you need.)

Beware that bulk operations putAll, equals, toArray, containsValue, and clear are <em>not</em> guaranteed to be performed atomically. For example, an iterator operating concurrently with a putAll operation might view only some of the added elements.

This class and its views and iterators implement all of the <em>optional</em> methods of the Map and Iterator interfaces. Like most other concurrent collections, this class does <em>not</em> permit the use of null keys or values because some null return values cannot be reliably distinguished from the absence of elements.

This class is a member of the Java Collections Framework.

Added in 1.6.

Java documentation for java.util.concurrent.ConcurrentSkipListMap.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

ConcurrentSkipListMap()

Constructs a new, empty map, sorted according to the Comparable natural ordering of the keys.

ConcurrentSkipListMap(IComparator)

Constructs a new, empty map, sorted according to the specified comparator.

ConcurrentSkipListMap(IDictionary)

Constructs a new map containing the same mappings as the given map, sorted according to the Comparable natural ordering of the keys.

ConcurrentSkipListMap(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsEmpty

To be added

(Inherited from AbstractMap)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

CeilingEntry(Object)

Returns a key-value mapping associated with the least key greater than or equal to the given key, or null if there is no such entry.

CeilingKey(Object)
Clear()

To be added

(Inherited from AbstractMap)
Clone()

Returns a shallow copy of this ConcurrentSkipListMap instance.

Comparator()

Returns the comparator used to compare keys in this sorted map, or null if the natural ordering is in use.

Compute(Object, IBiFunction)

Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping).

ComputeIfAbsent(Object, IFunction)

If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless null.

ComputeIfPresent(Object, IBiFunction)

If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value.

ContainsKey(Object)

To be added

(Inherited from AbstractMap)
ContainsValue(Object)

To be added

(Inherited from AbstractMap)
DescendingKeySet()

Returns a reverse order INavigableSet view of the keys contained in this map.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
EntrySet()

Returns a Set view of the mappings contained in this map.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
FirstEntry()

Returns a key-value mapping associated with the least key in this map, or null if the map is empty.

FirstKey()

Returns the least key in this sorted map.

FloorEntry(Object)

Returns a key-value mapping associated with the greatest key less than or equal to the given key, or null if there is no such key.

FloorKey(Object)
ForEach(IBiConsumer)
Get(Object)

To be added

(Inherited from AbstractMap)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetOrDefault(Object, Object)

Returns the value to which the specified key is mapped, or the given defaultValue if this map contains no mapping for the key.

HigherEntry(Object)

Returns a key-value mapping associated with the least key strictly greater than the given key, or null if there is no such key.

HigherKey(Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
KeySet()

To be added

(Inherited from AbstractMap)
LastEntry()

Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.

LastKey()

Returns the greatest key in this sorted map.

LowerEntry(Object)

Returns a key-value mapping associated with the greatest key strictly less than the given key, or null if there is no such key.

LowerKey(Object)
Merge(Object, Object, IBiFunction)

If the specified key is not already associated with a value, associates it with the given value.

NavigableKeySet()

Returns a INavigableSet view of the keys contained in this map.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
PollFirstEntry()

Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty.

PollLastEntry()

Removes and returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.

Put(Object, Object)

To be added

(Inherited from AbstractMap)
PutAll(IDictionary)

To be added

(Inherited from AbstractMap)
PutIfAbsent(Object, Object)

To be added

Remove(Object)

To be added

(Inherited from AbstractMap)
Remove(Object, Object)

To be added

Replace(Object, Object)

To be added

Replace(Object, Object, Object)

To be added

ReplaceAll(IBiFunction)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
Size()

To be added

(Inherited from AbstractMap)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Values()

To be added

(Inherited from AbstractMap)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to