Skip to content

Commit

Permalink
MNEMONIC-815: Refactored Mnemonic OutputSession Interface
Browse files Browse the repository at this point in the history
  • Loading branch information
katarinaking committed Feb 22, 2024
1 parent ce79288 commit 07bf023
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,33 @@

import org.apache.mnemonic.RestorableAllocator;

/**
* Interface representing an output session for storing data in Mnemonic.
*
* @param <V> the type of data to be stored
* @param <A> the type of allocator used for memory allocation
*/
public interface OutputSession<V, A extends RestorableAllocator<A>>
extends ObjectCreator<V, A>, DurableComputable<A>, Closeable {

/**
* Posts a value to the output session for storage.
*
* @param v the value to be stored
*/
void post(V v);

/**
* Destroys a pending record with the specified key.
*
* @param k the key of the pending record to be destroyed
*/
void destroyPendingRecord(V k);

/**
* Destroys all pending records in the output session.
*/
void destroyAllPendingRecords();

}

0 comments on commit 07bf023

Please sign in to comment.