Package com.tangosol.io
Class WrapperBufferInput.VersionAwareBufferInput
- java.lang.Object
-
- java.io.InputStream
-
- com.tangosol.io.WrapperDataInputStream
-
- com.tangosol.io.WrapperBufferInput
-
- com.tangosol.io.WrapperBufferInput.VersionAwareBufferInput
-
- All Implemented Interfaces:
com.oracle.coherence.common.io.InputStreaming
,InputStreaming
,ReadBuffer.BufferInput
,Closeable
,DataInput
,AutoCloseable
- Enclosing class:
- WrapperBufferInput
public static class WrapperBufferInput.VersionAwareBufferInput extends WrapperBufferInput
A BufferInput implementation that in addition to delegating to the given DataInput provides an API to check whether the sender of the content of this BufferInput runs a version that supersedes (greater or equal to) the specified version.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.io.WrapperBufferInput
WrapperBufferInput.VersionAwareBufferInput
-
-
Field Summary
Fields Modifier and Type Field Description protected com.tangosol.internal.net.MessageComponent
f_message
The associated message received by this recipient.-
Fields inherited from class com.tangosol.io.WrapperDataInputStream
m_in, m_loader
-
-
Constructor Summary
Constructors Constructor Description VersionAwareBufferInput(DataInput in, ClassLoader loader, com.tangosol.internal.net.MessageComponent msg)
Construct a WrapperBufferInput that will read from the specified object implementing the DataInput interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isPatchCompatible(int nEncodedVersion)
Determine whether the sender of the content of this BufferInput run versions that are the same as the encode version with the same or a higher patch level.boolean
isVersionCompatible(int nEncodedVersion)
Determine whether the sender of the content of this BufferInput runs a version that supersedes (greater or equal to) the specified version.boolean
isVersionCompatible(int nYear, int nMonth, int nPatch)
Determine whether the sender of the content of this BufferInput runs a version that supersedes (greater or equal to) the specified version.boolean
isVersionCompatible(int nMajor, int nMinor, int nMicro, int nPatchSet, int nPatch)
Determine whether the sender of the content of this BufferInput runs a version that supersedes (greater or equal to) the specified version.-
Methods inherited from class com.tangosol.io.WrapperBufferInput
getBuffer, getDataInput, getObjectInputFilter, getOffset, readBuffer, readPackedInt, readPackedLong, readSafeUTF, setObjectInputFilter, setOffset
-
Methods inherited from class com.tangosol.io.WrapperDataInputStream
available, close, getClassLoader, mark, markSupported, read, read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, reset, setClassLoader, skip, skipBytes
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.oracle.coherence.common.io.InputStreaming
read, read, read, reset, skip
-
Methods inherited from interface com.tangosol.io.ReadBuffer.BufferInput
available, close, mark, markSupported, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
-
-
-
-
Constructor Detail
-
VersionAwareBufferInput
public VersionAwareBufferInput(DataInput in, ClassLoader loader, com.tangosol.internal.net.MessageComponent msg)
Construct a WrapperBufferInput that will read from the specified object implementing the DataInput interface.- Parameters:
in
- an object implementing DataInput to read fromloader
- the ClassLoadermsg
- the associated message received from the recipient
-
-
Method Detail
-
isVersionCompatible
public boolean isVersionCompatible(int nMajor, int nMinor, int nMicro, int nPatchSet, int nPatch)
Determine whether the sender of the content of this BufferInput runs a version that supersedes (greater or equal to) the specified version.- Returns:
- true iff the sender's version is greater or equal to the specified one
-
isVersionCompatible
public boolean isVersionCompatible(int nYear, int nMonth, int nPatch)
Determine whether the sender of the content of this BufferInput runs a version that supersedes (greater or equal to) the specified version.- Returns:
- true iff the sender's version is greater or equal to the specified one
-
isVersionCompatible
public boolean isVersionCompatible(int nEncodedVersion)
Determine whether the sender of the content of this BufferInput runs a version that supersedes (greater or equal to) the specified version.- Returns:
- true iff the sender's version is greater or equal to the specified one
-
isPatchCompatible
public boolean isPatchCompatible(int nEncodedVersion)
Determine whether the sender of the content of this BufferInput run versions that are the same as the encode version with the same or a higher patch level.- Returns:
- true iff all the sender's versions are the same version with the same or a higher patch level to the specified one
-
-