Top Description Inners Fields Constructors Methods
io.reactivex.internal.schedulers

public final Class SchedulerPoolFactory

extends Object
Class Inheritance
Imports
java.util.*, java.util.concurrent.*, java.util.concurrent.atomic.AtomicReference, io.reactivex.functions.Function

Manages the creating of ScheduledExecutorServices and sets up purging.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final Map<ScheduledThreadPoolExecutor, Object>
public static final boolean
PURGE_ENABLED

Indicates the periodic purging of the ScheduledExecutorService is enabled.

pack-priv static final String
public static final int
PURGE_PERIOD_SECONDS

Indicates the purge period of the ScheduledExecutorServices created by create().

pack-priv static final String
pack-priv static final AtomicReference<ScheduledExecutorService>

Constructor Summary

AccessConstructor and Description
private
SchedulerPoolFactory()

Utility class.

Method Summary

Modifier and TypeMethod and Description
public static ScheduledExecutorService

Returns:

the ScheduledExecutorService
create
(ThreadFactory
the thread factory
factory
)

Creates a ScheduledExecutorService with the given factory.

pack-priv static boolean
getBooleanProperty(boolean enabled, String key, boolean defaultNotFound, boolean defaultNotEnabled, Function<String, String> propertyAccessor)

pack-priv static int
getIntProperty(boolean enabled, String key, int defaultNotFound, int defaultNotEnabled, Function<String, String> propertyAccessor)

public static void
shutdown()

Stops the purge thread.

public static void
start()

Starts the purge thread if not already started.

pack-priv static void
tryPutIntoPool(boolean purgeEnabled, ScheduledExecutorService exec)

pack-priv static void
tryStart(boolean purgeEnabled)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

POOLSback to summary
pack-priv static final Map<ScheduledThreadPoolExecutor, Object> POOLS
PURGE_ENABLEDback to summary
public static final boolean PURGE_ENABLED

Indicates the periodic purging of the ScheduledExecutorService is enabled.

PURGE_ENABLED_KEYback to summary
pack-priv static final String PURGE_ENABLED_KEY
PURGE_PERIOD_SECONDSback to summary
public static final int PURGE_PERIOD_SECONDS

Indicates the purge period of the ScheduledExecutorServices created by create().

PURGE_PERIOD_SECONDS_KEYback to summary
pack-priv static final String PURGE_PERIOD_SECONDS_KEY
PURGE_THREADback to summary
pack-priv static final AtomicReference<ScheduledExecutorService> PURGE_THREAD

Constructor Detail

SchedulerPoolFactoryback to summary
private SchedulerPoolFactory()

Utility class.

Method Detail

createback to summary
public static ScheduledExecutorService create(ThreadFactory factory)

Creates a ScheduledExecutorService with the given factory.

Parameters
factory:ThreadFactory

the thread factory

Returns:ScheduledExecutorService

the ScheduledExecutorService

getBooleanPropertyback to summary
pack-priv static boolean getBooleanProperty(boolean enabled, String key, boolean defaultNotFound, boolean defaultNotEnabled, Function<String, String> propertyAccessor)
getIntPropertyback to summary
pack-priv static int getIntProperty(boolean enabled, String key, int defaultNotFound, int defaultNotEnabled, Function<String, String> propertyAccessor)
shutdownback to summary
public static void shutdown()

Stops the purge thread.

startback to summary
public static void start()

Starts the purge thread if not already started.

tryPutIntoPoolback to summary
pack-priv static void tryPutIntoPool(boolean purgeEnabled, ScheduledExecutorService exec)
tryStartback to summary
pack-priv static void tryStart(boolean purgeEnabled)
io.reactivex.internal.schedulers back to summary

pack-priv final Class SchedulerPoolFactory.ScheduledTask

extends Object
implements Runnable
Class Inheritance
  • java.lang.Object
  • io.reactivex.internal.schedulers.SchedulerPoolFactory.ScheduledTask
All Implemented Interfaces
java.lang.Runnable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ScheduledTaskback to summary
pack-priv ScheduledTask()

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
io.reactivex.internal.schedulers back to summary

pack-priv final Class SchedulerPoolFactory.SystemPropertyAccessor

extends Object
implements Function<String, String>
Class Inheritance
  • java.lang.Object
  • io.reactivex.internal.schedulers.SchedulerPoolFactory.SystemPropertyAccessor
All Implemented Interfaces
io.reactivex.functions.Function

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
apply(String
the input value
t
)

Implements io.reactivex.functions.Function.apply.

Apply some calculation to the input value and return some other value.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SystemPropertyAccessorback to summary
pack-priv SystemPropertyAccessor()

Method Detail

applyback to summary
public String apply(String t) throws Exception

Implements io.reactivex.functions.Function.apply.

Doc from io.reactivex.functions.Function.apply.

Apply some calculation to the input value and return some other value.

Parameters
t:String

the input value

Returns:String

the output value

Annotations
@Override
Exceptions
Exception:
on error