Package org.hpccsystems.dfs.client
Class StreamOperationMessages
- java.lang.Object
-
- org.hpccsystems.dfs.client.StreamOperationMessages
-
public class StreamOperationMessages extends Object
Message collection and summarization class. Used to collect messages (errors/warning/informative) generated as part of a stream operation. Messages can be summarized and reported post-stream, thereby avoiding potentially expensive and repetitive I/O operations.
-
-
Constructor Summary
Constructors Constructor Description StreamOperationMessages()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMessage(String message)
Adds message to stream operation message reportvoid
addMessage(String message, String fieldName)
Adds field specific message to stream operation message report.int
getEffectiveMessageCount()
String
getMessagesSummary()
Provides summary of all messages currently reportedint
getTotalMessageCount()
-
-
-
Method Detail
-
getTotalMessageCount
public int getTotalMessageCount()
- Returns:
- Total messages reported
-
getEffectiveMessageCount
public int getEffectiveMessageCount()
- Returns:
- Total unique messages tracked
-
addMessage
public void addMessage(String message)
Adds message to stream operation message report- Parameters:
message
- - Message to be reported to stream operation called Message should be as detailed as possible. However in extreme cases, unnecessarily unique messages can impact resource consumption
-
addMessage
public void addMessage(String message, String fieldName)
Adds field specific message to stream operation message report. Field name is appended to message in summary report- Parameters:
message
- - Message to be reported to stream operation called Message should be as detailed as possible. However in extreme cases, unnecessarily unique messages can impact resource consumptionfieldName
- Field name for message
-
getMessagesSummary
public String getMessagesSummary()
Provides summary of all messages currently reported- Returns:
- messages summary
-
-