Udostępnij za pośrednictwem


SelectionKey.InterestOpsAnd(Int32) Method

Definition

Atomically sets this key's interest set to the bitwise intersection ("and") of the existing interest set and the given value.

[Android.Runtime.Register("interestOpsAnd", "(I)I", "GetInterestOpsAnd_IHandler", ApiSince=33)]
public virtual int InterestOpsAnd (int ops);
[<Android.Runtime.Register("interestOpsAnd", "(I)I", "GetInterestOpsAnd_IHandler", ApiSince=33)>]
abstract member InterestOpsAnd : int -> int
override this.InterestOpsAnd : int -> int

Parameters

ops
Int32

The interest set to apply

Returns

The previous interest set

Attributes

Remarks

Atomically sets this key's interest set to the bitwise intersection ("and") of the existing interest set and the given value. This method is guaranteed to be atomic with respect to other concurrent calls to this method or to #interestOpsOr(int).

This method may be invoked at any time. If this method is invoked while a selection operation is in progress then it has no effect upon that operation; the change to the key's interest set will be seen by the next selection operation.

Added in 11.

Java documentation for java.nio.channels.SelectionKey.interestOpsAnd(int).

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.

Applies to