public class GridDeploymentPerVersionStore extends Object
GridDeploymentMode.SHARED and
GridDeploymentMode.CONTINUOUS modes.| Modifier and Type | Field and Description |
|---|---|
protected org.gridgain.grid.kernal.managers.deployment.GridDeploymentCommunication |
comm
Deployment communication.
|
protected GridKernalContext |
ctx
Kernal context.
|
protected GridLogger |
log
Logger.
|
protected GridDeploymentSpi |
spi
Deployment SPI.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addParticipants(Map<UUID,GridUuid> allParticipants,
Map<UUID,GridUuid> addedParticipants)
Adds participants to all deployments.
|
protected void |
clearSerializationCaches()
Clears serialization caches to avoid PermGen memory leaks.
|
GridDeployment |
explicitDeploy(Class<?> cls,
ClassLoader clsLdr)
Explicitly deploys class.
|
void |
explicitUndeploy(UUID nodeId,
String rsrcName) |
GridDeployment |
getDeployment(org.gridgain.grid.kernal.managers.deployment.GridDeploymentMetadata meta) |
GridDeployment |
getDeployment(GridUuid ldrId)
Gets class loader based on ID.
|
Collection<GridDeployment> |
getDeployments() |
protected boolean |
isTask(Class<?> cls) |
void |
onKernalStart()
Kernal started callback.
|
void |
onKernalStop()
Kernel stopping callback.
|
void |
start()
Starts store.
|
protected String |
startInfo() |
void |
stop()
Stops store.
|
protected String |
stopInfo() |
String |
toString() |
protected String |
userVersion(ClassLoader ldr) |
protected final GridLogger log
protected final GridDeploymentSpi spi
protected final GridKernalContext ctx
protected final org.gridgain.grid.kernal.managers.deployment.GridDeploymentCommunication comm
public void start()
throws GridException
GridException - If start failed.public void stop()
public void onKernalStart()
throws GridException
onKernalStart in interface GridDeploymentStoreGridException - If callback execution failed.public void onKernalStop()
onKernalStop in interface GridDeploymentStorepublic Collection<GridDeployment> getDeployments()
public GridDeployment getDeployment(GridUuid ldrId)
ldrId - Class loader ID.null if not found.@Nullable public GridDeployment getDeployment(org.gridgain.grid.kernal.managers.deployment.GridDeploymentMetadata meta)
meta - Deployment metadata.public void addParticipants(Map<UUID,GridUuid> allParticipants, Map<UUID,GridUuid> addedParticipants)
allParticipants - All participants to determine which deployments to add to.addedParticipants - Participants to add.public void explicitUndeploy(UUID nodeId, String rsrcName)
nodeId - Optional ID of node that initiated request.rsrcName - Undeploys all deployments that have givenpublic String toString()
protected final String startInfo()
protected final String stopInfo()
@Nullable public GridDeployment explicitDeploy(Class<?> cls, ClassLoader clsLdr) throws GridException
explicitDeploy in interface GridDeploymentStorecls - Class to explicitly deploy.clsLdr - Class loader.GridException - Id deployment failed.protected final String userVersion(ClassLoader ldr)
ldr - Class loader.protected final boolean isTask(Class<?> cls)
cls - Class to check.True if class is task class.protected final void clearSerializationCaches()
For more information: http://www.szegedi.org/articles/memleak3.html.
Copyright © 2014. All rights reserved.