| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | cleared
This boolean is set |
| private static List | |
| public static ReferenceBackendFactory | factory
This is a hook for JyNI to insert a native-objects-aware implementation of ReferenceBackend. |
| private int | hashCode
This reference's hashCode: The |
| private boolean | havePythonHashCode
Whether |
| private static ConcurrentMap | |
| private int | pythonHashCode
The public hashCode for the Python AbstractReference wrapper. |
| private static ReentrantReadWriteLock | |
| private static volatile Thread | |
| private static ReferenceQueue | |
| private List |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| pack-priv synchronized void | |
| public synchronized int | |
| private static void | |
| private static void | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Allow |
| public synchronized AbstractReference | find(Class<?> cls)
Implements org. Search for a reusable reference. |
| public static int | Returns: an int reference counta PyObject object)Return the number of references to the specified
|
| private final AbstractReference | |
| public static PyList | Returns: aorg. of references. May be empty.Return a list of references to the specified
|
| public static boolean | |
| public int | Returns: a hashCodeint-valueOverrides java. Allows |
| private static void | |
| public boolean | |
| public static ReferenceBackend | Returns: a new trackedReferenceBackenda object)org. to referenceCreate a new tracked |
| public static void | processDelayedCallbacks()
Call all callbacks that were enqueued via
|
| public int | Returns: a hashCodeint-valueImplements org. The publicly used |
| public synchronized PyList | |
| public synchronized void | restore(PyObject formerReferent)
Implements org. Restores this weak reference to its former referent. |
| protected synchronized ReferenceBackend |
| cleared | back to summary |
|---|---|
| protected boolean cleared This boolean is set | |
| delayedCallbacks | back to summary |
|---|---|
| private static List<GlobalRef> delayedCallbacks | |
| factory | back to summary |
|---|---|
| public static ReferenceBackendFactory factory This is a hook for JyNI to insert a native-objects-aware implementation of ReferenceBackend. | |
| hashCode | back to summary |
|---|---|
| private int hashCode This reference's hashCode: The | |
| havePythonHashCode | back to summary |
|---|---|
| private boolean havePythonHashCode Whether | |
| objects | back to summary |
|---|---|
| private static ConcurrentMap<GlobalRef, ReferenceBackend> objects | |
| pythonHashCode | back to summary |
|---|---|
| private int pythonHashCode The public hashCode for the Python AbstractReference wrapper. Derived from the referent's hashCode. | |
| reaperLock | back to summary |
|---|---|
| private static ReentrantReadWriteLock reaperLock | |
| reaperThread | back to summary |
|---|---|
| private static volatile Thread reaperThread | |
| referenceQueue | back to summary |
|---|---|
| private static ReferenceQueue<PyObject> referenceQueue | |
| references | back to summary |
|---|---|
| private List<WeakReference<AbstractReference>> references | |
| GlobalRef | back to summary |
|---|---|
| public GlobalRef(PyObject object) | |
| add | back to summary |
|---|---|
| public synchronized void add(AbstractReference ref) Implements org. | |
| call | back to summary |
|---|---|
| pack-priv synchronized void call() Call each of the registered references. | |
| count | back to summary |
|---|---|
| public synchronized int count() Implements org. | |
| createReaperThreadIfAbsent | back to summary |
|---|---|
| private static void createReaperThreadIfAbsent() | |
| delayedCallback | back to summary |
|---|---|
| private static void delayedCallback(GlobalRef cl) Stores the callback for later processing. This is needed if
weak reference restoration (c.f.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Allow
| |
| find | back to summary |
|---|---|
| public synchronized AbstractReference find(Class<?> cls) Implements org. Search for a reusable reference. To be reused, it must be of the same class and it must not have a callback. | |
| getCount | back to summary |
|---|---|
| public static int getCount(PyObject object) Return the number of references to the specified
| |
| getReferenceAt | back to summary |
|---|---|
| private final AbstractReference getReferenceAt(int idx) | |
| getRefs | back to summary |
|---|---|
| public static PyList getRefs(PyObject object) Return a list of references to the specified
| |
| hasDelayedCallbacks | back to summary |
|---|---|
| public static boolean hasDelayedCallbacks() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Allows
| |
| initReaperThread | back to summary |
|---|---|
| private static void initReaperThread() | |
| isCleared | back to summary |
|---|---|
| public boolean isCleared() Implements org. | |
| newInstance | back to summary |
|---|---|
| public static ReferenceBackend newInstance(PyObject object) Create a new tracked
| |
| processDelayedCallbacks | back to summary |
|---|---|
| public static void processDelayedCallbacks() Call all callbacks that were enqueued via
| |
| pythonHashCode | back to summary |
|---|---|
| public int pythonHashCode() Implements org. The publicly used
| |
| refs | back to summary |
|---|---|
| public synchronized PyList refs() Implements org. | |
| restore | back to summary |
|---|---|
| public synchronized void restore(PyObject formerReferent) Implements org. Restores this weak reference to its former referent.
This actually means that a fresh
| |
| retryFactory | back to summary |
|---|---|
| protected synchronized ReferenceBackend retryFactory() Returns null if nothing is changed. If a factory exists
and produces a result different from | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private Thread |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public Void | call()
Implements java. Computes a result, or throws an exception if unable to do so. |
| public void | |
| public void |
| exit | back to summary |
|---|---|
| private volatile boolean exit | |
| thread | back to summary |
|---|---|
| private Thread thread | |
| RefReaper | back to summary |
|---|---|
| private RefReaper() | |
| call | back to summary |
|---|---|
| public Void call() throws Exception Implements java. Doc from java. Computes a result, or throws an exception if unable to do so. | |
| collect | back to summary |
|---|---|
| public void collect() throws InterruptedException | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation.
| |