Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Protected Ctors](https://developer.android.com/reference/java/util/concurrent/locks/AbstractOwnableSynchronizer#proctors) \| [Protected Methods](https://developer.android.com/reference/java/util/concurrent/locks/AbstractOwnableSynchronizer#promethods) \| [Inherited Methods](https://developer.android.com/reference/java/util/concurrent/locks/AbstractOwnableSynchronizer#inhmethods)

# AbstractOwnableSynchronizer


`
public


abstract
class
AbstractOwnableSynchronizer
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/java/io/Serializable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.util.concurrent.locks.AbstractOwnableSynchronizer |

Known direct subclasses [AbstractQueuedLongSynchronizer](https://developer.android.com/reference/java/util/concurrent/locks/AbstractQueuedLongSynchronizer), [AbstractQueuedSynchronizer](https://developer.android.com/reference/java/util/concurrent/locks/AbstractQueuedSynchronizer) [AbstractQueuedLongSynchronizer](https://developer.android.com/reference/java/util/concurrent/locks/AbstractQueuedLongSynchronizer) A version of `https://developer.android.com/reference/java/util/concurrent/locks/AbstractQueuedSynchronizer` in which synchronization state is maintained as a `long`. [AbstractQueuedSynchronizer](https://developer.android.com/reference/java/util/concurrent/locks/AbstractQueuedSynchronizer) Provides a framework for implementing blocking locks and related synchronizers (semaphores, events, etc) that rely on first-in-first-out (FIFO) wait queues.   

*** ** * ** ***

A synchronizer that may be exclusively owned by a thread. This
class provides a basis for creating locks and related synchronizers
that may entail a notion of ownership. The
`AbstractOwnableSynchronizer` class itself does not manage or
use this information. However, subclasses and tools may use
appropriately maintained values to help control and monitor access
and provide diagnostics.

## Summary

| ### Protected constructors ||
|---|---|
| ` https://developer.android.com/reference/java/util/concurrent/locks/AbstractOwnableSynchronizer#AbstractOwnableSynchronizer()() ` Empty constructor for use by subclasses. |

| ### Protected methods ||
|---|---|
| ` final https://developer.android.com/reference/java/lang/Thread` | ` https://developer.android.com/reference/java/util/concurrent/locks/AbstractOwnableSynchronizer#getExclusiveOwnerThread()() ` Returns the thread last set by `setExclusiveOwnerThread`, or `null` if never set. |
| ` final void` | ` https://developer.android.com/reference/java/util/concurrent/locks/AbstractOwnableSynchronizer#setExclusiveOwnerThread(java.lang.Thread)(https://developer.android.com/reference/java/lang/Thread thread) ` Sets the thread that currently owns exclusive access. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

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


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

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


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

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


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

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


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

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


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

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


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## Protected constructors

### AbstractOwnableSynchronizer

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected AbstractOwnableSynchronizer ()
```

Empty constructor for use by subclasses.

<br />

## Protected methods

### getExclusiveOwnerThread

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected final Thread getExclusiveOwnerThread ()
```

Returns the thread last set by `setExclusiveOwnerThread`,
or `null` if never set. This method does not otherwise
impose any synchronization or `volatile` field accesses.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Thread` | the owner thread <br /> |

### setExclusiveOwnerThread

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected final void setExclusiveOwnerThread (Thread thread)
```

Sets the thread that currently owns exclusive access.
A `null` argument indicates that no thread owns access.
This method does not otherwise impose any synchronization or
`volatile` field accesses.

<br />

| Parameters ||
|---|---|
| `thread` | `Thread`: the owner thread <br /> |