001package de.monochromata.anaphors.cog.memory; 002 003import java.util.Collection; 004 005/** 006 * A memory to which chunks can be added. 007 * <p> 008 * Note that chunks cannot be removed from memory explicitly as they might 009 * become available later after they have been re-activated. 010 * 011 * @param <T> 012 * The type of objects that the chunks in this memory can represents. 013 * @since 1.1.0 014 */ 015public interface ModifiableMemory<T> extends Memory<T> { 016 017 /** 018 * @param timestamp 019 * the point in time at which the addition occurs (in the format 020 * returned by {@link System#currentTimeMillis()} 021 */ 022 public void add(final long timestamp, final Chunk<T> chunk); 023 024 /** 025 * @param timestamp 026 * the point in time at which the addition occurs (in the format 027 * returned by {@link System#currentTimeMillis()} 028 */ 029 public void addAll(final long timestamp, final Collection<Chunk<T>> chunks); 030 031}