solar.service.pack.filter
Class RANDOM

java.lang.Object
  |
  +--solar.service.pack.PackFilter
        |
        +--solar.service.pack.filter.RANDOM
All Implemented Interfaces:
Identifiable

public class RANDOM
extends PackFilter

This filter uniformly drop certain percent of buffered events.

Version:
$Id: RANDOM.java,v 1.1 2003/10/13 19:34:25 glchen Exp $
Author:
Guanling Chen

Field Summary
protected  int _percent
           
protected static cern.jet.random.Uniform _unigen
           
 
Fields inherited from class solar.service.pack.PackFilter
 
Constructor Summary
RANDOM()
           
 
Method Summary
 void endSession(PackSession session)
          End a packing session.
 boolean filter(Event evt)
          Drop the event on floor if the filter returns false.
 void init(serp.util.Options opts)
          Init the filter with specified arguments.
 void startSession(PackSession session)
          Start a packing session.
 
Methods inherited from class solar.service.pack.PackFilter
getId, setId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_unigen

protected static cern.jet.random.Uniform _unigen

_percent

protected int _percent
Constructor Detail

RANDOM

public RANDOM()
Method Detail

init

public void init(serp.util.Options opts)
          throws java.lang.Exception
Description copied from class: PackFilter
Init the filter with specified arguments.

Specified by:
init in class PackFilter
java.lang.Exception

startSession

public void startSession(PackSession session)
Description copied from class: PackFilter
Start a packing session.

Specified by:
startSession in class PackFilter

filter

public boolean filter(Event evt)
               throws java.lang.Exception
Description copied from class: PackFilter
Drop the event on floor if the filter returns false.

Specified by:
filter in class PackFilter
java.lang.Exception

endSession

public void endSession(PackSession session)
Description copied from class: PackFilter
End a packing session.

Specified by:
endSession in class PackFilter