public abstract class BridgeUpgrade extends Thread
IBuffer. The class defines hooks that need to be implemented by extenders that will
handle with the specific type of ResultSet typeThread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected org.gcube.common.searchservice.searchlibrary.rsclient.elements.RSLocator |
locator
The locator of the ResultSet input that needs to be upgraded
|
protected Class<org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase> |
recordInputClass
The type of records that are moved with the ResultSet input
|
protected Class<GCubeRecord> |
recordOutputClass
The type of records to be produced in the output
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
BridgeUpgrade() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
doUpgrade()
Iterate over the input, produce the output and store it in the output writer
|
abstract URI |
getLocator()
Retrieves the locator of the create
IBuffer |
abstract Logger |
getLogger()
The logger defined by the extending class to use the same logger
|
protected GCubeRecord |
getRecord(org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase record)
Instantiates the appropriate output record and populates it through the provided record
|
abstract void |
initialize()
Perform any initialization needed before the upgrade begins
|
void |
run() |
void |
setLocator(org.gcube.common.searchservice.searchlibrary.rsclient.elements.RSLocator locator)
Sets the RSLocator pointing to the input ResultSet
|
void |
setRecordInputClass(Class<org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase> recordClass)
Sets the type of records that are moved with the ResultSet input
|
void |
setRecordOutputClass(Class<GCubeRecord> recordClass)
Sets the type of records to be produced in the output
|
URI |
upgrade()
Perform the upgrade.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected org.gcube.common.searchservice.searchlibrary.rsclient.elements.RSLocator locator
protected Class<org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase> recordInputClass
protected Class<GCubeRecord> recordOutputClass
public URI upgrade() throws GCubeBridgeException
IBufferGCubeBridgeException - The upgrade could not be completedpublic void setLocator(org.gcube.common.searchservice.searchlibrary.rsclient.elements.RSLocator locator)
locator - the locatorpublic void setRecordInputClass(Class<org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase> recordClass)
recordClass - the type of record inputpublic void setRecordOutputClass(Class<GCubeRecord> recordClass)
recordClass - the type of record outputprotected GCubeRecord getRecord(org.gcube.common.searchservice.searchlibrary.resultset.elements.ResultElementBase record) throws GCubeBridgeException
record - the record to upgradeGCubeBridgeException - The record upgrade was not possiblepublic abstract void doUpgrade()
throws GCubeBridgeException
GCubeBridgeException - the upgrade could not be completedpublic abstract void initialize()
throws GCubeBridgeException
GCubeBridgeException - the initialization could not be completedpublic abstract URI getLocator() throws GCubeBridgeException
IBufferGCubeBridgeException - the locator could not be retrievedpublic abstract Logger getLogger()
Copyright © 2015. All Rights Reserved.