public class ContainerInserter extends java.lang.Object implements ClientPutState, java.io.Serializable
Constructor and Description |
---|
ContainerInserter(BaseClientPutter parent2,
PutCompletionCallback cb2,
java.util.HashMap<java.lang.String,java.lang.Object> metadata2,
FreenetURI targetURI2,
InsertContext ctx2,
boolean dontCompress2,
boolean reportMetadataOnly2,
java.lang.Object token2,
ArchiveManager.ARCHIVE_TYPE archiveType2,
boolean freeData,
byte[] forceCryptoKey,
byte cryptoAlgorithm,
boolean realTimeFlag)
Insert a bunch of files as single Archive with .metadata
|
Modifier and Type | Method and Description |
---|---|
void |
cancel(ClientContext context)
Cancel the request.
|
BaseClientPutter |
getParent()
Get the BaseClientPutter responsible for this request state.
|
java.lang.Object |
getToken()
Get the token, an object which is passed around with the insert and may be
used by callers.
|
int |
hashCode() |
void |
onResume(ClientContext context)
Called on restarting the node for a persistent request.
|
void |
onShutdown(ClientContext context)
Called just before the final write of client.dat before the node shuts down.
|
static void |
resumeMetadata(java.util.Map<java.lang.String,java.lang.Object> map,
ClientContext context) |
void |
schedule(ClientContext context)
Schedule the request.
|
public ContainerInserter(BaseClientPutter parent2, PutCompletionCallback cb2, java.util.HashMap<java.lang.String,java.lang.Object> metadata2, FreenetURI targetURI2, InsertContext ctx2, boolean dontCompress2, boolean reportMetadataOnly2, java.lang.Object token2, ArchiveManager.ARCHIVE_TYPE archiveType2, boolean freeData, byte[] forceCryptoKey, byte cryptoAlgorithm, boolean realTimeFlag)
parent2
- cb2
- metadata2
- targetURI2
- The caller need to clone it for persistancectx2
- dontCompress2
- reportMetadataOnly2
- token2
- archiveType2
- freeData
- forceCryptoKey
- cryptoAlgorithm
- realTimeFlag
- public void cancel(ClientContext context)
ClientPutState
cancel
in interface ClientPutState
public BaseClientPutter getParent()
ClientPutState
getParent
in interface ClientPutState
public java.lang.Object getToken()
ClientPutState
getToken
in interface ClientPutState
public void schedule(ClientContext context) throws InsertException
ClientPutState
schedule
in interface ClientPutState
InsertException
public int hashCode()
hashCode
in class java.lang.Object
public void onResume(ClientContext context) throws InsertException, ResumeFailedException
ClientPutState
onResume
in interface ClientPutState
InsertException
ResumeFailedException
public static void resumeMetadata(java.util.Map<java.lang.String,java.lang.Object> map, ClientContext context) throws ResumeFailedException
ResumeFailedException
public void onShutdown(ClientContext context)
ClientPutState
onShutdown
in interface ClientPutState