public class Store
Manages entities of a specific ECS type. A store is the main container for entities, providing entity creation and deletion, component attachment and retrieval, archetype-based entity organization, thread-safe command buffer for batch operations, and resource storage and access.
java.lang.Object > Store
Field Summary
shutdown
Field shutdown.
entitiesSize
Field entitiesSize.
refs
Field refs.
entityToArchetypeChunk
Field entityToArchetypeChunk.
entityChunkIndex
Field entityChunkIndex.
systemIndexToArchetypeChunkIndexes
Field systemIndexToArchetypeChunkIndexes.
archetypeChunkIndexesToSystemIndex
Field archetypeChunkIndexesToSystemIndex.
archetypeSize
Field archetypeSize.
archetypeChunks
Field archetypeChunks.
resources
Field resources.
systemMetrics
Field systemMetrics.
disableProcessingAssert
Field disableProcessingAssert.
buffer
Field buffer.
resourceSize
Field resourceSize.
systemIndexes
Field systemIndexes.
futures
Field futures.
archetypeChunk
Field archetypeChunk.
exactQuery
Field exactQuery.
archetypeIndex2
Field archetypeIndex2.
indexes
Field indexes.
result
Field result.
chunk
Field chunk.
archetype
Field archetype.
componentTypeNames
Field componentTypeNames.
data
Field data.
commandBuffer
Field commandBuffer.
system
Field system.
entityIndex
Field entityIndex.
oldLength
Field oldLength.
newLength
Field newLength.
archetypeIndex
Field archetypeIndex.
chunkEntityRef
Field chunkEntityRef.
systemIndexes2
Field systemIndexes2.
entityProcessedBySystemIndexes
Field entityProcessedBySystemIndexes.
system2
Field system2.
oldDisableProcessingAssert
Field oldDisableProcessingAssert.
holderEnd
Field holderEnd.
ref
Field ref.
firstIndex
Field firstIndex.
ref2
Field ref2.
holder
Field holder.
ref3
Field ref3.
remaining
Field remaining.
refIndex
Field refIndex.
lastIndex
Field lastIndex.
lastEntityRef
Field lastEntityRef.
lastSelfEntityRef
Field lastSelfEntityRef.
lastEntityChunkIndex
Field lastEntityChunkIndex.
holders
Field holders.
refEnd
Field refEnd.
component
Field component.
oldComponent
Field oldComponent.
fromArchetypeIndex
Field fromArchetypeIndex.
fromArchetypeChunk
Field fromArchetypeChunk.
toArchetypeIndex
Field toArchetypeIndex.
toArchetypeChunk
Field toArchetypeChunk.
size
Field size.
systemTask
Field systemTask.
archetypeChunkSize
Field archetypeChunkSize.
index
Field index.
tickingSystem
Field tickingSystem.
start
Field start.
end
Field end.
dataChange
Field dataChange.
oldSystemMetrics
Field oldSystemMetrics.
oldSystemIndex
Field oldSystemIndex.
systemChange
Field systemChange.
componentId
Field componentId.
componentCodec
Field componentCodec.
tempInternalEntityHolder
Field tempInternalEntityHolder.
newArchetype
Field newArchetype.
unknownComponents
Field unknownComponents.
unknownComponents2
Field unknownComponents2.
oldArchetypeSize
Field oldArchetypeSize.
component2
Field component2.
highestUsedIndex
Field highestUsedIndex.
archetypeChunkSystem
Field archetypeChunkSystem.
archetypeChunk2
Field archetypeChunk2.
systemSize
Field systemSize.
archetypeChunkIndexes
Field archetypeChunkIndexes.
currentThread
Field currentThread.
oldChunkEntityRef
Field oldChunkEntityRef.
archetypeChunkToSystemIndex
Field archetypeChunkToSystemIndex.
count
Field count.
Method Detail
storeCommandBuffer
Method storeCommandBuffer.
- Parameters:
@Nonnull final CommandBuffercommandBuffer
getStoreIndex
int
getStoreIndex
()
Method getStoreIndex.
getExternalData
ECS_TYPE
getExternalData
()
Method getExternalData.
getFetchTask
>
getFetchTask
()
Method getFetchTask.
getSystemMetrics
HistoricMetric[]
getSystemMetrics
()
Method getSystemMetrics.
isShutdown
boolean
isShutdown
()
Method isShutdown.
onAdd
void
onAdd
(@Nonnull final ComponentRegistry.Data data)
Method onAdd.
- Parameters:
@Nonnull final ComponentRegistry.Datadata
shutdown
void
shutdown
()
Method shutdown.
shutdown0
void
shutdown0
(@Nonnull final ComponentRegistry.Data data)
Method shutdown0.
- Parameters:
@Nonnull final ComponentRegistry.Datadata
saveAllResources
CompletableFuture
saveAllResources
()
Method saveAllResources.
saveAllResources0
CompletableFuture
saveAllResources0
(@Nonnull final ComponentRegistry.Data data)
Method saveAllResources0.
- Parameters:
@Nonnull final ComponentRegistry.Datadata
getEntityCount
int
getEntityCount
()
Method getEntityCount.
getArchetypeChunkCount
int
getArchetypeChunkCount
()
Method getArchetypeChunkCount.
collectArchetypeChunkData
ArchetypeChunkData[]
collectArchetypeChunkData
()
Method collectArchetypeChunkData.
ArchetypeChunkData
new
ArchetypeChunkData
(componentTypeNames, chunk.size()
Method ArchetypeChunkData.
- Parameters:
componentTypeNamescomponentTypeNameschunk.size(chunk.size(
getArchetypeChunkCountFor
int
getArchetypeChunkCountFor
(final int systemIndex)
Method getArchetypeChunkCountFor.
- Parameters:
final intsystemIndex
setEntityChunkIndex
Method setEntityChunkIndex.
- Parameters:
@Nonnull final Refreffinal intnewEntityChunkIndex
addEntity
Method addEntity.
- Parameters:
@Nonnull final Archetypearchetype@Nonnull final AddReasonreason
addEntities
Method addEntities.
- Parameters:
@Nonnull final Holderholders[] @Nonnull final AddReasonreason
removeEntity
Method removeEntity.
- Parameters:
@Nonnull final Refref@Nonnull final RemoveReasonreason
removeEntities
Method removeEntities.
- Parameters:
@Nonnull final Refrefs[] @Nonnull final RemoveReasonreason
ensureComponent
Method ensureComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
ensureAndGetComponent
Method ensureAndGetComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
addComponent
Method addComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
replaceComponent
void
replaceComponent
(@Nonnull final Ref ref, @Nonnull final ComponentType componentType, @Nonnull final T component)
Method replaceComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType@Nonnull final Tcomponent
putComponent
void
putComponent
(@Nonnull final Ref ref, @Nonnull final ComponentType componentType, @Nonnull final T component)
Method putComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType@Nonnull final Tcomponent
getComponent
Method getComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
__internal_getComponent
T
__internal_getComponent
(@Nonnull final Ref ref, @Nonnull final ComponentType componentType)
Method __internal_getComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
removeComponent
Method removeComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
tryRemoveComponent
Method tryRemoveComponent.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
removeComponentIfExists
boolean
removeComponentIfExists
(@Nonnull final Ref ref, @Nonnull final ComponentType componentType)
Method removeComponentIfExists.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentTypecomponentType
replaceResource
Method replaceResource.
- Parameters:
@Nonnull final ResourceTyperesourceType@Nonnull final Tresource
__internal_getResource
Method __internal_getResource.
- Parameters:
@Nonnull final ResourceTyperesourceType
forEachChunk
void
forEachChunk
(@Nonnull final BiConsumer, CommandBuffer> consumer)
Method forEachChunk.
- Parameters:
@Nonnull final BiConsumerconsumer, CommandBuffer >
forEachEntityParallel
Method forEachEntityParallel.
- Parameters:
final IntBiObjectConsumerconsumer, CommandBuffer >
fetch
void
fetch
(@Nonnull final SystemType systemType, final Q query, @Nonnull final List results)
Method fetch.
- Parameters:
@Nonnull final SystemTypesystemTypefinal Qquery@Nonnull final Listresults
internal_invoke
void
internal_invoke
(final CommandBuffer sourceCommandBuffer, final Ref ref, final Event param)
Method internal_invoke.
- Parameters:
final CommandBuffersourceCommandBufferfinal Refreffinal Eventparam
tick
void
tick
(final float dt)
Method tick.
- Parameters:
final floatdt
pausedTick
void
pausedTick
(final float dt)
Method pausedTick.
- Parameters:
final floatdt
updateData
void
updateData
(@Nonnull final ComponentRegistry.Data oldData, @Nonnull final ComponentRegistry.Data data)
Method updateData.
- Parameters:
@Nonnull final ComponentRegistry.DataoldData@Nonnull final ComponentRegistry.Datadata
if
else
if
(this.resources[index] != null && resourceType == null)
Method if.
- Parameters:
this.resources[index] != null && resourceType ==null
updateData0
void
updateData0
(@Nonnull final ComponentRegistry.Data oldData, @Nonnull final ComponentRegistry.Data newData, final DataChange dataChange)
Method updateData0.
- Parameters:
@Nonnull final ComponentRegistry.DataoldData@Nonnull final ComponentRegistry.DatanewDatafinal DataChangedataChange
updateArchetypeIndexes
void
updateArchetypeIndexes
(@Nonnull final ComponentRegistry.Data data)
Method updateArchetypeIndexes.
- Parameters:
@Nonnull final ComponentRegistry.Datadata
assertWriteProcessing
void
assertWriteProcessing
()
Method assertWriteProcessing.
isProcessing
boolean
isProcessing
()
Method isProcessing.
assertThread
void
assertThread
()
Method assertThread.
isInThread
boolean
isInThread
()
Method isInThread.
isAliveInDifferentThread
boolean
isAliveInDifferentThread
()
Method isAliveInDifferentThread.
toString
String
toString
()
Method toString.
datachunk_addComponent
void
datachunk_addComponent
(@Nonnull final Ref ref, final int fromArchetypeIndex, @Nonnull final ComponentType componentType, @Nonnull final T component, @Nonnull final CommandBuffer commandBuffer)
Method datachunk_addComponent.
- Parameters:
@Nonnull final Refreffinal intfromArchetypeIndex@Nonnull final ComponentTypecomponentType@Nonnull final Tcomponent@Nonnull final CommandBuffercommandBuffer
findOrCreateArchetypeChunk
Method findOrCreateArchetypeChunk.
- Parameters:
@Nonnull final Archetypearchetype
removeArchetypeChunk
void
removeArchetypeChunk
(final int archetypeIndex)
Method removeArchetypeChunk.
- Parameters:
final intarchetypeIndex
isHeld
boolean
isHeld
()
Method isHeld.
lock
void
lock
()
Method lock.
lockInterruptibly
void
lockInterruptibly
()
Method lockInterruptibly.
UnsupportedOperationException
new
UnsupportedOperationException
("lockInterruptibly()
Method UnsupportedOperationException.
- Parameters:
"lockInterruptibly("lockInterruptibly(
tryLock
boolean
tryLock
()
Method tryLock.
unlock
void
unlock
()
Method unlock.
- See Also: