Class AbstractPooling
- java.lang.Object
-
- AbstractPooling
-
- All Implemented Interfaces:
OnThreadCompletedListener
- Direct Known Subclasses:
LambdasPooling,NormalPooling,NotEnoughCapacity
public abstract class AbstractPooling extends java.lang.Object implements OnThreadCompletedListener
-
-
Field Summary
Fields Modifier and Type Field Description private ThreadsPoolingmThreadsPooling
-
Constructor Summary
Constructors Constructor Description AbstractPooling()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbefore()ThreadsPoolinggetThreadsPooling()voidonThreadCompletedListener(java.lang.Thread thread, java.lang.Throwable exception)When a thread finish its execution, if using aNotifyingThreadand the class is subscribed, this method is called, with theRunnablewhich corresponds the just finished thread, and theThrowablecontaining the exception (if any exception has benn thrown).protected java.lang.Runnabletarget(int value)voidtest()
-
-
-
Field Detail
-
mThreadsPooling
private ThreadsPooling mThreadsPooling
-
-
Method Detail
-
before
public void before()
-
target
protected java.lang.Runnable target(int value)
-
test
public void test()
-
getThreadsPooling
public ThreadsPooling getThreadsPooling()
-
onThreadCompletedListener
public void onThreadCompletedListener(@NotNull java.lang.Thread thread, @Nullable java.lang.Throwable exception)When a thread finish its execution, if using aNotifyingThreadand the class is subscribed, this method is called, with theRunnablewhich corresponds the just finished thread, and theThrowablecontaining the exception (if any exception has benn thrown).Refer to
NotifyingThread.addOnThreadCompletedListener(OnThreadCompletedListener)for getting more information about subscribing classes.- Specified by:
onThreadCompletedListenerin interfaceOnThreadCompletedListener- Parameters:
thread- the thread that has just finished its execution.exception- the exception if happened, elsenull.
-
-