trait PackingLogic extends AnyRef
A method for Mothra packers to map Records to storage locations in a Mothra repository. It permits storing a Record zero, one, or multiple times, and it also allows the opportunity to modify the Record before it is stored.
- See also
PartitionerConfigurator instead. While some packing tools (
mothra-packerandmothra-repacker) still allow general PackingLogic definitions to be used, the more structured approach of splitting records into a partition structure is more generally useful and safe. To use a PackingLogic object for the packing logic configuration of one of the Mothra packer tools, use a file containing something like the following:import org.cert.netsa.io.ipfix.Record import org.cert.netsa.mothra.packer.{PackableRecord, PackingLogic} new PackingLogic { override def pack(rec: Record): TraversableOnce[PackableRecord] = ... }
Those tools will then compile this and use the partition configuration for packing records.
- Alphabetic
- By Inheritance
- PackingLogic
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
pack(record: Record): TraversableOnce[PackableRecord]
Stores an incoming Record to some number of files.
Stores an incoming Record to some number of files.
The packer calls this function for each Record that it reads from a stream. This function is responsible for determining how to store the record in the destination file(s).
Implementations of this function should determine the relative pathname where the record is to be stored and create a PackableRecord that contains the Record and the relative path. The "relative pathname" is the part of a file's pathname that begins with a version number (for example, "v2/") and ends just before the file's name.
To have the record not be stored, the function may return None. To store one Record, the function may wrap it in an Option. To store the record multiple times, a collection object may be returned. The stored records need not have any relation to the record passed into the function.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
sessionRegister(group: SessionGroup): Unit
This is a function that the packer invokes before it begins to process a stream of records.
This is a function that the packer invokes before it begins to process a stream of records. The argument is the SessionGroup that was created for the stream.
This implementation of function does nothing, but subclasses may override it to do things like register callback functions for templates in the SessionGroup.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()