/** * Prepares deployable object. * * @param deployable Deployable object. */ public void prepare(GridCacheDeployable deployable) { assert depEnabled; // Only set deployment info if it was not set automatically. if (deployable.deployInfo() == null) { GridDeploymentInfoBean dep = globalDeploymentInfo(); if (dep == null) { GridDeployment locDep0 = locDep.get(); if (locDep0 != null) { // Will copy sequence number to bean. dep = new GridDeploymentInfoBean(locDep0); } } if (dep != null) deployable.prepare(dep); if (log.isDebugEnabled()) log.debug("Prepared grid cache deployable [dep=" + dep + ", deployable=" + deployable + ']'); } }
/** * @param o Object to prepare for marshalling. * @param ctx Context. * @throws IgniteCheckedException If failed. */ protected final void prepareObject(@Nullable Object o, GridCacheSharedContext ctx) throws IgniteCheckedException { assert addDepInfo || forceAddDepInfo; if (!skipPrepare && o != null) { GridDeploymentInfo d = ctx.deploy().globalDeploymentInfo(); if (d != null) { prepare(d); // Global deployment has been injected. skipPrepare = true; } else { Class<?> cls = U.detectClass(o); ctx.deploy().registerClass(cls); ClassLoader ldr = U.detectClassLoader(cls); if (ldr instanceof GridDeploymentInfo) prepare((GridDeploymentInfo)ldr); } } }
/** * Prepares deployable object. * * @param deployable Deployable object. */ public void prepare(GridCacheDeployable deployable) { assert depEnabled; // Only set deployment info if it was not set automatically. if (deployable.deployInfo() == null) { GridDeploymentInfoBean dep = globalDeploymentInfo(); if (dep == null) { GridDeployment locDep0 = locDep.get(); if (locDep0 != null) { // Will copy sequence number to bean. dep = new GridDeploymentInfoBean(locDep0); } } if (dep != null) deployable.prepare(dep); if (log.isDebugEnabled()) log.debug("Prepared grid cache deployable [dep=" + dep + ", deployable=" + deployable + ']'); } }
/** * @param o Object to prepare for marshalling. * @param ctx Context. * @throws IgniteCheckedException If failed. */ protected final void prepareObject(@Nullable Object o, GridCacheSharedContext ctx) throws IgniteCheckedException { assert addDepInfo || forceAddDepInfo; if (!skipPrepare && o != null) { GridDeploymentInfo d = ctx.deploy().globalDeploymentInfo(); if (d != null) { prepare(d); // Global deployment has been injected. skipPrepare = true; } else { Class<?> cls = U.detectClass(o); ctx.deploy().registerClass(cls); ClassLoader ldr = U.detectClassLoader(cls); if (ldr instanceof GridDeploymentInfo) prepare((GridDeploymentInfo)ldr); } } }