Skip to content

Commit

Permalink
Merge pull request #382 from katarinaking/822
Browse files Browse the repository at this point in the history
MNEMONIC-822: Comment on MneDurableInputValue.
  • Loading branch information
katarinaking authored Apr 21, 2024
2 parents fd3d35e + df9a37a commit 8e80a77
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,61 @@

package org.apache.mnemonic.hadoop;

/**
* Represents a container for durable input values within the Hadoop environment.
* @param <V> The type of the value stored in the container.
*/
public class MneDurableInputValue<V> {

// The session associated with this input value
protected MneDurableInputSession<V> m_session;

// The stored value
protected V m_value;

/**
* Constructs a new MneDurableInputValue with the given session.
* @param sess The durable input session associated with this value.
*/
public MneDurableInputValue(MneDurableInputSession<V> sess) {
m_session = sess;
}

/**
* Constructs a new MneDurableInputValue with the given session and value.
* @param sess The durable input session associated with this value.
* @param value The value to be stored in this container.
*/
public MneDurableInputValue(MneDurableInputSession<V> sess, V value) {
m_session = sess;
m_value = value;
}

/**
* Retrieves the session associated with this input value.
* @return The durable input session associated with this value.
*/
public MneDurableInputSession<V> getSession() {
return m_session;
}

/**
* Sets the value of this container.
* @param value The value to be stored.
* @return This MneDurableInputValue instance.
*/
public MneDurableInputValue<V> of(V value) {
m_value = value;
return this;
}

/**
* Retrieves the value stored in this container.
* @return The value stored in this container.
*/
public V getValue() {
return m_value;
}

}

0 comments on commit 8e80a77

Please sign in to comment.