public interface MemoryWorkspaceManager
Modifier and Type | Method and Description |
---|---|
boolean |
anyWorkspaceActiveForCurrentThread()
Determine if there are any workspaces open for the current thread.
|
boolean |
checkIfWorkspaceExists(java.lang.String id)
This method checks, if Workspace with a given Id was created before this call
|
boolean |
checkIfWorkspaceExistsAndActive(java.lang.String id)
This method checks, if Workspace with a given Id was created before this call, AND is active at the moment of call
|
MemoryWorkspace |
createNewWorkspace()
This method builds new Workspace with default configuration
|
MemoryWorkspace |
createNewWorkspace(WorkspaceConfiguration configuration)
This method builds new Workspace with given configuration
|
MemoryWorkspace |
createNewWorkspace(WorkspaceConfiguration configuration,
java.lang.String id)
This method builds new Workspace with given configuration
|
MemoryWorkspace |
createNewWorkspace(WorkspaceConfiguration configuration,
java.lang.String id,
java.lang.Integer deviceId)
This method builds new Workspace with given configuration
|
void |
destroyAllWorkspacesForCurrentThread()
This method destroys & deallocates all Workspaces for a calling Thread
PLEASE NOTE: This method is NOT safe
|
void |
destroyWorkspace()
This method destroys current Workspace for current Thread
|
void |
destroyWorkspace(MemoryWorkspace workspace)
This method allows you to destroy given Workspace
|
java.util.List<MemoryWorkspace> |
getAllWorkspacesForCurrentThread()
This method returns all workspaces for current thread
|
java.util.List<java.lang.String> |
getAllWorkspacesIdsForCurrentThread()
This method returns list of workspace IDs for current thread
|
MemoryWorkspace |
getAndActivateWorkspace()
This method gets & activates default workspace
|
MemoryWorkspace |
getAndActivateWorkspace(java.lang.String id)
This method gets & activates workspace with a given Id
|
MemoryWorkspace |
getAndActivateWorkspace(WorkspaceConfiguration configuration,
java.lang.String id)
This method gets & activates default with a given configuration and Id
|
DebugMode |
getDebugMode()
This method returns current debug mode active in this JVM
|
java.lang.String |
getUUID()
Returns globally unique ID
|
MemoryWorkspace |
getWorkspaceForCurrentThread()
This method returns you current default Workspace for current Thread
PLEASE NOTE: If Workspace wasn't defined, new Workspace will be created using current default configuration
|
MemoryWorkspace |
getWorkspaceForCurrentThread(java.lang.String id)
This method returns you Workspace for a given Id for current Thread
PLEASE NOTE: If Workspace wasn't defined, new Workspace will be created using current default configuration
|
MemoryWorkspace |
getWorkspaceForCurrentThread(WorkspaceConfiguration configuration,
java.lang.String id)
This method returns you Workspace for a given Id for current Thread
PLEASE NOTE: If Workspace wasn't defined, new Workspace will be created using given configuration
|
void |
printAllocationStatisticsForCurrentThread()
This method prints out allocation statistics for current thread
|
MemoryWorkspace |
scopeOutOfWorkspaces()
This method temporary opens block out of any workspace scope.
|
void |
setDebugMode(DebugMode mode)
This method allows to enable (and pick one) global debug mode for workspaces
Default value: DISABLED
|
void |
setDefaultWorkspaceConfiguration(WorkspaceConfiguration configuration)
This method sets default workspace configuration for this provider instance
|
void |
setWorkspaceForCurrentThread(MemoryWorkspace workspace)
This method allows you to set given Workspace as default for current Thread
|
void |
setWorkspaceForCurrentThread(MemoryWorkspace workspace,
java.lang.String id)
This method allows you to set given Workspace for spacific Id for current Thread
|
java.lang.String getUUID()
DebugMode getDebugMode()
void setDebugMode(DebugMode mode)
mode
- void setDefaultWorkspaceConfiguration(WorkspaceConfiguration configuration)
configuration
- MemoryWorkspace createNewWorkspace(WorkspaceConfiguration configuration)
configuration
- MemoryWorkspace createNewWorkspace()
MemoryWorkspace createNewWorkspace(WorkspaceConfiguration configuration, java.lang.String id)
configuration
- MemoryWorkspace createNewWorkspace(WorkspaceConfiguration configuration, java.lang.String id, java.lang.Integer deviceId)
configuration
- MemoryWorkspace getWorkspaceForCurrentThread()
MemoryWorkspace getWorkspaceForCurrentThread(java.lang.String id)
MemoryWorkspace getWorkspaceForCurrentThread(WorkspaceConfiguration configuration, java.lang.String id)
void setWorkspaceForCurrentThread(MemoryWorkspace workspace)
workspace
- void setWorkspaceForCurrentThread(MemoryWorkspace workspace, java.lang.String id)
workspace
- void destroyWorkspace(MemoryWorkspace workspace)
workspace
- void destroyAllWorkspacesForCurrentThread()
void destroyWorkspace()
MemoryWorkspace getAndActivateWorkspace()
MemoryWorkspace getAndActivateWorkspace(java.lang.String id)
MemoryWorkspace getAndActivateWorkspace(WorkspaceConfiguration configuration, java.lang.String id)
boolean checkIfWorkspaceExists(java.lang.String id)
id
- boolean checkIfWorkspaceExistsAndActive(java.lang.String id)
id
- MemoryWorkspace scopeOutOfWorkspaces()
void printAllocationStatisticsForCurrentThread()
java.util.List<java.lang.String> getAllWorkspacesIdsForCurrentThread()
java.util.List<MemoryWorkspace> getAllWorkspacesForCurrentThread()
boolean anyWorkspaceActiveForCurrentThread()
Copyright © 2019. All rights reserved.