类 RegistryServices
java.lang.Object
pkg.exoad.poprock.core.registry.RegistryServices
Regsitry Services
A registry is just a place for global properties to be accessed. Registries follows a similar structure toEventPoolService
where by which children are set based on
a registration system. Furthermore, all registries are public.- 作者:
- Jack Meng
-
嵌套类概要
修饰符和类型类说明static final class
static final class
-
字段概要
修饰符和类型字段说明private static boolean
private static final HashMap<Integer,
EphemeralRegistry> Represents the entirety of the ephemeral registries stored in cache.private static final HashMap<Integer,
RegistryServices.BroadcastingRegistry> -
构造器概要
-
方法概要
修饰符和类型方法说明static void
Arms the Registry Services.static EphemeralRegistry
getEphemeral
(int id) Acquires the ephemeral registry found from the pool.static void
registerEphemeralRegistry
(int id, EphemeralRegistry.EphemeralRegistryConfig config) Registers a registry as "Ephemeral".(专用程序包) static void
Internal macro method
-
字段详细资料
-
OBJECTS
Represents the entirety of the ephemeral registries stored in cache. (Singleton pattern) -
OBJECTS1
-
armed
private static boolean armed
-
-
构造器详细资料
-
RegistryServices
private RegistryServices()
-
-
方法详细资料
-
armService
public static void armService()Arms the Registry Services. Should be automatically called byServices
-
runOnArmed
Internal macro method- 参数:
r
- Runnable
-
registerEphemeralRegistry
@VolatileImpl(reason="Supplied id already exists") public static void registerEphemeralRegistry(int id, EphemeralRegistry.EphemeralRegistryConfig config) Registers a registry as "Ephemeral".If this function panics, it is 99% a source issue.
- 参数:
id
- The id alloted to this registry in the cache pool. THIS MUST BE UNIQUE OR ELSE THIS FUNCTION PANICKS!!config
- The configuration to use for registering this EphemeralRegistry- 另请参阅:
-
getEphemeral
@VolatileImpl(reason="Supplied id does not exist") public static EphemeralRegistry getEphemeral(int id) Acquires the ephemeral registry found from the pool.If this function panics, it is 99% a source issue.
- 参数:
id
- The id of the registry to look for- 返回:
- The ephemeral registry that was found under the supplied ID
-