TEntity
- The entity type to archive.public class MemoryArchive<TEntity extends IEntityIdentifier & IEntityLastUpdate> extends TrackingArchive<TEntity>
TrackingArchive
that stores tracking data in memory.Constructor and Description |
---|
MemoryArchive(TypeLiteral<TEntity> typeLiteralTEntity,
TransactionContext context)
Construct a new instance with the provided context.
|
MemoryArchive(TypeLiteral<TEntity> typeLiteralTEntity,
TransactionContext context,
TrackingTypeArchiverCollection typeArchivers)
Construct a new instance with the provided context and type archivers.
|
Modifier and Type | Method and Description |
---|---|
protected void |
archiveEntities(Transaction transaction,
Iterable<? extends TEntity> entities)
Archives a set of entities.
|
void |
clear()
Clears the contents of the archive.
|
TimeInterval |
getArchivedInterval()
Gets the overall interval that exists in the archive for any entity.
|
TimeInterval |
getArchivedInterval(Object entityIdentifier)
Gets the overall interval that exists in the archive for the specified entity identifier.
|
protected Object[] |
getArchivedPrimitivePropertyComponents(Iterable<? extends ArchivedProperty> primitivePropertyComponents,
JulianDate start,
JulianDate stop,
int maximumRecords)
Retrieves archived primitive property components for all entities over the provided time period.
|
protected Object[] |
getArchivedPrimitivePropertyComponents(Object entityIdentifier,
Iterable<? extends ArchivedProperty> primitivePropertyComponents,
JulianDate start,
JulianDate stop,
int maximumRecords)
Retrieves archived primitive property components for the provided entity over the provided time period.
|
dispose, dispose, getArchivedData, getArchivedData, getContext, getEntityPrimitivePropertyComponents, getIsRunning, getMaximumQueueLength, getMotion1, getMotion1, getMotion2, getMotion2, getOrientations, getOrientations, getOrientations, getPositions, getPositions, getPositions, getPrimitivePropertyComponents, getProperties, getTypeArchivers, setMaximumQueueLength, startWriting, stopWriting, waitForArchiveQueue, writingShutdown, writingStartup
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public MemoryArchive(TypeLiteral<TEntity> typeLiteralTEntity, @Nonnull TransactionContext context)
typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.context
- The context in which archiving is to take place.public MemoryArchive(TypeLiteral<TEntity> typeLiteralTEntity, @Nonnull TransactionContext context, @Nonnull TrackingTypeArchiverCollection typeArchivers)
typeLiteralTEntity
- A TypeLiteral object representing the generic type TEntity
.context
- The context in which archiving is to take place.typeArchivers
- The type archivers to use to archive entity properties.public void clear()
clear
in class TrackingArchive<TEntity extends IEntityIdentifier & IEntityLastUpdate>
protected Object[] getArchivedPrimitivePropertyComponents(Iterable<? extends ArchivedProperty> primitivePropertyComponents, @Nonnull JulianDate start, @Nonnull JulianDate stop, int maximumRecords)
getArchivedPrimitivePropertyComponents
in class TrackingArchive<TEntity extends IEntityIdentifier & IEntityLastUpdate>
primitivePropertyComponents
- The archived properties to retrieve.start
- The time of the first property to retrieve.stop
- The time of the last property to retrieve.maximumRecords
- The maximum number of each property to retrieve.protected Object[] getArchivedPrimitivePropertyComponents(Object entityIdentifier, Iterable<? extends ArchivedProperty> primitivePropertyComponents, @Nonnull JulianDate start, @Nonnull JulianDate stop, int maximumRecords)
getArchivedPrimitivePropertyComponents
in class TrackingArchive<TEntity extends IEntityIdentifier & IEntityLastUpdate>
entityIdentifier
- The identifier of the entity whose properties to retrieve.primitivePropertyComponents
- The archived properties to retrieve.start
- The time of the first property to retrieve.stop
- The time of the last property to retrieve.maximumRecords
- The maximum number of each property to retrieve.protected void archiveEntities(Transaction transaction, Iterable<? extends TEntity> entities)
archiveEntities
in class TrackingArchive<TEntity extends IEntityIdentifier & IEntityLastUpdate>
transaction
- A transaction that should be used to retrieve properties of the entities. It is possible for
later transactions to commit additional updates before this method is called for older updates.
However, this transaction will see the state of the system as of the time that the
updates being archived were committed. Using this transaction rather than creating a separate
one will guarantee that updates are not missed.entities
- The entities to archive.public TimeInterval getArchivedInterval(Object entityIdentifier)
getArchivedInterval
in class TrackingArchive<TEntity extends IEntityIdentifier & IEntityLastUpdate>
entityIdentifier
- The identifier of the entity for which to obtain the interval of availability.public TimeInterval getArchivedInterval()
getArchivedInterval
in class TrackingArchive<TEntity extends IEntityIdentifier & IEntityLastUpdate>