@Internal public class InternalTimerServiceSerializationProxy<K> extends PostVersionedIOReadableWritable
Modifier and Type | Field and Description |
---|---|
static int |
VERSION |
Constructor and Description |
---|
InternalTimerServiceSerializationProxy(InternalTimeServiceManager<K> timerServicesManager,
ClassLoader userCodeClassLoader,
int keyGroupIdx)
Constructor to use when restoring timer services.
|
InternalTimerServiceSerializationProxy(InternalTimeServiceManager<K> timerServicesManager,
int keyGroupIdx)
Constructor to use when writing timer services.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getCompatibleVersions()
Returns the compatible version values.
|
int |
getVersion()
Returns the version number of the object.
|
protected void |
read(DataInputView in,
boolean wasVersioned)
Read from the provided
in . |
void |
write(DataOutputView out)
Writes the object's internal data to the given data output view.
|
read, read
getReadVersion
public static final int VERSION
public InternalTimerServiceSerializationProxy(InternalTimeServiceManager<K> timerServicesManager, ClassLoader userCodeClassLoader, int keyGroupIdx)
public InternalTimerServiceSerializationProxy(InternalTimeServiceManager<K> timerServicesManager, int keyGroupIdx)
public int getVersion()
Versioned
public int[] getCompatibleVersions()
VersionedIOReadableWritable
By default, the base implementation recognizes only the current version (identified by Versioned.getVersion()
)
as compatible. This method can be used as a hook and may be overridden to identify more compatible versions.
getCompatibleVersions
in class VersionedIOReadableWritable
public void write(DataOutputView out) throws IOException
IOReadableWritable
write
in interface IOReadableWritable
write
in class PostVersionedIOReadableWritable
out
- the output view to receive the data.IOException
- thrown if any error occurs while writing to the output streamprotected void read(DataInputView in, boolean wasVersioned) throws IOException
PostVersionedIOReadableWritable
in
. A flag wasVersioned
can be
used to determine whether or not the data to read was previously written
by a VersionedIOReadableWritable
.read
in class PostVersionedIOReadableWritable
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.