ComponentRegistry

public class ComponentRegistry

Registry for managing component registration. Provides methods to register and query component items.

java.lang.Object > ComponentRegistry

Field Summary

shutdown

private boolean shutdown

Field shutdown.

componentSize

private int componentSize

Field componentSize.

componentIds

private String[] componentIds

Field componentIds.

resourceSize

private int resourceSize

Field resourceSize.

resourceIds

private String[] resourceIds

Field resourceIds.

systemTypeSize

private int systemTypeSize

Field systemTypeSize.

systemTypeToSystemIndex

private BitSet[] systemTypeToSystemIndex

Field systemTypeToSystemIndex.

systemGroupSize

private int systemGroupSize

Field systemGroupSize.

systemGroups

private SystemGroup[] systemGroups

Field systemGroups.

systemSize

private int systemSize

Field systemSize.

systems

private ISystem[] systems

Field systems.

sortedSystems

private ISystem[] sortedSystems

Field sortedSystems.

storeSize

private int storeSize

Field storeSize.

stores

private Store[] stores

Field stores.

data

private Data data

Field data.

lock

final long lock

Field lock.

store

final Store store

Field store.

extraInfo

final ExtraInfo extraInfo

Field extraInfo.

changes

final List changes

Field changes.

system

final ISystem system

Field system.

archetypeSystem

final QuerySystem archetypeSystem

Field archetypeSystem.

query

final Query query

Field query.

systemGroup

final SystemGroup systemGroup

Field systemGroup.

readWriteQuery

final ReadWriteArchetypeQuery readWriteQuery

Field readWriteQuery.

theSystem

final System theSystem

Field theSystem.

systemIndex

final int systemIndex

Field systemIndex.

unsortedSystemIndex

final int unsortedSystemIndex

Field unsortedSystemIndex.

holder

final Holder holder

Field holder.

version

final Optional version

Field version.

document

final BsonDocument document

Field document.

newLength

final int newLength

Field newLength.

componentIndex

final int componentIndex

Field componentIndex.

highestUsedIndex

final int highestUsedIndex

Field highestUsedIndex.

resourceIndex

final int resourceIndex

Field resourceIndex.

tClass

final Class tClass

Field tClass.

systemTypeIndex

final int systemTypeIndex

Field systemTypeIndex.

eClass

final Class eClass

Field eClass.

index

final int index

Field index.

systemGroupIndex

final int systemGroupIndex

Field systemGroupIndex.

lastIndex

final int lastIndex

Field lastIndex.

lastSystem

final ISystem lastSystem

Field lastSystem.

bypassClassCheck

final boolean bypassClassCheck

Field bypassClassCheck.

storeIndex

final int storeIndex

Field storeIndex.

lastStore

final Store lastStore

Field lastStore.

n

final int n

Field n.

set

final BitSet set

Field set.

bitSet

final BitSet bitSet

Field bitSet.

oldData

final Data oldData

Field oldData.

registry

final ComponentRegistry registry

Field registry.

systemTypeClassToIndexInt

final int systemTypeClassToIndexInt

Field systemTypeClassToIndexInt.

Method Detail

ComponentRegistry

public public ComponentRegistry ()

Method ComponentRegistry.

Thread

public new Thread (()

Method Thread.

Parameters:
( (

isShutdown

public boolean isShutdown ()

Method isShutdown.

shutdown

public void shutdown ()

Method shutdown.

shutdown0

public void shutdown0 ()

Method shutdown0.

getDataUpdateLock

public ReadWriteLock getDataUpdateLock ()

Method getDataUpdateLock.

getUnknownComponentType

public UnknownComponents> getUnknownComponentType ()

Method getUnknownComponentType.

getNonTickingComponentType

public NonTicking> getNonTickingComponentType ()

Method getNonTickingComponentType.

getNonSerializedComponentType

public NonSerialized> getNonSerializedComponentType ()

Method getNonSerializedComponentType.

getHolderSystemType

public HolderSystem> getHolderSystemType ()

Method getHolderSystemType.

getRefSystemType

public RefSystem> getRefSystemType ()

Method getRefSystemType.

getRefChangeSystemType

public > getRefChangeSystemType ()

Method getRefChangeSystemType.

getQuerySystemType

public QuerySystem> getQuerySystemType ()

Method getQuerySystemType.

getTickingSystemType

public TickingSystem> getTickingSystemType ()

Method getTickingSystemType.

getTickableSystemType

public TickableSystem> getTickableSystemType ()

Method getTickableSystemType.

getRunWhenPausedSystemType

public RunWhenPausedSystem> getRunWhenPausedSystemType ()

Method getRunWhenPausedSystemType.

getArchetypeTickingSystemType

public ArchetypeTickingSystem> getArchetypeTickingSystemType ()

Method getArchetypeTickingSystemType.

registerComponent

public T> registerComponent (@Nonnull final Class tClass, @Nonnull final Supplier supplier)

Method registerComponent.

Parameters:
@Nonnull final Class tClass
@Nonnull final Supplier supplier

unregisterComponent

public void unregisterComponent (@Nonnull final ComponentType componentType)

Method unregisterComponent.

Parameters:
@Nonnull final ComponentType componentType

registerResource

public T> registerResource (@Nonnull final Class tClass, @Nonnull final Supplier supplier)

Method registerResource.

Parameters:
@Nonnull final Class tClass
@Nonnull final Supplier supplier

unregisterResource

public void unregisterResource (@Nonnull final ResourceType resourceType)

Method unregisterResource.

Parameters:
@Nonnull final ResourceType resourceType

registerSystemType

public T> registerSystemType (@Nonnull final Class systemTypeClass)

Method registerSystemType.

Parameters:
@Nonnull final Class systemTypeClass

unregisterSystemType

public void unregisterSystemType (@Nonnull final SystemType systemType)

Method unregisterSystemType.

Parameters:
@Nonnull final SystemType systemType

registerEntityEventType

public T> registerEntityEventType (@Nonnull final Class eventTypeClass)

Method registerEntityEventType.

Parameters:
@Nonnull final Class eventTypeClass

registerWorldEventType

public T> registerWorldEventType (@Nonnull final Class eventTypeClass)

Method registerWorldEventType.

Parameters:
@Nonnull final Class eventTypeClass

unregisterEntityEventType

public void unregisterEntityEventType (@Nonnull final EntityEventType eventType)

Method unregisterEntityEventType.

Parameters:
@Nonnull final EntityEventType eventType

unregisterWorldEventType

public void unregisterWorldEventType (@Nonnull final WorldEventType eventType)

Method unregisterWorldEventType.

Parameters:
@Nonnull final WorldEventType eventType

registerSystemGroup

public SystemGroup registerSystemGroup ()

Method registerSystemGroup.

unregisterSystemGroup

public void unregisterSystemGroup (@Nonnull final SystemGroup systemGroup)

Method unregisterSystemGroup.

Parameters:
@Nonnull final SystemGroup systemGroup

registerSystem

public void registerSystem (@Nonnull final ISystem system)

Method registerSystem.

Parameters:
@Nonnull final ISystem system

unregisterSystem

public void unregisterSystem (@Nonnull final Class> systemClass)

Method unregisterSystem.

Parameters:
@Nonnull final Class> systemClass

registerSpatialResource

public ECS_TYPE>> registerSpatialResource (@Nonnull final Supplier>> supplier)

Method registerSpatialResource.

Parameters:
@Nonnull final Supplier>> supplier

SpatialResource

public new SpatialResource (supplier.get()

Method SpatialResource.

Parameters:
supplier.get( supplier.get(

addStore

public Store addStore (@Nonnull final ECS_TYPE externalData, @Nonnull final IResourceStorage resourceStorage)

Method addStore.

Parameters:
@Nonnull final ECS_TYPE externalData
@Nonnull final IResourceStorage resourceStorage

removeStore

public void removeStore (@Nonnull final Store store)

Method removeStore.

Parameters:
@Nonnull final Store store

newHolder

public Holder newHolder ()

Method newHolder.

_internal_newEntityHolder

protected Holder _internal_newEntityHolder ()

Method _internal_newEntityHolder.

_internal_getData

protected Data _internal_getData ()

Method _internal_getData.

getData

public Data getData ()

Method getData.

getEntityCodec

public BuilderCodec> getEntityCodec ()

Method getEntityCodec.

assertInStoreThread

public void assertInStoreThread ()

Method assertInStoreThread.

AssertionError

public new AssertionError ((Object)

Method AssertionError.

Parameters:
(Object (Object

deserialize

public Holder deserialize (@Nonnull final BsonDocument entityDocument)

Method deserialize.

Parameters:
@Nonnull final BsonDocument entityDocument

serialize

public BsonDocument serialize (@Nonnull final Holder holder)

Method serialize.

Parameters:
@Nonnull final Holder holder

hasSystem

public boolean hasSystem (@Nonnull final ISystem system)

Method hasSystem.

Parameters:
@Nonnull final ISystem system

hasSystemClass

public boolean hasSystemClass (@Nonnull final Class systemClass)

Method hasSystemClass.

Parameters:
@Nonnull final Class systemClass

hasSystemType

public boolean hasSystemType (@Nonnull final SystemType systemType)

Method hasSystemType.

Parameters:
@Nonnull final SystemType systemType

hasSystemGroup

public boolean hasSystemGroup (@Nonnull final SystemGroup group)

Method hasSystemGroup.

Parameters:
@Nonnull final SystemGroup group

registerComponent0

public T> registerComponent0 (@Nonnull final ComponentRegistration registration)

Method registerComponent0.

Parameters:
@Nonnull final ComponentRegistration registration

unregisterComponent0

public void unregisterComponent0 (@Nonnull final ComponentType componentType)

Method unregisterComponent0.

Parameters:
@Nonnull final ComponentType componentType

registerResource0

public T> registerResource0 (@Nonnull final ResourceRegistration registration)

Method registerResource0.

Parameters:
@Nonnull final ResourceRegistration registration

unregisterResource0

public void unregisterResource0 (@Nonnull final ResourceType resourceType)

Method unregisterResource0.

Parameters:
@Nonnull final ResourceType resourceType

registerSystemType0

public T> registerSystemType0 (@Nonnull final Class systemTypeClass)

Method registerSystemType0.

Parameters:
@Nonnull final Class systemTypeClass

unregisterSystemType0

public void unregisterSystemType0 (@Nonnull final SystemType systemType)

Method unregisterSystemType0.

Parameters:
@Nonnull final SystemType systemType

registerEntityEventType0

public T> registerEntityEventType0 (@Nonnull final Class eventTypeClass)

Method registerEntityEventType0.

Parameters:
@Nonnull final Class eventTypeClass

unregisterEntityEventType0

private void unregisterEntityEventType0 (@Nonnull final EntityEventType eventType)

Method unregisterEntityEventType0.

Parameters:
@Nonnull final EntityEventType eventType

getEntityEventTypeForClass

public T> getEntityEventTypeForClass (final Class eClass)

Method getEntityEventTypeForClass.

Parameters:
final Class eClass

registerWorldEventType0

public T> registerWorldEventType0 (@Nonnull final Class eventTypeClass)

Method registerWorldEventType0.

Parameters:
@Nonnull final Class eventTypeClass

unregisterWorldEventType0

private void unregisterWorldEventType0 (@Nonnull final WorldEventType eventType)

Method unregisterWorldEventType0.

Parameters:
@Nonnull final WorldEventType eventType

getWorldEventTypeForClass

public T> getWorldEventTypeForClass (final Class eClass)

Method getWorldEventTypeForClass.

Parameters:
final Class eClass

registerSystemGroup0

private SystemGroup registerSystemGroup0 (@Nonnull final Set> dependencies)

Method registerSystemGroup0.

Parameters:
@Nonnull final Set> dependencies

unregisterSystemGroup0

private void unregisterSystemGroup0 (@Nonnull final SystemGroup systemType)

Method unregisterSystemGroup0.

Parameters:
@Nonnull final SystemGroup systemType

registerSystem0

private void registerSystem0 (@Nonnull final ISystem system)

Method registerSystem0.

Parameters:
@Nonnull final ISystem system

unregisterSystem0

private void unregisterSystem0 (final int systemIndex, @Nonnull final ISystem system)

Method unregisterSystem0.

Parameters:
final int systemIndex
@Nonnull final ISystem system

addStore0

private Store addStore0 (@Nonnull final ECS_TYPE externalData, @Nonnull final IResourceStorage resourceStorage, final Consumer> consumer)

Method addStore0.

Parameters:
@Nonnull final ECS_TYPE externalData
@Nonnull final IResourceStorage resourceStorage
final Consumer> consumer

removeStore0

private void removeStore0 (@Nonnull final Store store)

Method removeStore0.

Parameters:
@Nonnull final Store store

doDataUpdate

public Data doDataUpdate ()

Method doDataUpdate.

updateData0

private void updateData0 (@Nonnull final DataChange... dataChanges)

Method updateData0.

Parameters:
@Nonnull final DataChange... dataChanges

toString

public String toString ()

Method toString.

createComponent

public T createComponent (@Nonnull final ComponentType componentType)

Method createComponent.

Parameters:
@Nonnull final ComponentType componentType

Data

public private Data (@Nonnull final ComponentRegistry registry)

Method Data.

Parameters:
@Nonnull final ComponentRegistry registry

createCodec

private BuilderCodec> createCodec ()

Method createCodec.

MapProvidedMapCodec

public new MapProvidedMapCodec ((Map Object>)

Method MapProvidedMapCodec.

Parameters:
(Map Object>

getVersion

public int getVersion ()

Method getVersion.

getRegistry

public ComponentRegistry getRegistry ()

Method getRegistry.

getComponentType

public ?> getComponentType (final String id)

Method getComponentType.

Parameters:
final String id

getComponentSize

public int getComponentSize ()

Method getComponentSize.

getComponentId

public String getComponentId (@Nonnull final ComponentType componentType)

Method getComponentId.

Parameters:
@Nonnull final ComponentType componentType

getComponentCodec

public Codec getComponentCodec (@Nonnull final ComponentType componentType)

Method getComponentCodec.

Parameters:
@Nonnull final ComponentType componentType

getResourceType

public ?> getResourceType (final int index)

Method getResourceType.

Parameters:
final int index

getResourceSize

public int getResourceSize ()

Method getResourceSize.

getResourceId

public String getResourceId (@Nonnull final ResourceType resourceType)

Method getResourceId.

Parameters:
@Nonnull final ResourceType resourceType

getResourceCodec

public BuilderCodec getResourceCodec (@Nonnull final ResourceType resourceType)

Method getResourceCodec.

Parameters:
@Nonnull final ResourceType resourceType

createResource

public T createResource (@Nonnull final ResourceType resourceType)

Method createResource.

Parameters:
@Nonnull final ResourceType resourceType

getSystemTypeSize

public int getSystemTypeSize ()

Method getSystemTypeSize.

getSystemType

public T> getSystemType (final Class systemTypeClass)

Method getSystemType.

Parameters:
final Class systemTypeClass

getSystemIndexesForType

public BitSet getSystemIndexesForType (@Nonnull final SystemType systemType)

Method getSystemIndexesForType.

Parameters:
@Nonnull final SystemType systemType

getSystemSize

public int getSystemSize ()

Method getSystemSize.

getSystem

public ISystem getSystem (final int systemIndex)

Method getSystem.

Parameters:
final int systemIndex

indexOf

public int indexOf (final ISystem system)

Method indexOf.

Parameters:
final ISystem system

getDataChangeCount

public int getDataChangeCount ()

Method getDataChangeCount.

getDataChange

public DataChange getDataChange (final int index)

Method getDataChange.

Parameters:
final int index

equals

public boolean equals (@Nullable final Object o)

Method equals.

Parameters:
@Nullable final Object o

hashCode

public int hashCode ()

Method hashCode.

appendDump

public void appendDump (@Nonnull final String prefix, @Nonnull final StringBuilder sb)

Method appendDump.

Parameters:
@Nonnull final String prefix
@Nonnull final StringBuilder sb