public class DummyWorkspace extends Object implements MemoryWorkspace
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() |
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
|
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
|
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 MemoryWorkspace
public String getId()
getId
in interface MemoryWorkspace
public Long getThreadId()
getThreadId
in interface MemoryWorkspace
public int getDeviceId()
getDeviceId
in interface MemoryWorkspace
public PagedPointer alloc(long requiredMemory, DataBuffer.Type dataType, boolean initialize)
alloc
in interface MemoryWorkspace
requiredMemory
- 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 MemoryWorkspace
requiredMemory
- allocation size, in byteskind
- MemoryKind for allocationdataType
- dataType that is going to be usedinitialize
- public MemoryWorkspace notifyScopeEntered()
notifyScopeEntered
in interface MemoryWorkspace
public MemoryWorkspace notifyScopeBorrowed()
notifyScopeBorrowed
in interface MemoryWorkspace
public MemoryWorkspace notifyScopeLeft()
notifyScopeLeft
in interface MemoryWorkspace
public boolean isScopeActive()
isScopeActive
in interface MemoryWorkspace
public void initializeWorkspace()
PLEASE NOTE: This call will have no effect on previously initialized Workspace
initializeWorkspace
in interface MemoryWorkspace
public void destroyWorkspace()
destroyWorkspace
in interface MemoryWorkspace
public void destroyWorkspace(boolean extended)
destroyWorkspace
in interface MemoryWorkspace
public void toggleWorkspaceUse(boolean isEnabled)
toggleWorkspaceUse
in interface MemoryWorkspace
isEnabled
- public long getThisCycleAllocations()
getThisCycleAllocations
in interface MemoryWorkspace
public void enableDebug(boolean reallyEnable)
enableDebug
in interface MemoryWorkspace
reallyEnable
- public long getLastCycleAllocations()
getLastCycleAllocations
in interface MemoryWorkspace
public long getMaxCycleAllocations()
getMaxCycleAllocations
in interface MemoryWorkspace
public long getCurrentSize()
getCurrentSize
in interface MemoryWorkspace
public void close()
close
in interface AutoCloseable
close
in interface MemoryWorkspace
public MemoryWorkspace getParentWorkspace()
getParentWorkspace
in interface MemoryWorkspace
public MemoryWorkspace tagOutOfScopeUse()
tagOutOfScopeUse
in interface MemoryWorkspace
Copyright © 2017. All rights reserved.