Class GridDeploymentPerVersionStore
- java.lang.Object
-
- org.apache.ignite.internal.managers.deployment.GridDeploymentPerVersionStore
-
- All Implemented Interfaces:
GridDeploymentStore
public class GridDeploymentPerVersionStore extends Object
Deployment storage forDeploymentMode.SHAREDandDeploymentMode.CONTINUOUSmodes.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.ignite.internal.managers.deployment.GridDeploymentCommunicationcommDeployment communication.protected GridKernalContextctxKernal context.protected IgniteLoggerlogLogger.protected DeploymentSpispiDeployment SPI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParticipants(Map<UUID,IgniteUuid> allParticipants, Map<UUID,IgniteUuid> addedParticipants)Adds participants to all deployments.protected voidclearSerializationCaches()Clears serialization caches to avoid PermGen memory leaks.@Nullable GridDeploymentexplicitDeploy(Class<?> cls, ClassLoader clsLdr)Explicitly deploys class.voidexplicitUndeploy(UUID nodeId, String rsrcName)@Nullable GridDeploymentgetDeployment(GridDeploymentMetadata meta)GridDeploymentgetDeployment(IgniteUuid ldrId)Gets class loader based on ID.Collection<GridDeployment>getDeployments()protected booleanisTask(Class<?> cls)voidonKernalStart()Kernal started callback.voidonKernalStop()Kernel stopping callback.GridDeploymentsearchDeploymentCache(GridDeploymentMetadata meta)voidstart()Starts store.protected StringstartInfo()voidstop()Stops store.protected StringstopInfo()StringtoString()protected StringuserVersion(ClassLoader ldr)
-
-
-
Field Detail
-
log
protected final IgniteLogger log
Logger.
-
spi
protected final DeploymentSpi spi
Deployment SPI.
-
ctx
protected final GridKernalContext ctx
Kernal context.
-
comm
protected final org.apache.ignite.internal.managers.deployment.GridDeploymentCommunication comm
Deployment communication.
-
-
Method Detail
-
start
public void start() throws IgniteCheckedExceptionStarts store.- Throws:
IgniteCheckedException- If start failed.
-
stop
public void stop()
Stops store.
-
onKernalStart
public void onKernalStart() throws IgniteCheckedExceptionKernal started callback.- Specified by:
onKernalStartin interfaceGridDeploymentStore- Throws:
IgniteCheckedException- If callback execution failed.
-
onKernalStop
public void onKernalStop()
Kernel stopping callback.- Specified by:
onKernalStopin interfaceGridDeploymentStore
-
getDeployments
public Collection<GridDeployment> getDeployments()
- Returns:
- All current deployments.
-
getDeployment
public GridDeployment getDeployment(IgniteUuid ldrId)
Gets class loader based on ID.- Parameters:
ldrId- Class loader ID.- Returns:
- Class loader of
nullif not found.
-
searchDeploymentCache
public GridDeployment searchDeploymentCache(GridDeploymentMetadata meta)
- Parameters:
meta- Deployment meatdata.- Returns:
- Grid deployment instance if it was finded in cache,
nullotherwise.
-
getDeployment
@Nullable public @Nullable GridDeployment getDeployment(GridDeploymentMetadata meta)
- Parameters:
meta- Deployment metadata.- Returns:
- Deployment.
-
addParticipants
public void addParticipants(Map<UUID,IgniteUuid> allParticipants, Map<UUID,IgniteUuid> addedParticipants)
Adds participants to all deployments.- Parameters:
allParticipants- All participants to determine which deployments to add to.addedParticipants- Participants to add.
-
explicitUndeploy
public void explicitUndeploy(UUID nodeId, String rsrcName)
- Parameters:
nodeId- Optional ID of node that initiated request.rsrcName- Undeploys all deployments that have given
-
toString
public String toString()
-
startInfo
protected final String startInfo()
- Returns:
- Startup log message.
-
stopInfo
protected final String stopInfo()
- Returns:
- Stop log message.
-
explicitDeploy
@Nullable public @Nullable GridDeployment explicitDeploy(Class<?> cls, ClassLoader clsLdr) throws IgniteCheckedException
Explicitly deploys class.- Specified by:
explicitDeployin interfaceGridDeploymentStore- Parameters:
cls- Class to explicitly deploy.clsLdr- Class loader.- Returns:
- Grid deployment.
- Throws:
IgniteCheckedException- Id deployment failed.
-
userVersion
protected final String userVersion(ClassLoader ldr)
- Parameters:
ldr- Class loader.- Returns:
- User version.
-
isTask
protected final boolean isTask(Class<?> cls)
- Parameters:
cls- Class to check.- Returns:
Trueif class is task class.
-
clearSerializationCaches
protected final void clearSerializationCaches()
Clears serialization caches to avoid PermGen memory leaks. This method should be called on each undeployment.For more information: http://www.szegedi.org/articles/memleak3.html.
-
-