public interface MemoryWorkspace extends AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ID |
| Modifier and Type | Method and Description |
|---|---|
PagedPointer |
alloc(long requiredMemory,
DataBuffer.Type dataType,
boolean initialize)
This method does allocation from a given Workspace
|
PagedPointer |
alloc(long requiredMemory,
MemoryKind kind,
DataBuffer.Type dataType,
boolean initialize)
This method does allocation from a given Workspace
|
void |
close()
This method is for compatibility with "try-with-resources" java blocks.
|
void |
destroyWorkspace()
This method causes Workspace destruction: all memory allocations are released after this call.
|
void |
destroyWorkspace(boolean extended) |
void |
enableDebug(boolean reallyEnable)
This method enabled debugging mode for this workspace
|
long |
getCurrentSize()
This methos returns current allocated size of this workspace
|
int |
getDeviceId()
Returns deviceId for this workspace
|
String |
getId()
This method returns Id of this workspace
|
long |
getLastCycleAllocations()
This method returns amount of memory consumed in last successful cycle, in bytes
|
long |
getMaxCycleAllocations()
This method returns amount of memory consumed by largest successful cycle, in bytes
|
MemoryWorkspace |
getParentWorkspace()
This method returns parent Workspace, if any.
|
long |
getThisCycleAllocations()
This method returns amount of memory consumed in current cycle, in bytes
|
Long |
getThreadId()
This method returns threadId where this workspace was created
|
WorkspaceConfiguration |
getWorkspaceConfiguration()
This method returns WorkspaceConfiguration bean that was used for given Workspace instance
|
void |
initializeWorkspace()
This method causes Workspace initialization
PLEASE NOTE: This call will have no effect on previously initialized Workspace
|
boolean |
isScopeActive()
This method returns True if scope was opened, and not closed yet.
|
MemoryWorkspace |
notifyScopeBorrowed()
This method TEMPORARY enters this workspace, without reset applied
|
MemoryWorkspace |
notifyScopeEntered()
This method notifies given Workspace that new use cycle is starting now
|
MemoryWorkspace |
notifyScopeLeft()
This method notifies given Workspace that use cycle just ended
|
MemoryWorkspace |
tagOutOfScopeUse()
This method temporary disables this workspace
|
void |
toggleWorkspaceUse(boolean isEnabled)
This method allows you to temporary disable/enable given Workspace use.
|
static final String DEFAULT_ID
WorkspaceConfiguration getWorkspaceConfiguration()
String getId()
int getDeviceId()
Long getThreadId()
PagedPointer alloc(long requiredMemory, DataBuffer.Type dataType, boolean initialize)
requiredMemory - allocation size, in bytesdataType - dataType that is going to be usedPagedPointer alloc(long requiredMemory, MemoryKind kind, DataBuffer.Type dataType, boolean initialize)
requiredMemory - allocation size, in byteskind - MemoryKind for allocationdataType - dataType that is going to be usedMemoryWorkspace notifyScopeEntered()
MemoryWorkspace notifyScopeBorrowed()
MemoryWorkspace notifyScopeLeft()
boolean isScopeActive()
void initializeWorkspace()
void destroyWorkspace()
void destroyWorkspace(boolean extended)
void toggleWorkspaceUse(boolean isEnabled)
isEnabled - long getThisCycleAllocations()
void enableDebug(boolean reallyEnable)
reallyEnable - long getLastCycleAllocations()
long getMaxCycleAllocations()
long getCurrentSize()
void close()
close in interface AutoCloseableMemoryWorkspace getParentWorkspace()
MemoryWorkspace tagOutOfScopeUse()
Copyright © 2017. All rights reserved.