Package org.postgresql.pljava.internal
Class VarlenaWrapper.Verifier.NoOp
java.lang.Object
org.postgresql.pljava.internal.VarlenaWrapper.Verifier
org.postgresql.pljava.internal.VarlenaWrapper.Verifier.NoOp
- Enclosing class:
VarlenaWrapper.Verifier
A Verifier that accepts any content, cheaply.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.postgresql.pljava.internal.VarlenaWrapper.Verifier
VarlenaWrapper.Verifier.Base, VarlenaWrapper.Verifier.NoOp -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancel this verifier.voidfinish()Wait for the verify task and rethrow any exception it might have thrown.schedule()Set up theverifymethod to be executed in another thread.voidupdate(InputStream is) Send the nextInputStreamof content to be verified.voidupdate(org.postgresql.pljava.internal.VarlenaWrapper.Output.State state, ByteBuffer bb) Convenience method that callsflip()on a byte buffer, wraps it in aBufferWrapper, and passes it toVarlenaWrapper.Verifier.update(java.io.InputStream).Methods inherited from class org.postgresql.pljava.internal.VarlenaWrapper.Verifier
call, verify
-
Field Details
-
INSTANCE
-
-
Method Details
-
schedule
Description copied from class:VarlenaWrapper.VerifierSet up theverifymethod to be executed in another thread.- Overrides:
schedulein classVarlenaWrapper.Verifier- Returns:
- This
Verifierobject.
-
update
Description copied from class:VarlenaWrapper.VerifierSend the nextInputStreamof content to be verified.It is assumed, but not checked here, that any
InputStreamsupplied to this method supportsmarkandresetefficiently.If the verifier has already thrown an exception, it will be rethrown here in the current thread.
- Overrides:
updatein classVarlenaWrapper.Verifier- Parameters:
is- InputStream representing the next range of bytes to be verified.- Throws:
SQLException- if a verification error has already been detected, the verifier has been cancelled, etc.
-
update
public void update(org.postgresql.pljava.internal.VarlenaWrapper.Output.State state, ByteBuffer bb) throws SQLException Description copied from class:VarlenaWrapper.VerifierConvenience method that callsflip()on a byte buffer, wraps it in aBufferWrapper, and passes it toVarlenaWrapper.Verifier.update(java.io.InputStream).Note that the
NoOpversion of this method does none of that; in particular, the byte buffer will not have been flipped. This should not be a problem, as the thread passing the buffer to this method had better make no further use of it anyway.- Overrides:
updatein classVarlenaWrapper.Verifier- Parameters:
state- The state object protecting the native memory.bb- Byte buffer containing next range of content to verify.- Throws:
SQLException- if a verification error has already been detected, the verifier has been cancelled, etc.
-
finish
Description copied from class:VarlenaWrapper.VerifierWait for the verify task and rethrow any exception it might have thrown.- Overrides:
finishin classVarlenaWrapper.Verifier- Throws:
SQLException- any exception thrown by the verify method, or for unexpected conditions such as interruption while waiting.
-
cancel
Description copied from class:VarlenaWrapper.VerifierCancel this verifier.- Overrides:
cancelin classVarlenaWrapper.Verifier- Throws:
SQLException
-