public class DummyWorkspace extends Object implements MemoryWorkspace
MemoryWorkspace.Type| Modifier and Type | Field and Description |
|---|---|
protected MemoryWorkspace |
parentWorkspace |
DEFAULT_ID| Constructor and Description |
|---|
DummyWorkspace() |
| 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() |
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() |
long |
getGenerationId() |
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 last successful cycle, in bytes
|
Long |
getThreadId() |
WorkspaceConfiguration |
getWorkspaceConfiguration()
This method returns WorkspaceConfiguration bean that was used for given Workspace instance
|
MemoryWorkspace.Type |
getWorkspaceType() |
void |
initializeWorkspace()
This method causes Workspace initialization
|
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
|
void |
setPreviousWorkspace(MemoryWorkspace memoryWorkspace) |
MemoryWorkspace |
tagOutOfScopeUse() |
void |
toggleWorkspaceUse(boolean isEnabled)
This method allows you to temporary disable/enable given Workspace use.
|
protected MemoryWorkspace parentWorkspace
public WorkspaceConfiguration getWorkspaceConfiguration()
getWorkspaceConfiguration in interface MemoryWorkspacepublic String getId()
getId in interface MemoryWorkspacepublic Long getThreadId()
getThreadId in interface MemoryWorkspacepublic int getDeviceId()
getDeviceId in interface MemoryWorkspacepublic MemoryWorkspace.Type getWorkspaceType()
getWorkspaceType in interface MemoryWorkspacepublic PagedPointer alloc(long requiredMemory, DataBuffer.Type dataType, boolean initialize)
alloc in interface MemoryWorkspacerequiredMemory - allocation size, in bytesdataType - dataType that is going to be usedinitialize - public PagedPointer alloc(long requiredMemory, MemoryKind kind, DataBuffer.Type dataType, boolean initialize)
alloc in interface MemoryWorkspacerequiredMemory - allocation size, in byteskind - MemoryKind for allocationdataType - dataType that is going to be usedinitialize - public long getGenerationId()
getGenerationId in interface MemoryWorkspacepublic MemoryWorkspace notifyScopeEntered()
notifyScopeEntered in interface MemoryWorkspacepublic MemoryWorkspace notifyScopeBorrowed()
notifyScopeBorrowed in interface MemoryWorkspacepublic MemoryWorkspace notifyScopeLeft()
notifyScopeLeft in interface MemoryWorkspacepublic boolean isScopeActive()
isScopeActive in interface MemoryWorkspacepublic void initializeWorkspace()
PLEASE NOTE: This call will have no effect on previously initialized Workspace
initializeWorkspace in interface MemoryWorkspacepublic void destroyWorkspace()
destroyWorkspace in interface MemoryWorkspacepublic void destroyWorkspace(boolean extended)
destroyWorkspace in interface MemoryWorkspacepublic void toggleWorkspaceUse(boolean isEnabled)
toggleWorkspaceUse in interface MemoryWorkspaceisEnabled - public long getThisCycleAllocations()
getThisCycleAllocations in interface MemoryWorkspacepublic void enableDebug(boolean reallyEnable)
enableDebug in interface MemoryWorkspacereallyEnable - public long getLastCycleAllocations()
getLastCycleAllocations in interface MemoryWorkspacepublic long getMaxCycleAllocations()
getMaxCycleAllocations in interface MemoryWorkspacepublic long getCurrentSize()
getCurrentSize in interface MemoryWorkspacepublic void close()
close in interface AutoCloseableclose in interface MemoryWorkspacepublic MemoryWorkspace getParentWorkspace()
getParentWorkspace in interface MemoryWorkspacepublic MemoryWorkspace tagOutOfScopeUse()
tagOutOfScopeUse in interface MemoryWorkspacepublic void setPreviousWorkspace(MemoryWorkspace memoryWorkspace)
setPreviousWorkspace in interface MemoryWorkspaceCopyright © 2018. All rights reserved.