public class FeedbackStoreManager
extends java.lang.Object
Constructor and Description |
---|
FeedbackStoreManager(AgentContext agentContext,
java.lang.String name)
Create and initialize a store based on a default maxFileSize of 1024 kB (=1 MB)
|
FeedbackStoreManager(AgentContext agentContext,
java.lang.String name,
int maxStoreSize,
int maxFileSize)
Create and initialize a store
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the current active store to make sure it's nice and consistent on disk
|
java.util.SortedSet<java.lang.Long> |
getAllFeedbackStoreIDs()
Return a sorted set of all the feedback stores
|
java.util.List<org.apache.ace.feedback.Event> |
getEvents(long storeID,
long fromEventID,
long toEventID)
Return all events in the store in the given range.
|
long |
getHighestEventID(long storeID)
Give the highest eventId that is is present is the specified store
|
void |
write(int type,
java.util.Map<java.lang.String,java.lang.String> properties)
Write to the currently active store
|
public FeedbackStoreManager(AgentContext agentContext, java.lang.String name) throws java.io.IOException
agentContext
- the agentcontextname
- the name of the feedbackstorejava.io.IOException
public FeedbackStoreManager(AgentContext agentContext, java.lang.String name, int maxStoreSize, int maxFileSize) throws java.io.IOException
agentContext
- the agent contextname
- the name of the storemaxStoreSize
- the maximum size for this store, in bytes;maxFileSize
- the maximum size for one file, in bytes.java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
- if something goed wrongpublic java.util.SortedSet<java.lang.Long> getAllFeedbackStoreIDs() throws java.io.IOException
java.io.IOException
public java.util.List<org.apache.ace.feedback.Event> getEvents(long storeID, long fromEventID, long toEventID) throws java.io.IOException
storeId
- the storeIdeventId
- the start of the range of eventstoEventId
- the end of the range of eventsjava.io.IOException
public long getHighestEventID(long storeID) throws java.io.IOException
the
- storeIdjava.io.IOException
- in case of I/O problems accessing the store(s).public void write(int type, java.util.Map<java.lang.String,java.lang.String> properties) throws java.io.IOException
type
- the type of messageproperties
- the properties to be loggedjava.io.IOException