org.jwall.audit
Interface EventView<E extends Event>

All Known Subinterfaces:
AuditEventView, LogMessageView

public interface EventView<E extends Event>

This interface defines a view for a set of log events. It allows for filtering and counting log events based on filter expressions.

Author:
Christian Bockermann <chris@jwall.org>

Method Summary
 Long count(FilterExpression filter)
          Returns the number of log-messages within this view which match the given filter expression.
 Map<String,Long> count(String variable, FilterExpression filter)
          Returns the counts of events grouped by the specified variable.
 boolean delete(FilterExpression filter)
           
 boolean delete(String id)
          Delete the event with the given ID from the view (and the underlying storage).
 E get(String id)
          Retrieve the event with the given ID from the view.
 List<String> getCompletions(String variable)
          This method returns the list of values observed for the specified variable.
 Set<String> getIndexedVariables()
          This method returns the set of variables which are indexed by a view.
 Set<Operator> getSupportedOperators()
           
 Set<String> getVariables()
          This method returns the variable names which are supported for filtering by this view.
 List<E> list(FilterExpression filter, int offset, int limit)
          Returns the list of log-messages which match the given filter expression.
 void tag(FilterExpression filter, String tag)
           
 void untag(FilterExpression filter, String tag)
           
 

Method Detail

getVariables

Set<String> getVariables()
This method returns the variable names which are supported for filtering by this view.

Returns:

getIndexedVariables

Set<String> getIndexedVariables()
This method returns the set of variables which are indexed by a view. Indexed variables require no additional parsing of events and are thus much more efficiently to be accessed.

Returns:

getCompletions

List<String> getCompletions(String variable)
This method returns the list of values observed for the specified variable. Implementation of this method is optional, this method my simply return an empty list.

Parameters:
variable -
Returns:

count

Long count(FilterExpression filter)
           throws Exception
Returns the number of log-messages within this view which match the given filter expression.

Parameters:
filter -
Returns:
Throws:
Exception

count

Map<String,Long> count(String variable,
                       FilterExpression filter)
                       throws Exception
Returns the counts of events grouped by the specified variable.

Parameters:
variable -
filter -
Returns:
Throws:
Exception

list

List<E> list(FilterExpression filter,
             int offset,
             int limit)
                           throws Exception
Returns the list of log-messages which match the given filter expression. The offset and limit can be used to allow for a paging view.

Parameters:
filter -
offset -
limit -
Returns:
Throws:
Exception

get

E get(String id)
                    throws Exception
Retrieve the event with the given ID from the view.

Parameters:
id -
Returns:
Throws:
Exception

delete

boolean delete(String id)
               throws Exception
Delete the event with the given ID from the view (and the underlying storage).

Parameters:
id -
Returns:
Throws:
Exception

delete

boolean delete(FilterExpression filter)
               throws Exception
Throws:
Exception

tag

void tag(FilterExpression filter,
         String tag)
         throws Exception
Throws:
Exception

untag

void untag(FilterExpression filter,
           String tag)
           throws Exception
Throws:
Exception

getSupportedOperators

Set<Operator> getSupportedOperators()


Copyright © 2012 jwall.org. All Rights Reserved.