public class BinaryCasSerDes6 extends Object implements SlotKindsConstants
Modifier and Type | Class and Description |
---|---|
static class |
BinaryCasSerDes6.CompressLevel
Compression alternatives
|
static class |
BinaryCasSerDes6.CompressStrat |
static class |
BinaryCasSerDes6.ReuseInfo
Info reused for
1) multiple serializations of same cas to multiple targets (a speedup), or
2) for delta cas serialization, where it represents the fsStartIndex info before any mods
were done which could change that info, or
3) for deserializing with a delta cas, where it represents the fsStartIndex info at the time
the CAS was serialized out..
|
arrayLength_i, byte_i, CAN_BE_NEGATIVE, control_i, double_Exponent_i, double_Mantissa_Sign_i, float_Exponent_i, float_Mantissa_Sign_i, fsIndexes_i, heapRef_i, IGNORED, IN_MAIN_HEAP, int_i, long_High_i, long_Low_i, NBR_SLOT_KIND_ZIP_STREAMS, short_i, strChars_i, strLength_i, strOffset_i, strSeg_i, typeCode_i
Constructor and Description |
---|
BinaryCasSerDes6(AbstractCas cas)
Setup to serialize (not delta) or deserialize (not delta) using binary compression, no type
mapping but only processing reachable Feature Structures
|
BinaryCasSerDes6(AbstractCas cas,
BinaryCasSerDes6.ReuseInfo rfs)
Setup to serialize (not delta) or deserialize (maybe delta) using binary compression, no type
mapping and only processing reachable Feature Structures
|
BinaryCasSerDes6(AbstractCas cas,
BinaryCasSerDes6.ReuseInfo rfs,
boolean storeTS,
boolean storeTSI)
Setup to serialize (not delta) or deserialize (maybe delta) using binary compression, no type
mapping, optionally storing TSI, and only processing reachable Feature Structures
|
BinaryCasSerDes6(AbstractCas cas,
MarkerImpl mark,
TypeSystemImpl tgtTs,
BinaryCasSerDes6.ReuseInfo rfs)
Setup to serialize (maybe delta) or deserialize (maybe delta) using binary compression, with
type mapping and only processing reachable Feature Structures
|
BinaryCasSerDes6(AbstractCas cas,
MarkerImpl mark,
TypeSystemImpl tgtTs,
BinaryCasSerDes6.ReuseInfo rfs,
boolean doMeasurements)
Setup to serialize (maybe delta) or deserialize (maybe delta) using binary compression, with
type mapping and only processing reachable Feature Structures, output measurements
|
BinaryCasSerDes6(AbstractCas aCas,
MarkerImpl mark,
TypeSystemImpl tgtTs,
BinaryCasSerDes6.ReuseInfo rfs,
boolean doMeasurements,
BinaryCasSerDes6.CompressLevel compressLevel,
BinaryCasSerDes6.CompressStrat compressStrategy)
Setup to serialize or deserialize using binary compression, with (optional) type mapping and
only processing reachable Feature Structures
|
BinaryCasSerDes6(AbstractCas cas,
TypeSystemImpl tgtTs)
Setup to serialize (not delta) or deserialize (not delta) using binary compression, with type
mapping and only processing reachable Feature Structures
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareCASes(CASImpl c1,
CASImpl c2)
Compare 2 CASes, with perhaps different type systems.
|
void |
deserialize(InputStream istream) |
void |
deserialize(InputStream istream,
AllowPreexistingFS allowPreexistingFS)
Version used by uima-as to read delta cas from remote parallel steps
|
void |
deserializeAfterVersion(DataInputStream istream,
boolean isDelta,
AllowPreexistingFS allowPreexistingFS) |
BinaryCasSerDes6.ReuseInfo |
getReuseInfo() |
SerializationMeasures |
serialize(Object out)
S E R I A L I Z E
|
public BinaryCasSerDes6(AbstractCas aCas, MarkerImpl mark, TypeSystemImpl tgtTs, BinaryCasSerDes6.ReuseInfo rfs, boolean doMeasurements, BinaryCasSerDes6.CompressLevel compressLevel, BinaryCasSerDes6.CompressStrat compressStrategy) throws ResourceInitializationException
aCas
- required - refs the CAS being serialized or deserialized intomark
- if not null is the serialization mark for delta serialization. Unused for
deserialization.tgtTs
- if not null is the target type system. - For serialization - this is a subset of the
CASs TS - for deserialization, is the type system of the serialized data being read.rfs
- For delta serialization - must be not null, and the saved value after deserializing
the original before any modifications / additions made. For normal serialization - can
be null, but if not, is used in place of re-calculating, for speed up For delta
deserialization - must not be null, and is the saved value after serializing to the
service For normal deserialization - must be nulldoMeasurements
- if true, measurements are done (on serialization)compressLevel
- if not null, specifies enum instance for compress levelcompressStrategy
- if not null, specifies enum instance for compress strategyResourceInitializationException
- if the target type system is incompatible with the source type systempublic BinaryCasSerDes6(AbstractCas cas) throws ResourceInitializationException
cas
- -ResourceInitializationException
- never thrownpublic BinaryCasSerDes6(AbstractCas cas, TypeSystemImpl tgtTs) throws ResourceInitializationException
cas
- -tgtTs
- -ResourceInitializationException
- if the target type system is incompatible with the source type systempublic BinaryCasSerDes6(AbstractCas cas, MarkerImpl mark, TypeSystemImpl tgtTs, BinaryCasSerDes6.ReuseInfo rfs) throws ResourceInitializationException
cas
- -mark
- -tgtTs
- - for deserialization, is the type system of the serialized data being read.rfs
- Reused Feature Structure information - required for both delta serialization and delta
deserializationResourceInitializationException
- if the target type system is incompatible with the source type systempublic BinaryCasSerDes6(AbstractCas cas, MarkerImpl mark, TypeSystemImpl tgtTs, BinaryCasSerDes6.ReuseInfo rfs, boolean doMeasurements) throws ResourceInitializationException
cas
- -mark
- -tgtTs
- - - for deserialization, is the type system of the serialized data being read.rfs
- Reused Feature Structure information - speed up on serialization, required on delta
deserializationdoMeasurements
- -ResourceInitializationException
- if the target type system is incompatible with the source type systempublic BinaryCasSerDes6(AbstractCas cas, BinaryCasSerDes6.ReuseInfo rfs) throws ResourceInitializationException
cas
- -rfs
- -ResourceInitializationException
- never thrownpublic BinaryCasSerDes6(AbstractCas cas, BinaryCasSerDes6.ReuseInfo rfs, boolean storeTS, boolean storeTSI) throws ResourceInitializationException
cas
- -rfs
- -storeTS
- -storeTSI
- -ResourceInitializationException
- never thrownpublic BinaryCasSerDes6.ReuseInfo getReuseInfo()
public SerializationMeasures serialize(Object out) throws IOException
out
- -IOException
- passthrupublic void deserialize(InputStream istream) throws IOException
istream
- -IOException
- -public void deserialize(InputStream istream, AllowPreexistingFS allowPreexistingFS) throws IOException
istream
- input streamallowPreexistingFS
- what to do if item already exists below the markIOException
- passthrupublic void deserializeAfterVersion(DataInputStream istream, boolean isDelta, AllowPreexistingFS allowPreexistingFS) throws IOException
IOException
public boolean compareCASes(CASImpl c1, CASImpl c2)
c1
- CAS to comparec2
- CAS to compareCopyright © 2006–2022 The Apache Software Foundation. All rights reserved.