public final class GlobalMemoryBlock extends Object implements BRefType, LockableStructureType
GlobalMemoryBlock
represents the global memory block in Ballerina VM.Constructor and Description |
---|
GlobalMemoryBlock(BStructureType structType)
Creates a GlobalMemoryBlock.
|
Modifier and Type | Method and Description |
---|---|
void |
addNativeData(String key,
Object data)
Add natively accessible data to a struct.
|
BValue |
copy()
Deep copy
BValue . |
int |
getBooleanField(int index) |
double |
getFloatField(int index) |
long |
getIntField(int index) |
Object |
getNativeData(String key)
Get natively accessible data from struct.
|
BRefType |
getRefField(int index) |
String |
getStringField(int index) |
BStructureType |
getType() |
boolean |
lockBooleanField(WorkerExecutionContext ctx,
int index) |
boolean |
lockFloatField(WorkerExecutionContext ctx,
int index) |
boolean |
lockIntField(WorkerExecutionContext ctx,
int index) |
boolean |
lockRefField(WorkerExecutionContext ctx,
int index) |
boolean |
lockStringField(WorkerExecutionContext ctx,
int index) |
void |
setBooleanField(int index,
int value) |
void |
setFloatField(int index,
double value) |
void |
setIntField(int index,
long value) |
void |
setRefField(int index,
BRefType value) |
void |
setStringField(int index,
String value) |
String |
stringValue() |
String |
toString() |
void |
unlockBooleanField(int index) |
void |
unlockFloatField(int index) |
void |
unlockIntField(int index) |
void |
unlockRefField(int index) |
void |
unlockStringField(int index) |
GlobalMemoryBlock |
value() |
public GlobalMemoryBlock(BStructureType structType)
structType
- type of the structpublic GlobalMemoryBlock value()
public String stringValue()
stringValue
in interface BValue
public BStructureType getType()
public long getIntField(int index)
getIntField
in interface StructureType
public void setIntField(int index, long value)
setIntField
in interface StructureType
public double getFloatField(int index)
getFloatField
in interface StructureType
public void setFloatField(int index, double value)
setFloatField
in interface StructureType
public String getStringField(int index)
getStringField
in interface StructureType
public void setStringField(int index, String value)
setStringField
in interface StructureType
public int getBooleanField(int index)
getBooleanField
in interface StructureType
public void setBooleanField(int index, int value)
setBooleanField
in interface StructureType
public BRefType getRefField(int index)
getRefField
in interface StructureType
public void setRefField(int index, BRefType value)
setRefField
in interface StructureType
public boolean lockIntField(WorkerExecutionContext ctx, int index)
lockIntField
in interface LockableStructureType
public void unlockIntField(int index)
unlockIntField
in interface LockableStructureType
public boolean lockFloatField(WorkerExecutionContext ctx, int index)
lockFloatField
in interface LockableStructureType
public void unlockFloatField(int index)
unlockFloatField
in interface LockableStructureType
public boolean lockStringField(WorkerExecutionContext ctx, int index)
lockStringField
in interface LockableStructureType
public void unlockStringField(int index)
unlockStringField
in interface LockableStructureType
public boolean lockBooleanField(WorkerExecutionContext ctx, int index)
lockBooleanField
in interface LockableStructureType
public void unlockBooleanField(int index)
unlockBooleanField
in interface LockableStructureType
public boolean lockRefField(WorkerExecutionContext ctx, int index)
lockRefField
in interface LockableStructureType
public void unlockRefField(int index)
unlockRefField
in interface LockableStructureType
public void addNativeData(String key, Object data)
key
- key to store data withdata
- data to be storedpublic Object getNativeData(String key)
key
- key by which data was storedCopyright © 2018 WSO2. All rights reserved.