public class HadoopPoolShimService extends Object implements KryoShimService
Constructor and Description |
---|
HadoopPoolShimService() |
Modifier and Type | Method and Description |
---|---|
void |
applyConfiguration(Configuration configuration)
Attempt to incorporate the supplied configuration in future read/write calls.
|
void |
close()
Release all resources associated with the shim service.
|
int |
getPriority()
Returns this service's relative priority number.
|
Object |
readClassAndObject(InputStream inputStream)
Deserializes an object from an input stream.
|
void |
writeClassAndObject(Object object,
OutputStream outputStream)
Serializes an object to an output stream.
|
public Object readClassAndObject(InputStream inputStream)
KryoShimService
readClassAndObject
in interface KryoShimService
inputStream
- the stream from which to read an object's serialized formsource
public void writeClassAndObject(Object object, OutputStream outputStream)
KryoShimService
writeClassAndObject
in interface KryoShimService
object
- the object to serializeoutputStream
- the stream into which the serialized object is writtenpublic void applyConfiguration(Configuration configuration)
KryoShimService
KryoShimService.writeClassAndObject(Object, OutputStream)
or KryoShimService.readClassAndObject(InputStream)
has been invoked on that particular instance.applyConfiguration
in interface KryoShimService
configuration
- the configuration to apply to this service's internal serializerpublic void close()
KryoShimService
KryoShimServiceLoader
is closed.close
in interface KryoShimService
public int getPriority()
KryoShimService
KryoShimServiceLoader.KRYO_SHIM_SERVICE
),
the service implementation with the numerically highest priority will be used
and all others ignored. In other words, the highest priority wins (in the absence of a
system property override).
TinkerPop's current default implementation uses priority value zero.
Third-party implementations of this interface should (but are not technically required) to use a priority value with absolute value greater than 100.
The implementation currently breaks priority ties by lexicographical comparison of fully-qualified package-and-classname, but this tie-breaking behavior should be considered undefined and subject to future change. Ties are ignored if the service is explicitly set through the system property mentioned above.
getPriority
in interface KryoShimService
Copyright © 2013–2020 Apache Software Foundation. All rights reserved.