TrivialTicker
in a bogus way.
See issue 6423.@Deprecated public abstract class TransferThread extends java.lang.Object implements PrioRunnable, ClientGetCallback, ClientPutCallback
start()
, the thread will iterate the first time after getStartupDelay()
milliseconds.
After each iteration, it will sleep for getSleepTime()
milliseconds.Modifier and Type | Field and Description |
---|---|
protected HighLevelSimpleClient |
mClient
Deprecated.
|
protected ClientContext |
mClientContext
Deprecated.
|
protected Node |
mNode
Deprecated.
|
protected TempBucketFactory |
mTBF
Deprecated.
|
Constructor and Description |
---|
TransferThread(Node myNode,
HighLevelSimpleClient myClient,
java.lang.String myName)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
abortAllTransfers()
Deprecated.
|
protected void |
abortFetches()
Deprecated.
|
protected void |
abortInserts()
Deprecated.
|
protected void |
addFetch(ClientGetter g)
Deprecated.
|
protected void |
addInsert(BaseClientPutter p)
Deprecated.
|
protected abstract java.util.Collection<ClientGetter> |
createFetchStorage()
Deprecated.
|
protected abstract java.util.Collection<BaseClientPutter> |
createInsertStorage()
Deprecated.
|
protected int |
fetchCount()
Deprecated.
|
abstract int |
getPriority()
Deprecated.
Specify the priority of this thread.
|
protected abstract long |
getSleepTime()
Deprecated.
|
protected abstract long |
getStartupDelay()
Deprecated.
|
protected int |
insertCount()
Deprecated.
|
protected abstract void |
iterate()
Deprecated.
Called by the TransferThread after getStartupDelay() milliseconds for the first time and then after each getSleepTime() milliseconds.
|
void |
nextIteration()
Deprecated.
Wakes up the thread so that iterate() is called.
|
abstract void |
onFailure(FetchException e,
ClientGetter state)
Deprecated.
You have to do "finally { removeFetch() }" when using this function.
|
abstract void |
onFailure(InsertException e,
BaseClientPutter state)
Deprecated.
You have to do "finally { removeInsert() }" when using this function.
|
abstract void |
onFetchable(BaseClientPutter state)
Deprecated.
Called when the inserted data is fetchable (just a hint, don't rely on this).
|
abstract void |
onGeneratedURI(FreenetURI uri,
BaseClientPutter state)
Deprecated.
Called when URI is known (e.g.
|
abstract void |
onSuccess(BaseClientPutter state)
Deprecated.
You have to do "finally { removeInsert() }" when using this function.
|
abstract void |
onSuccess(FetchResult result,
ClientGetter state)
Deprecated.
You have to do "finally { removeFetch() }" when using this function.
|
protected void |
removeFetch(ClientGetter g)
Deprecated.
|
protected void |
removeInsert(BaseClientPutter p)
Deprecated.
|
void |
run()
Deprecated.
|
void |
start()
Deprecated.
Tells this TransferThread to start it's execution.
|
void |
terminate()
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onGeneratedMetadata
getRequestClient, onResume
protected final Node mNode
protected final HighLevelSimpleClient mClient
protected final ClientContext mClientContext
protected final TempBucketFactory mTBF
public TransferThread(Node myNode, HighLevelSimpleClient myClient, java.lang.String myName)
public void start()
public abstract int getPriority()
getPriority
in interface PrioRunnable
public void run()
run
in interface java.lang.Runnable
public void nextIteration()
protected void abortAllTransfers()
protected void abortFetches()
protected void abortInserts()
protected void addFetch(ClientGetter g)
protected void removeFetch(ClientGetter g)
protected void addInsert(BaseClientPutter p)
protected void removeInsert(BaseClientPutter p)
protected int fetchCount()
protected int insertCount()
public void terminate()
protected abstract java.util.Collection<ClientGetter> createFetchStorage()
protected abstract java.util.Collection<BaseClientPutter> createInsertStorage()
protected abstract long getStartupDelay()
protected abstract long getSleepTime()
protected abstract void iterate()
public abstract void onSuccess(FetchResult result, ClientGetter state)
onSuccess
in interface ClientGetCallback
public abstract void onFailure(FetchException e, ClientGetter state)
onFailure
in interface ClientGetCallback
public abstract void onSuccess(BaseClientPutter state)
onSuccess
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert() (to obtain the Bucket).public abstract void onFailure(InsertException e, BaseClientPutter state)
onFailure
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert() (to obtain the Bucket).public abstract void onFetchable(BaseClientPutter state)
ClientPutCallback
onFetchable
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().public abstract void onGeneratedURI(FreenetURI uri, BaseClientPutter state)
ClientPutCallback
onGeneratedURI
in interface ClientPutCallback
state
- The original BaseClientPutter object which was returned by the .insert() method which
started this insert. Can be casted to the return type of that .insert().