public class InternalPayloadSpace extends Object
Represents a payload space of an identity in memory for processing.
Constructor and Description |
---|
InternalPayloadSpace(InternalPayloadSpaceStore payloadSpace,
IdentityBlock identity)
Creates an internal payload space and adds it to the central directory.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addOperation(Operation op)
Add an operation to the payload space.
|
protected boolean |
compact() |
IdentityBlock |
getIdentity() |
PayloadChunk |
getPayload(int id)
Gets the payload of a workspace id.
|
boolean |
removeOperation(Operation op)
Remove an operation from the workspace.
|
void |
setCalculatedPayload(int id,
PayloadChunk p)
Sets an ephemeral payload.
|
PayloadChunk |
setPayload(PayloadChunk p)
Sets a payload chunk.
|
public InternalPayloadSpace(InternalPayloadSpaceStore payloadSpace, IdentityBlock identity)
Creates an internal payload space and adds it to the central directory.
payloadSpace
- the payload space to be addedidentity
- the identity the payload space is assigned topublic IdentityBlock getIdentity()
public PayloadChunk getPayload(int id)
Gets the payload of a workspace id.
id
- the payload id to be fetchedpublic PayloadChunk setPayload(PayloadChunk p)
Sets a payload chunk.
p
- the payload chunk to be setpublic void setCalculatedPayload(int id, PayloadChunk p)
Sets an ephemeral payload.
id
- the id of the payloadp
- the payloadpublic boolean addOperation(Operation op)
Add an operation to the payload space.
op
- the operation to be addedpublic boolean removeOperation(Operation op)
Remove an operation from the workspace.
op
- the operation to be removedprotected boolean compact()
Copyright © 2023. All rights reserved.