Platforms: minor refactoring: interopCtx -> platformCtx.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d9a13974 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d9a13974 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d9a13974 Branch: refs/heads/ignite-884 Commit: d9a13974b6e7c5fdd2b533e806e928fcca33bbaa Parents: 8df6b93 Author: vozerov-gridgain <voze...@gridgain.com> Authored: Wed Aug 26 16:03:25 2015 +0300 Committer: vozerov-gridgain <voze...@gridgain.com> Committed: Wed Aug 26 16:03:25 2015 +0300 ---------------------------------------------------------------------- .../platform/PlatformAbstractTarget.java | 44 ++++++++++---------- .../query/PlatformAbstractQueryCursor.java | 6 +-- .../cache/query/PlatformFieldsQueryCursor.java | 6 +-- .../cache/query/PlatformQueryCursor.java | 6 +-- .../transactions/PlatformTransactions.java | 12 +++--- .../platform/utils/PlatformFutureUtils.java | 12 +++--- .../platform/utils/PlatformUtils.java | 4 +- 7 files changed, 45 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a13974/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java index ec728e4..b68b16e 100644 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractTarget.java @@ -37,8 +37,8 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** */ private static final int OP_META = -1; - /** Interop context. */ - protected final PlatformContext interopCtx; + /** Context. */ + protected final PlatformContext platformCtx; /** Logger. */ protected final IgniteLogger log; @@ -46,21 +46,21 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** * Constructor. * - * @param interopCtx Interop context. + * @param platformCtx Context. */ - protected PlatformAbstractTarget(PlatformContext interopCtx) { - this.interopCtx = interopCtx; + protected PlatformAbstractTarget(PlatformContext platformCtx) { + this.platformCtx = platformCtx; - log = interopCtx.kernalContext().log(PlatformAbstractTarget.class); + log = platformCtx.kernalContext().log(PlatformAbstractTarget.class); } /** {@inheritDoc} */ @Override public int inOp(int type, long memPtr) throws Exception { - try (PlatformMemory mem = interopCtx.memory().get(memPtr)) { - PortableRawReaderEx reader = interopCtx.reader(mem); + try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { + PortableRawReaderEx reader = platformCtx.reader(mem); if (type == OP_META) { - interopCtx.processMetadata(reader); + platformCtx.processMetadata(reader); return TRUE; } @@ -74,8 +74,8 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public Object inOpObject(int type, long memPtr) throws Exception { - try (PlatformMemory mem = interopCtx.memory().get(memPtr)) { - PortableRawReaderEx reader = interopCtx.reader(mem); + try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { + PortableRawReaderEx reader = platformCtx.reader(mem); return processInOpObject(type, reader); } @@ -86,10 +86,10 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public void outOp(int type, long memPtr) throws Exception { - try (PlatformMemory mem = interopCtx.memory().get(memPtr)) { + try (PlatformMemory mem = platformCtx.memory().get(memPtr)) { PlatformOutputStream out = mem.output(); - PortableRawWriterEx writer = interopCtx.writer(out); + PortableRawWriterEx writer = platformCtx.writer(out); processOutOp(type, writer); @@ -107,13 +107,13 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { /** {@inheritDoc} */ @Override public void inOutOp(int type, long inMemPtr, long outMemPtr, Object arg) throws Exception { - try (PlatformMemory inMem = interopCtx.memory().get(inMemPtr)) { - PortableRawReaderEx reader = interopCtx.reader(inMem); + try (PlatformMemory inMem = platformCtx.memory().get(inMemPtr)) { + PortableRawReaderEx reader = platformCtx.reader(inMem); - try (PlatformMemory outMem = interopCtx.memory().get(outMemPtr)) { + try (PlatformMemory outMem = platformCtx.memory().get(outMemPtr)) { PlatformOutputStream out = outMem.output(); - PortableRawWriterEx writer = interopCtx.writer(out); + PortableRawWriterEx writer = platformCtx.writer(out); processInOutOp(type, reader, writer, arg); @@ -136,10 +136,10 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { } /** - * @return Interop context. + * @return Context. */ - public PlatformContext interopContext() { - return interopCtx; + public PlatformContext platformContext() { + return platformCtx; } /** @@ -150,7 +150,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { */ @SuppressWarnings("UnusedDeclaration") public void listenFuture(final long futId, int typ) throws IgniteCheckedException { - PlatformFutureUtils.listen(interopCtx, currentFutureWrapped(), futId, typ, null); + PlatformFutureUtils.listen(platformCtx, currentFutureWrapped(), futId, typ, null); } /** @@ -162,7 +162,7 @@ public abstract class PlatformAbstractTarget implements PlatformTarget { */ @SuppressWarnings("UnusedDeclaration") public void listenFuture(final long futId, int typ, int opId) throws IgniteCheckedException { - PlatformFutureUtils.listen(interopCtx, currentFutureWrapped(), futId, typ, futureWriter(opId)); + PlatformFutureUtils.listen(platformCtx, currentFutureWrapped(), futId, typ, futureWriter(opId)); } /** http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a13974/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java index cdd29fd..c01da0e 100644 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java @@ -50,12 +50,12 @@ public abstract class PlatformAbstractQueryCursor<T> extends PlatformAbstractTar /** * Constructor. * - * @param interopCtx Interop context. + * @param platformCtx Context. * @param cursor Underlying cursor. * @param batchSize Batch size. */ - public PlatformAbstractQueryCursor(PlatformContext interopCtx, QueryCursorEx<T> cursor, int batchSize) { - super(interopCtx); + public PlatformAbstractQueryCursor(PlatformContext platformCtx, QueryCursorEx<T> cursor, int batchSize) { + super(platformCtx); this.cursor = cursor; this.batchSize = batchSize; http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a13974/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java index f18a79a..6b2902c 100644 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformFieldsQueryCursor.java @@ -30,12 +30,12 @@ public class PlatformFieldsQueryCursor extends PlatformAbstractQueryCursor<List< /** * Constructor. * - * @param interopCtx Interop context. + * @param platformCtx Platform context. * @param cursor Backing cursor. * @param batchSize Batch size. */ - public PlatformFieldsQueryCursor(PlatformContext interopCtx, QueryCursorEx<List<?>> cursor, int batchSize) { - super(interopCtx, cursor, batchSize); + public PlatformFieldsQueryCursor(PlatformContext platformCtx, QueryCursorEx<List<?>> cursor, int batchSize) { + super(platformCtx, cursor, batchSize); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a13974/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java index cc96d6f..0d323a3 100644 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformQueryCursor.java @@ -30,12 +30,12 @@ public class PlatformQueryCursor extends PlatformAbstractQueryCursor<Cache.Entry /** * Constructor. * - * @param interopCtx Interop context. + * @param platformCtx Context. * @param cursor Backing cursor. * @param batchSize Batch size. */ - public PlatformQueryCursor(PlatformContext interopCtx, QueryCursorEx<Cache.Entry> cursor, int batchSize) { - super(interopCtx, cursor, batchSize); + public PlatformQueryCursor(PlatformContext platformCtx, QueryCursorEx<Cache.Entry> cursor, int batchSize) { + super(platformCtx, cursor, batchSize); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a13974/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java index fa63840..aedc380 100644 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/transactions/PlatformTransactions.java @@ -54,12 +54,12 @@ public class PlatformTransactions extends PlatformAbstractTarget { /** * Constructor. * - * @param interopCtx Interop context. + * @param platformCtx Context. */ - public PlatformTransactions(PlatformContext interopCtx) { - super(interopCtx); + public PlatformTransactions(PlatformContext platformCtx) { + super(platformCtx); - txs = interopCtx.kernalContext().grid().transactions(); + txs = platformCtx.kernalContext().grid().transactions(); } /** @@ -175,7 +175,7 @@ public class PlatformTransactions extends PlatformAbstractTarget { } }); - PlatformFutureUtils.listen(interopCtx, fut, futId, PlatformFutureUtils.TYP_OBJ); + PlatformFutureUtils.listen(platformCtx, fut, futId, PlatformFutureUtils.TYP_OBJ); } /** @@ -230,7 +230,7 @@ public class PlatformTransactions extends PlatformAbstractTarget { @Override protected void processOutOp(int type, PortableRawWriterEx writer) throws IgniteCheckedException { switch (type) { case OP_CACHE_CONFIG_PARAMETERS: - TransactionConfiguration txCfg = interopCtx.kernalContext().config().getTransactionConfiguration(); + TransactionConfiguration txCfg = platformCtx.kernalContext().config().getTransactionConfiguration(); writer.writeEnum(txCfg.getDefaultTxConcurrency()); writer.writeEnum(txCfg.getDefaultTxIsolation()); http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a13974/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformFutureUtils.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformFutureUtils.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformFutureUtils.java index fa986fe..677cb1c 100644 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformFutureUtils.java +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformFutureUtils.java @@ -58,7 +58,7 @@ public class PlatformFutureUtils { /** * Listen future. * - * @param ctx Interop context. + * @param ctx Context. * @param fut Java future. * @param futPtr Native future pointer. * @param typ Expected return type. @@ -70,7 +70,7 @@ public class PlatformFutureUtils { /** * Listen future. * - * @param ctx Interop context. + * @param ctx Context. * @param fut Java future. * @param futPtr Native future pointer. * @param typ Expected return type. @@ -84,7 +84,7 @@ public class PlatformFutureUtils { /** * Listen future. * - * @param ctx Interop context. + * @param ctx Context. * @param fut Java future. * @param futPtr Native future pointer. * @param writer Writer. @@ -96,7 +96,7 @@ public class PlatformFutureUtils { /** * Listen future. * - * @param ctx Interop context. + * @param ctx Context. * @param listenable Listenable entry. * @param futPtr Native future pointer. * @param typ Expected return type. @@ -200,7 +200,7 @@ public class PlatformFutureUtils { /** * Write future error. * - * @param ctx Interop context. + * @param ctx Context. * @param futPtr Future pointer. * @param err Error. */ @@ -226,7 +226,7 @@ public class PlatformFutureUtils { * * @param obj Object to write. * @param err Error to write. - * @param ctx Interop context. + * @param ctx Context. * @param writer Writer. * @param futPtr Future pointer. * @return Value indicating whether custom write was performed. When false, default write will be used. http://git-wip-us.apache.org/repos/asf/ignite/blob/d9a13974/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java ---------------------------------------------------------------------- diff --git a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java index 614346a..66e87e2 100644 --- a/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java +++ b/modules/platform/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java @@ -434,7 +434,7 @@ public class PlatformUtils { /** * Apply continuous query events to listener. * - * @param ctx Interop context. + * @param ctx Context. * @param lsnrPtr Listener pointer. * @param evts Events. * @throws javax.cache.event.CacheEntryListenerException In case of failure. @@ -473,7 +473,7 @@ public class PlatformUtils { /** * Evaluate the filter. * - * @param ctx Interop context. + * @param ctx Context. * @param filterPtr Native filter pointer. * @param evt Event. * @return Result.