public class ComponentUsageTracker
extends java.lang.Object
Constructor and Description |
---|
ComponentUsageTracker() |
Modifier and Type | Method and Description |
---|---|
java.lang.Long |
get(com.simsilica.es.EntityId id,
java.lang.Class<? extends com.simsilica.es.EntityComponent> type)
Returns the last stored version for the specified ID and type or null
if there is no tracking for the specified ID and type combination.
|
java.lang.Long |
getAndExpire(com.simsilica.es.EntityId id,
java.lang.Class<? extends com.simsilica.es.EntityComponent> type,
java.lang.Long current)
Returns the last stored version for the ID and type, removing it if the last
stored version is older than the current version.
|
protected java.util.Map<com.simsilica.es.EntityId,java.lang.Long> |
getFrameMap(java.lang.Class<? extends com.simsilica.es.EntityComponent> type,
boolean create) |
void |
set(java.util.Collection<com.simsilica.es.EntityId> ids,
java.lang.Class<? extends com.simsilica.es.EntityComponent> type,
java.lang.Long frame)
Sets the current frame counter for all of the specified EntityIds and component
type combination.
|
java.lang.Long |
set(com.simsilica.es.EntityId id,
java.lang.Class<? extends com.simsilica.es.EntityComponent> type,
java.lang.Long frame)
Sets the current frame counter for the specified EntityId and component
type combination.
|
protected java.util.Map<com.simsilica.es.EntityId,java.lang.Long> getFrameMap(java.lang.Class<? extends com.simsilica.es.EntityComponent> type, boolean create)
public java.lang.Long set(com.simsilica.es.EntityId id, java.lang.Class<? extends com.simsilica.es.EntityComponent> type, java.lang.Long frame)
public void set(java.util.Collection<com.simsilica.es.EntityId> ids, java.lang.Class<? extends com.simsilica.es.EntityComponent> type, java.lang.Long frame)
public java.lang.Long getAndExpire(com.simsilica.es.EntityId id, java.lang.Class<? extends com.simsilica.es.EntityComponent> type, java.lang.Long current)
public java.lang.Long get(com.simsilica.es.EntityId id, java.lang.Class<? extends com.simsilica.es.EntityComponent> type)