proj_name stringclasses 131
values | relative_path stringlengths 30 228 | class_name stringlengths 1 68 | func_name stringlengths 1 48 | masked_class stringlengths 78 9.82k | func_body stringlengths 46 9.61k | len_input int64 29 2.01k | len_output int64 14 1.94k | total int64 55 2.05k | relevant_context stringlengths 0 38.4k |
|---|---|---|---|---|---|---|---|---|---|
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/dump/WriteOnlyZipFileIOFactory.java | WriteOnlyZipFileIOFactory | create | class WriteOnlyZipFileIOFactory extends BufferedFileIOFactory {
/** */
private static final long serialVersionUID = 0L;
/** */
public WriteOnlyZipFileIOFactory(FileIOFactory factory) {
super(factory);
}
/** {@inheritDoc} */
@Override public WriteOnlyZipFileIO create(File file, Open... |
A.ensure(file.getName().endsWith(ZIP_SUFFIX), "File name should end with " + ZIP_SUFFIX);
String entryName = file.getName().substring(0, file.getName().length() - ZIP_SUFFIX.length());
return new WriteOnlyZipFileIO(factory.create(file, modes), entryName);
| 111 | 93 | 204 | <methods>public void <init>(org.apache.ignite.internal.processors.cache.persistence.file.FileIOFactory) ,public transient org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.BufferedFileIO create(java.io.File, java.nio.file.OpenOption[]) throws java.io.IOException<variables>protected final non-sealed ... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/BPlusLeafIO.java | BPlusLeafIO | copyItems | class BPlusLeafIO<L> extends BPlusIO<L> {
/**
* @param type Page type.
* @param ver Page format version.
* @param itemSize Single item size on page.
*/
protected BPlusLeafIO(int type, int ver, int itemSize) {
super(type, ver, true, true, itemSize);
}
/** {@inheritDoc} */
... |
assert srcIdx != dstIdx || srcPageAddr != dstPageAddr;
assertPageType(dstPageAddr);
PageHandler.copyMemory(srcPageAddr, offset(srcIdx), dstPageAddr, offset(dstIdx),
cnt * getItemSize());
| 265 | 77 | 342 | <methods>public final boolean canGetRow() ,public void compactPage(java.nio.ByteBuffer, java.nio.ByteBuffer, int) ,public abstract void copyItems(long, long, int, int, int, boolean) throws org.apache.ignite.IgniteCheckedException,public final int getCount(long) ,public final long getForward(long) ,public int getFreeSpa... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/PagePartitionMetaIOV3.java | PagePartitionMetaIOV3 | setEncryptedPageCount | class PagePartitionMetaIOV3 extends PagePartitionMetaIOV2 {
/** Last reencrypted page index offset. */
private static final int ENCRYPT_PAGE_IDX_OFF = GAPS_LINK + 8;
/** Total pages to be reencrypted offset. */
protected static final int ENCRYPT_PAGE_MAX_OFF = ENCRYPT_PAGE_IDX_OFF + 4;
/**
* ... |
assertPageType(pageAddr);
if (getEncryptedPageCount(pageAddr) == pagesCnt)
return false;
PageUtils.putInt(pageAddr, ENCRYPT_PAGE_MAX_OFF, pagesCnt);
return true;
| 881 | 70 | 951 | <methods>public void <init>(int) ,public long getGapsLink(long) ,public long getPartitionMetaStoreReuseListRoot(long) ,public long getPendingTreeRoot(long) ,public void initNewPage(long, long, int, org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMetrics) ,public boolean setGapsLink(long, long) ,publ... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/io/SimpleDataPageIO.java | SimpleDataPageIO | writeSizeFragment | class SimpleDataPageIO extends AbstractDataPageIO<SimpleDataRow> {
/** */
public static final IOVersions<SimpleDataPageIO> VERSIONS = new IOVersions<>(
new SimpleDataPageIO(1)
);
/**
* @param ver Page format version.
*/
public SimpleDataPageIO(int ver) {
super(T_DATA_PART,... |
final int size = 4;
if (rowOff >= size)
return 0;
if (rowOff == 0 && payloadSize >= size) {
buf.putInt(row.value().length);
return size;
}
ByteBuffer buf2 = ByteBuffer.allocate(size);
buf2.order(buf.order());
buf2.putInt(r... | 628 | 146 | 774 | <methods>public void addRow(long, long, org.apache.ignite.internal.processors.cache.persistence.freelist.SimpleDataRow, int, int) throws org.apache.ignite.IgniteCheckedException,public int addRow(long, byte[], int) throws org.apache.ignite.IgniteCheckedException,public int addRowFragment(org.apache.ignite.internal.page... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCompressStorage.java | SegmentCompressStorage | nextSegmentToCompressOrWait | class SegmentCompressStorage {
/** Logger. */
private final IgniteLogger log;
/** Flag of interrupt waiting on this object. */
private volatile boolean interrupted;
/** If WAL compaction enabled. */
private final boolean compactionEnabled;
/** Last successfully compressed segment. */
... |
try {
while (segmentsToCompress.peek() == null && !interrupted)
wait();
}
catch (InterruptedException e) {
throw new IgniteInterruptedCheckedException(e);
}
checkInterrupted();
Long idx = segmentsToCompress.poll();
asser... | 1,063 | 109 | 1,172 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/aware/SegmentCurrentStateStorage.java | SegmentCurrentStateStorage | nextAbsoluteSegmentIndex | class SegmentCurrentStateStorage extends SegmentObservable {
/** Flag of interrupt of waiting on this object. */
private volatile boolean interrupted;
/** Flag of force interrupt of waiting on this object. Needed for uninterrupted waiters. */
private volatile boolean forceInterrupted;
/** Total WA... |
long nextAbsIdx;
synchronized (this) {
try {
while ((curAbsWalIdx + 1) - lastAbsArchivedIdx > walSegmentsCnt && !forceInterrupted)
wait();
}
catch (InterruptedException e) {
throw new IgniteInterruptedCheckedExcept... | 1,028 | 166 | 1,194 | <methods><variables>private final Queue<Consumer<java.lang.Long>> observers |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/crc/FastCrc.java | FastCrc | calcCrc | class FastCrc {
/** CRC algo. */
private static final ThreadLocal<CRC32> CRC = ThreadLocal.withInitial(CRC32::new);
/** */
private final CRC32 crc = new CRC32();
/**
* Current value.
*/
private int val;
/** */
public FastCrc() {
reset();
}
/**
* Prepara... |
assert !file.isDirectory() : "CRC32 can't be calculated over directories";
CRC32 algo = new CRC32();
try (InputStream in = new CheckedInputStream(new FileInputStream(file), algo)) {
byte[] buf = new byte[1024];
while (in.read(buf) != -1)
;
}
... | 562 | 112 | 674 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/filehandle/FsyncFileHandleManagerImpl.java | FsyncFileHandleManagerImpl | initHandle | class FsyncFileHandleManagerImpl implements FileHandleManager {
/** Context. */
protected final GridCacheSharedContext cctx;
/** Logger. */
protected final IgniteLogger log;
/** */
private final WALMode mode;
/** Persistence metrics tracker. */
private final DataStorageMetricsImpl met... |
return new FsyncFileWriteHandle(
cctx, fileIO, metrics, serializer, position,
mode, maxWalSegmentSize, tlbSize, fsyncDelay
);
| 1,039 | 48 | 1,087 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/io/LockedReadFileInput.java | LockedReadFileInput | ensure | class LockedReadFileInput extends SimpleFileInput {
/** Segment for read. */
private final long segmentId;
/** Holder of actual information of latest manipulation on WAL segments. */
private final SegmentAware segmentAware;
/** Factory of file I/O for segment. */
private final SegmentIoFactory... |
int available = buffer().remaining();
if (available >= requested)
return;
// Segment deletion protection.
if (!segmentAware.reserve(segmentId))
throw new FileNotFoundException("Segment does not exist: " + segmentId);
try {
// Protection aga... | 563 | 214 | 777 | <methods>public void <init>(org.apache.ignite.internal.processors.cache.persistence.file.FileIO, org.apache.ignite.internal.processors.cache.persistence.wal.ByteBufferExpander) throws java.io.IOException,public java.nio.ByteBuffer buffer() ,public void ensure(int) throws java.io.IOException,public org.apache.ignite.int... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/io/LockedSegmentFileInputFactory.java | LockedSegmentFileInputFactory | createFileInput | class LockedSegmentFileInputFactory implements SegmentFileInputFactory {
/** Holder of actual information of latest manipulation on WAL segments. */
private final SegmentAware segmentAware;
/** Manager of segment location. */
private final SegmentRouter segmentRouter;
/** {@link FileIO} factory de... |
return new LockedReadFileInput(
buf,
segmentIO,
segmentAware,
id -> {
FileDescriptor segment = segmentRouter.findSegment(id);
return segment.toReadOnlyIO(fileIOFactory);
}
);
| 278 | 70 | 348 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/scanner/PrintToLogHandler.java | PrintToLogHandler | finish | class PrintToLogHandler implements ScannerHandler {
/** */
private final IgniteLogger log;
/** */
private StringBuilder resultString = new StringBuilder();
/**
* @param log Logger.
*/
public PrintToLogHandler(IgniteLogger log) {
this.log = log;
}
/** {@inheritDoc} */... |
ensureNotFinished();
String msg = resultString.toString();
resultString = null;
if (log.isInfoEnabled())
log.info(msg);
| 251 | 48 | 299 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryDetailMetricsAdapter.java | GridCacheQueryDetailMetricsAdapter | averageTime | class GridCacheQueryDetailMetricsAdapter implements QueryDetailMetrics, Externalizable {
/** */
private static final long serialVersionUID = 0L;
/** Query type to track metrics. */
private GridCacheQueryType qryType;
/** Textual query representation. */
private String qry;
/** Cache name.... |
double val = completions;
return val > 0 ? totalTime / val : 0;
| 1,674 | 27 | 1,701 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryDetailMetricsKey.java | GridCacheQueryDetailMetricsKey | equals | class GridCacheQueryDetailMetricsKey {
/** Query type to track metrics. */
private final GridCacheQueryType qryType;
/** Textual query representation. */
private final String qry;
/** Pre-calculated hash code. */
private final int hash;
/**
* Constructor.
*
* @param qryType... |
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
GridCacheQueryDetailMetricsKey other = (GridCacheQueryDetailMetricsKey)o;
return qryType == other.qryType && F.eq(qry, other.qry);
| 358 | 87 | 445 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryMetricsAdapter.java | QueryMetricsSnapshot | readExternal | class QueryMetricsSnapshot implements QueryMetrics, Externalizable {
/** */
private static final long serialVersionUID = 0L;
/** Minimal query execution time. */
private long minTime;
/** Maximum query execution time. */
private long maxTime;
/** Average query ... |
minTime = in.readLong();
maxTime = in.readLong();
avgTime = in.readDouble();
execs = in.readInt();
fails = in.readInt();
| 558 | 53 | 611 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQuerySqlMetadataJobV2.java | GridCacheQuerySqlMetadataJobV2 | call | class GridCacheQuerySqlMetadataJobV2 implements IgniteCallable<Collection<GridCacheQueryManager.CacheSqlMetadata>> {
/** */
private static final long serialVersionUID = 0L;
/** Number of fields to report when no fields defined. Includes _key and _val columns. */
private static final int NO_FIELDS_COLUM... |
final GridKernalContext ctx = ((IgniteKernal)ignite).context();
Collection<String> cacheNames = F.viewReadOnly(ctx.cache().caches(),
new C1<IgniteInternalCache<?, ?>, String>() {
@Override public String apply(IgniteInternalCache<?, ?> c) {
return c.name(... | 152 | 1,049 | 1,201 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/IndexQueryDesc.java | IndexQueryDesc | toString | class IndexQueryDesc implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** */
private final List<IndexQueryCriterion> criteria;
/** */
private final String idxName;
/** */
private final String valType;
/** */
public IndexQueryDesc(List<IndexQue... |
List<String> fields = criteria == null ? null : criteria.stream().map(IndexQueryCriterion::field).collect(Collectors.toList());
return "IndexQuery[" +
"idxName=" + idxName + ", " +
"valType=" + valType + ", " +
"fields=" + fields + "]";
| 234 | 88 | 322 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/QueryEntityTypeDescriptor.java | QueryEntityTypeDescriptor | addIndex | class QueryEntityTypeDescriptor {
/** Value field names and types with preserved order. */
@GridToStringInclude
private final Map<String, Class<?>> fields = new LinkedHashMap<>();
/** */
@GridToStringExclude
private final Map<String, QueryEntityClassProperty> props = new LinkedHashMap<>();
... |
if (inlineSize < 0 && inlineSize != QueryIndex.DFLT_INLINE_SIZE)
throw new CacheException("Illegal inline size [idxName=" + idxName + ", inlineSize=" + inlineSize + ']');
QueryEntityIndexDescriptor idx = new QueryEntityIndexDescriptor(type, inlineSize);
if (indexes.put(idxName, id... | 1,684 | 123 | 1,807 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryEvent.java | CacheContinuousQueryEvent | toString | class CacheContinuousQueryEvent<K, V> extends CacheQueryEntryEvent<K, V> {
/** */
private static final long serialVersionUID = 0L;
/** */
private final GridCacheContext cctx;
/** Entry. */
@GridToStringExclude
private final CacheContinuousQueryEntry e;
/**
* @param src Source cac... |
return S.toString(CacheContinuousQueryEvent.class, this,
"evtType", getEventType(), false,
"key", getKey(), true,
"newVal", getValue(), true,
"oldVal", getOldValue(), true,
"partCntr", getPartitionUpdateCounter(), false);
| 516 | 82 | 598 | <methods>public void <init>(Cache, EventType) ,public abstract long getPartitionUpdateCounter() <variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/reducer/TextQueryReducer.java | TextQueryReducer | pageComparator | class TextQueryReducer<R> extends MergeSortCacheQueryReducer<R> {
/** */
private static final long serialVersionUID = 0L;
/** */
public TextQueryReducer(final Map<UUID, NodePageStream<R>> pageStreams) {
super(pageStreams);
}
/** {@inheritDoc} */
@Override protected CompletableFutur... |
CompletableFuture<Comparator<NodePage<R>>> f = new CompletableFuture<>();
f.complete((o1, o2) -> -Float.compare(
((ScoredCacheEntry<?, ?>)o1.head()).score(), ((ScoredCacheEntry<?, ?>)o2.head()).score()));
return f;
| 128 | 88 | 216 | <methods>public boolean hasNextX() throws org.apache.ignite.IgniteCheckedException,public R nextX() throws org.apache.ignite.IgniteCheckedException<variables>private PriorityQueue<NodePage<R>> nodePages,private java.util.UUID pendingNodeId,private static final long serialVersionUID |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxKey.java | IgniteTxKey | equals | class IgniteTxKey implements Message {
/** */
private static final long serialVersionUID = 0L;
/** Key. */
@GridToStringInclude(sensitive = true)
private KeyCacheObject key;
/** Cache ID. */
private int cacheId;
/**
* Empty constructor required for {@link Externalizable}.
*/... |
if (this == o)
return true;
if (!(o instanceof IgniteTxKey))
return false;
IgniteTxKey that = (IgniteTxKey)o;
return cacheId == that.cacheId && key.equals(that.key);
| 958 | 71 | 1,029 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlock.java | TxDeadlock | toString | class TxDeadlock {
/** Key prefix. */
private static final String KEY_PREFIX = "K";
/** Tx prefix. */
private static final String TX_PREFIX = "TX";
/** Tx locked keys. */
private final Map<GridCacheVersion, Set<IgniteTxKey>> txLockedKeys;
/** Tx requested keys. */
private final Map<Ig... |
assert cycle != null && !cycle.isEmpty();
assert cycle.size() >= 3; // At least 2 transactions in cycle and the last is waiting for the first.
Map<IgniteTxKey, String> keyLabels = U.newLinkedHashMap(cycle.size() - 1);
Map<GridCacheVersion, String> txLabels = U.newLinkedHashMap(cycle.... | 546 | 758 | 1,304 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxLocksRequest.java | TxLocksRequest | prepareMarshal | class TxLocksRequest extends GridCacheMessage {
/** Serial version UID. */
private static final long serialVersionUID = 0L;
/** Future ID. */
private long futId;
/** Tx keys. */
@GridToStringInclude
@GridDirectTransient
private Set<IgniteTxKey> txKeys;
/** Array of txKeys from {@l... |
super.prepareMarshal(ctx);
txKeysArr = new IgniteTxKey[txKeys.size()];
int i = 0;
for (IgniteTxKey key : txKeys) {
key.prepareMarshal(ctx.cacheContext(key.cacheId()));
txKeysArr[i++] = key;
}
| 1,144 | 91 | 1,235 | <methods>public non-sealed void <init>() ,public abstract boolean addDeploymentInfo() ,public abstract boolean cacheGroupMessage() ,public org.apache.ignite.IgniteCheckedException classError() ,public org.apache.ignite.internal.managers.deployment.GridDeploymentInfo deployInfo() ,public java.lang.Throwable error() ,pub... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/AbstractDataLeafIO.java | AbstractDataLeafIO | visit | class AbstractDataLeafIO extends BPlusLeafIO<CacheSearchRow> implements RowLinkIO {
/**
* @param type Page type.
* @param ver Page format version.
* @param itemSize Single item size on page.
*/
public AbstractDataLeafIO(int type, int ver, int itemSize) {
super(type, ver, itemSize);
... |
assertPageType(pageAddr);
int cnt = getCount(pageAddr);
for (int i = 0; i < cnt; i++)
c.apply(new CacheDataRowAdapter(getLink(pageAddr, i)));
| 886 | 63 | 949 | <methods>public final void copyItems(long, long, int, int, int, boolean) throws org.apache.ignite.IgniteCheckedException,public int getMaxCount(long, int) ,public final int offset(int) <variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/AbstractPendingEntryLeafIO.java | AbstractPendingEntryLeafIO | store | class AbstractPendingEntryLeafIO extends BPlusLeafIO<PendingRow> implements PendingRowIO {
/**
* @param type Page type.
* @param ver Page format version.
* @param itemSize Single item size on page.
*/
AbstractPendingEntryLeafIO(int type, int ver, int itemSize) {
super(type, ver, item... |
assertPageType(dstPageAddr);
int dstOff = offset(dstIdx);
long link = ((PendingRowIO)srcIo).getLink(srcPageAddr, srcIdx);
long expireTime = ((PendingRowIO)srcIo).getExpireTime(srcPageAddr, srcIdx);
PageUtils.putLong(dstPageAddr, dstOff, expireTime);
PageUtils.putLong(... | 563 | 215 | 778 | <methods>public final void copyItems(long, long, int, int, int, boolean) throws org.apache.ignite.IgniteCheckedException,public int getMaxCount(long, int) ,public final int offset(int) <variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/CacheDataRowStore.java | CacheDataRowStore | dataRow | class CacheDataRowStore extends RowStore {
/** Whether version should be skipped. */
private static final ThreadLocal<Boolean> SKIP_VER = ThreadLocal.withInitial(() -> false);
/**
* @return Skip version flag.
*/
public static boolean getSkipVersion() {
return SKIP_VER.get();
}
... |
DataRow dataRow = new DataRow(
grp,
hash,
link,
partId,
rowData,
SKIP_VER.get()
);
return initDataRow(dataRow, cacheId);
| 558 | 63 | 621 | <methods>public void <init>(org.apache.ignite.internal.processors.cache.CacheGroupContext, FreeList#RAW) ,public void addRow(org.apache.ignite.internal.processors.cache.persistence.CacheDataRow, org.apache.ignite.internal.metric.IoStatisticsHolder) throws org.apache.ignite.IgniteCheckedException,public void addRows(Col... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/tree/PendingEntriesTree.java | PendingEntriesTree | compare | class PendingEntriesTree extends BPlusTree<PendingRow, PendingRow> {
/** */
public static final Object WITHOUT_KEY = new Object();
/** */
private final CacheGroupContext grp;
/**
* @param grp Cache group.
* @param name Tree name.
* @param pageMem Page memory.
* @param metaPageI... |
PendingRowIO io = (PendingRowIO)iox;
int cmp;
if (grp.sharedGroup()) {
assert row.cacheId != CU.UNDEFINED_CACHE_ID : "Cache ID is not provided!";
assert io.getCacheId(pageAddr, idx) != CU.UNDEFINED_CACHE_ID : "Cache ID is not stored!";
cmp = Integer.compar... | 628 | 391 | 1,019 | <methods>public final long destroy() throws org.apache.ignite.IgniteCheckedException,public final long destroy(IgniteInClosure<org.apache.ignite.internal.processors.cache.tree.PendingRow>, boolean) throws org.apache.ignite.IgniteCheckedException,public boolean destroyed() ,public void enableSequentialWriteMode() ,publi... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/verify/RetrieveConflictPartitionValuesTask.java | RetrieveConflictValuesJob | execute | class RetrieveConflictValuesJob extends ComputeJobAdapter {
/** */
private static final long serialVersionUID = 0L;
/** Ignite instance. */
@IgniteInstanceResource
private IgniteEx ignite;
/** Injected logger. */
@LoggerResource
private IgniteLogger log;... |
CacheGroupContext grpCtx = ignite.context().cache().cacheGroup(partKey.groupId());
if (grpCtx == null)
return Collections.emptyMap();
GridDhtLocalPartition part = grpCtx.topology().localPartition(partKey.partitionId());
if (part == null || !part.reserv... | 272 | 596 | 868 | <methods>public non-sealed void <init>() ,public org.apache.ignite.compute.ComputeJobResultPolicy result(org.apache.ignite.compute.ComputeJobResult, List<org.apache.ignite.compute.ComputeJobResult>) throws org.apache.ignite.IgniteException<variables>private static final long serialVersionUID |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/version/GridCacheVersionConflictContext.java | GridCacheVersionConflictContext | toString | class GridCacheVersionConflictContext<K, V> {
/** Old entry. */
@GridToStringInclude
private final GridCacheVersionedEntry<K, V> oldEntry;
/** New entry. */
@GridToStringInclude
private final GridCacheVersionedEntry<K, V> newEntry;
/** Object context. */
private final CacheObjectValueC... |
return state == State.MERGE ?
S.toString(GridCacheVersionConflictContext.class, this, "mergeValue", mergeVal, true) :
S.toString(GridCacheVersionConflictContext.class, this);
| 1,288 | 58 | 1,346 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/warmup/WarmUpMXBeanImpl.java | WarmUpMXBeanImpl | stopWarmUp | class WarmUpMXBeanImpl implements WarmUpMXBean {
/** Cache processor. */
@GridToStringExclude
private final GridCacheProcessor cacheProc;
/**
* Constructor.
*
* @param cacheProc Cache processor.
*/
public WarmUpMXBeanImpl(GridCacheProcessor cacheProc) {
this.cacheProc = ... |
try {
cacheProc.stopWarmUp();
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
}
| 179 | 46 | 225 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/BaselineTopologyHistory.java | BaselineTopologyHistory | restoreHistory | class BaselineTopologyHistory implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** */
private static final String METASTORE_BLT_HIST_PREFIX = "bltHist-";
/** */
private final Queue<BaselineTopologyHistoryItem> bufferedForStore =
new ConcurrentLinkedQueu... |
for (int i = 0; i < lastId; i++) {
BaselineTopologyHistoryItem histItem = (BaselineTopologyHistoryItem)metastorage.read(METASTORE_BLT_HIST_PREFIX + i);
if (histItem != null)
hist.add(histItem);
else
throw new IgniteCheckedException("Restoring... | 704 | 129 | 833 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClientSetClusterStateComputeRequest.java | ClientSetClusterStateComputeRequest | run | class ClientSetClusterStateComputeRequest implements IgniteRunnable {
/** */
private static final long serialVersionUID = 0L;
/** */
private final ClusterState state;
/** If {@code true}, cluster deactivation will be forced. */
private final boolean forceDeactivation;
/** */
private f... |
try {
ig.context().state().changeGlobalState(
state,
forceDeactivation,
baselineTopology != null ? baselineTopology.currentBaseline() : null,
forceChangeBaselineTopology
).get();
}
catch (IgniteCheckedExcept... | 323 | 91 | 414 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/ClusterNodeMetrics.java | ClusterNodeMetrics | cacheMetrics | class ClusterNodeMetrics implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** */
private final byte[] metrics;
/** */
private final Map<Integer, CacheMetrics> cacheMetrics;
/**
* @param metrics Metrics.
* @param cacheMetrics Cache metrics.
*... |
return cacheMetrics != null ? cacheMetrics : Collections.<Integer, CacheMetrics>emptyMap();
| 210 | 27 | 237 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/baseline/autoadjust/BaselineAutoAdjustExecutor.java | BaselineAutoAdjustExecutor | execute | class BaselineAutoAdjustExecutor {
/** */
private final IgniteLogger log;
/** */
private final IgniteClusterImpl cluster;
/** Service for execute this task in async. */
private final ExecutorService executorService;
/** {@code true} if baseline auto-adjust enabled. */
private final Bo... |
executorService.submit(() -> {
if (isExecutionExpired(data))
return;
executionGuard.lock();
try {
if (isExecutionExpired(data))
return;
cluster.triggerBaselineAutoAdjust(data.ge... | 420 | 136 | 556 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cluster/baseline/autoadjust/BaselineAutoAdjustScheduler.java | BaselineMultiplyUseTimeoutObject | onTimeout | class BaselineMultiplyUseTimeoutObject implements GridTimeoutObject {
/** Interval between logging of info about next baseline auto-adjust. */
private static final long AUTO_ADJUST_LOG_INTERVAL =
getLong(IGNITE_BASELINE_AUTO_ADJUST_LOG_INTERVAL, DFLT_BASELINE_AUTO_ADJUST_LOG_INTERVAL);
... |
if (baselineAutoAdjustExecutor.isExecutionExpired(baselineAutoAdjustData))
return;
long lastScheduledTaskTime = totalEndTime - System.currentTimeMillis();
if (lastScheduledTaskTime <= 0) {
if (log.isInfoEnabled())
log.info("Basel... | 694 | 186 | 880 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/compress/FileSystemUtils.java | FileSystemUtils | punchHole | class FileSystemUtils {
/** */
private static final String NATIVE_FS_LINUX_CLASS =
"org.apache.ignite.internal.processors.compress.NativeFileSystemLinux";
/** */
private static final NativeFileSystem fs;
/** */
private static volatile Throwable err;
/** */
static {
Nat... |
assert off >= 0;
assert len > 0;
checkSupported();
if (len < fsBlockSize)
return 0;
// TODO maybe optimize for power of 2
if (off % fsBlockSize != 0) {
long end = off + len;
off = (off / fsBlockSize + 1) * fsBlockSize;
l... | 644 | 165 | 809 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/configuration/distributed/SimpleDistributedProperty.java | SimpleDistributedProperty | parseNonNegativeInteger | class SimpleDistributedProperty<T extends Serializable> implements DistributedChangeableProperty<T> {
/** Name of property. */
private final String name;
/** Description of property. */
private final String description;
/** Property value. */
protected volatile T val;
/** Sign of attachme... |
if (val == null || val.trim().isEmpty())
return null;
int intVal = Integer.parseInt(val);
if (intVal < 0)
throw new IllegalArgumentException("The value must not be negative");
return intVal;
| 1,369 | 67 | 1,436 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousMessage.java | GridContinuousMessage | writeTo | class GridContinuousMessage implements Message {
/** */
private static final long serialVersionUID = 0L;
/** Message type. */
private GridContinuousMessageType type;
/** Routine ID. */
private UUID routineId;
/** Optional message data. */
@GridToStringInclude(sensitive = true)
@Gr... |
writer.setBuffer(buf);
if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType(), fieldsCount()))
return false;
writer.onHeaderWritten();
}
switch (writer.state()) {
case 0:
if (!writer.writeByteArray("da... | 1,252 | 285 | 1,537 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousQueryBatch.java | GridContinuousQueryBatch | add | class GridContinuousQueryBatch extends GridContinuousBatchAdapter {
/** Entries size included filtered entries. */
private final AtomicInteger size = new AtomicInteger();
/** {@inheritDoc} */
@Override public void add(Object obj) {<FILL_FUNCTION_BODY>}
/**
* @return Entries count.
*/
... |
assert obj != null;
assert obj instanceof CacheContinuousQueryEntry || obj instanceof List;
if (obj instanceof CacheContinuousQueryEntry) {
buf.add(obj);
size.incrementAndGet();
}
else {
List<Object> objs = (List<Object>)obj;
bu... | 110 | 112 | 222 | <methods>public non-sealed void <init>() ,public void add(java.lang.Object) ,public Collection<java.lang.Object> collect() ,public int size() <variables>protected final FastSizeDeque<java.lang.Object> buf |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerCacheUpdaters.java | BatchedSorted | receive | class BatchedSorted<K, V> implements StreamReceiver<K, V> {
/** */
private static final long serialVersionUID = 0L;
/** {@inheritDoc} */
@Override public void receive(IgniteCache<K, V> cache, Collection<Map.Entry<K, V>> entries) {<FILL_FUNCTION_BODY>}
} |
assert cache != null;
assert !F.isEmpty(entries);
Map<K, V> putAll = null;
Set<K> rmvAll = null;
for (Map.Entry<K, V> entry : entries) {
K key = entry.getKey();
assert key instanceof Comparable;
V val = entr... | 93 | 197 | 290 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerFuture.java | DataStreamerFuture | cancel | class DataStreamerFuture extends GridFutureAdapter<Object> {
/** Data loader. */
@GridToStringExclude
private DataStreamerImpl dataLdr;
/**
* @param dataLdr Data streamer.
*/
DataStreamerFuture(DataStreamerImpl dataLdr) {
assert dataLdr != null;
this.dataLdr = dataLdr;
... |
if (onCancelled()) {
dataLdr.closeEx(true);
return true;
}
return false;
| 180 | 39 | 219 | <methods>public non-sealed void <init>() ,public boolean cancel() throws org.apache.ignite.IgniteCheckedException,public IgniteInternalFuture<T> chain(IgniteClosure<? super IgniteInternalFuture<java.lang.Object>,T>) ,public IgniteInternalFuture<T> chain(IgniteOutClosure<T>) ,public IgniteInternalFuture<T> chain(IgniteC... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CollocatedQueueItemKey.java | CollocatedQueueItemKey | equals | class CollocatedQueueItemKey implements QueueItemKey {
/** */
private IgniteUuid queueId;
/** */
@AffinityKeyMapped
private int queueNameHash;
/** */
private long idx;
/**
* @param queueId Queue unique ID.
* @param queueName Queue name.
* @param idx Item index.
*/
... |
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CollocatedQueueItemKey itemKey = (CollocatedQueueItemKey)o;
return idx == itemKey.idx && queueId.equals(itemKey.queueId);
| 297 | 84 | 381 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/CollocatedSetItemKey.java | CollocatedSetItemKey | hashCode | class CollocatedSetItemKey implements SetItemKey {
/** */
private IgniteUuid setId;
/** */
@GridToStringInclude(sensitive = true)
private Object item;
/** */
@AffinityKeyMapped
private int setNameHash;
/**
* @param setName Set name.
* @param setId Set unique ID.
* @... |
int res = setId.hashCode();
res = 31 * res + item.hashCode();
return res;
| 405 | 35 | 440 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedValue.java | GridCacheAtomicStampedValue | deployClass | class GridCacheAtomicStampedValue<T, S> extends AtomicDataStructureValue implements GridPeerDeployAware {
/** */
private static final long serialVersionUID = 0L;
/** Value. */
private T val;
/** Stamp. */
private S stamp;
/**
* Constructor.
*
* @param val Initial value.
... |
ClassLoader clsLdr = getClass().getClassLoader();
// First of all check classes that may be loaded by class loader other than application one.
return stamp != null && !clsLdr.equals(stamp.getClass().getClassLoader()) ?
stamp.getClass() : val != null ? val.getClass() : getClass();
... | 610 | 88 | 698 | <methods>public non-sealed void <init>() ,public abstract org.apache.ignite.internal.processors.datastructures.DataStructureType type() <variables>private static final long serialVersionUID |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchValue.java | GridCacheCountDownLatchValue | readExternal | class GridCacheCountDownLatchValue extends VolatileAtomicDataStructureValue implements Cloneable {
/** */
private static final long serialVersionUID = 0L;
/** Count. */
@GridToStringInclude(sensitive = true)
private int cnt;
/** Initial count. */
@GridToStringInclude(sensitive = true)
... |
cnt = in.readInt();
initCnt = in.readInt();
autoDel = in.readBoolean();
gridStartTime = in.readLong();
| 698 | 45 | 743 | <methods>public non-sealed void <init>() ,public abstract long gridStartTime() <variables>private static final long serialVersionUID |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheQueueHeaderKey.java | GridCacheQueueHeaderKey | equals | class GridCacheQueueHeaderKey implements Externalizable, GridCacheInternal {
/** */
private static final long serialVersionUID = 0L;
/** */
private String name;
/**
* Required by {@link Externalizable}.
*/
public GridCacheQueueHeaderKey() {
// No-op.
}
/**
* @pa... |
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
GridCacheQueueHeaderKey queueKey = (GridCacheQueueHeaderKey)o;
return name.equals(queueKey.name);
| 342 | 73 | 415 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheSemaphoreState.java | GridCacheSemaphoreState | readExternal | class GridCacheSemaphoreState extends VolatileAtomicDataStructureValue implements Cloneable {
/** */
private static final long serialVersionUID = 0L;
/** Permission count. */
private int cnt;
/** Map containing number of acquired permits for each node waiting on this semaphore. */
@GridToStrin... |
cnt = in.readInt();
failoverSafe = in.readBoolean();
gridStartTime = in.readLong();
if (in.readBoolean()) {
int size = in.readInt();
waiters = U.newHashMap(size);
for (int i = 0; i < size; i++)
waiters.put(U.readUuid(in), in.readInt... | 974 | 120 | 1,094 | <methods>public non-sealed void <init>() ,public abstract long gridStartTime() <variables>private static final long serialVersionUID |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridTransactionalCacheQueueImpl.java | GridTransactionalCacheQueueImpl | call | class GridTransactionalCacheQueueImpl<T> extends GridCacheQueueAdapter<T> {
/**
* @param queueName Queue name.
* @param hdr Queue header.
* @param cctx Cache context.
*/
public GridTransactionalCacheQueueImpl(String queueName, GridCacheQueueHeader hdr, GridCacheContext<?, ?> cctx) {
... |
boolean retVal;
try (GridNearTxLocal tx = cache.txStartEx(PESSIMISTIC, REPEATABLE_READ)) {
Long idx = (Long)cache.invoke(queueKey, new AddProcessor(id, 1)).get();
if (idx != null) {
checkRemoved(idx);
... | 1,187 | 140 | 1,327 | <methods>public boolean add(T) ,public R affinityCall(IgniteCallable<R>) ,public void affinityRun(org.apache.ignite.lang.IgniteRunnable) ,public boolean bounded() ,public int capacity() ,public void clear() ,public void clear(int) throws org.apache.ignite.IgniteException,public void close() ,public boolean collocated()... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/diagnostic/DiagnosticProcessor.java | DiagnosticProcessor | walDirs | class DiagnosticProcessor extends GridProcessorAdapter {
/** @see IgniteSystemProperties#IGNITE_DUMP_PAGE_LOCK_ON_FAILURE */
public static final boolean DFLT_DUMP_PAGE_LOCK_ON_FAILURE = true;
/** Value of the system property that enables page locks dumping on failure. */
private static final boolean IG... |
IgniteWriteAheadLogManager walMgr = ctx.cache().context().wal();
if (walMgr instanceof FileWriteAheadLogManager) {
SegmentRouter sr = ((FileWriteAheadLogManager)walMgr).getSegmentRouter();
if (sr != null) {
File workDir = sr.getWalWorkDir();
ret... | 1,607 | 143 | 1,750 | <methods>public void collectGridNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public void collectJoiningNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType discoveryDataType() ,public void onDisconnected(IgniteFuture<?>) thr... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/ClientRequestFuture.java | ClientRequestFuture | requestMapping | class ClientRequestFuture extends GridFutureAdapter<MappingExchangeResult> {
/** */
private static final AtomicReference<IgniteLogger> logRef = new AtomicReference<>();
/** */
private static IgniteLogger log;
/** */
private final GridIoManager ioMgr;
/** */
private final GridDiscovery... |
boolean noSrvsInCluster;
synchronized (this) {
while (!aliveSrvNodes.isEmpty()) {
ClusterNode srvNode = aliveSrvNodes.poll();
try {
ioMgr.sendToGridTopic(
srvNode,
GridTopic.TOPIC_MAPPING_M... | 721 | 331 | 1,052 | <methods>public non-sealed void <init>() ,public boolean cancel() throws org.apache.ignite.IgniteCheckedException,public IgniteInternalFuture<T> chain(IgniteClosure<? super IgniteInternalFuture<org.apache.ignite.internal.processors.marshaller.MappingExchangeResult>,T>) ,public IgniteInternalFuture<T> chain(IgniteOutClo... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/GridMarshallerMappingProcessor.java | MappingProposedListener | onCustomEvent | class MappingProposedListener implements CustomEventListener<MappingProposedMessage> {
/** {@inheritDoc} */
@Override public void onCustomEvent(
AffinityTopologyVersion topVer,
ClusterNode snd,
MappingProposedMessage msg
) {<FILL_FUNCTION_BODY>}
... |
if (!ctx.isStopping()) {
if (msg.duplicated())
return;
if (!msg.inConflict()) {
MarshallerMappingItem item = msg.mappingItem();
MappedName existingName = marshallerCtx.onMappingProposed(item);
... | 231 | 292 | 523 | <methods>public void collectGridNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public void collectJoiningNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType discoveryDataType() ,public void onDisconnected(IgniteFuture<?>) thr... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/MarshallerMappingItem.java | MarshallerMappingItem | equals | class MarshallerMappingItem implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** */
private final byte platformId;
/** */
private final int typeId;
/** */
private String clsName;
/**
* Class name may be null when instance is created to reques... |
if (obj == this)
return true;
if (!(obj instanceof MarshallerMappingItem))
return false;
MarshallerMappingItem that = (MarshallerMappingItem)obj;
return platformId == that.platformId
&& typeId == that.typeId
&& (Objects.equals(c... | 466 | 89 | 555 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/MissingMappingRequestMessage.java | MissingMappingRequestMessage | writeTo | class MissingMappingRequestMessage implements Message {
/** */
private static final long serialVersionUID = 0L;
/** */
private byte platformId;
/** */
private int typeId;
/**
* Default constructor.
*/
public MissingMappingRequestMessage() {
//No-op.
}
/**
... |
writer.setBuffer(buf);
if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType(), fieldsCount()))
return false;
writer.onHeaderWritten();
}
switch (writer.state()) {
case 0:
if (!writer.writeByte("platfor... | 538 | 149 | 687 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageHistoryCache.java | DistributedMetaStorageHistoryCache | equals | class DistributedMetaStorageHistoryCache {
/**
* Version of the oldest history item in the cache. For empty history it is expected to be zero until the
* first change.
*/
private long startingVer;
/**
* Looped array to store history items. Must always have size that is the power of two,... |
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
DistributedMetaStorageHistoryCache that = (DistributedMetaStorageHistoryCache)o;
int size = size();
if (size != that.size())
return false;
if (... | 1,338 | 174 | 1,512 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageVersion.java | DistributedMetaStorageVersion | equals | class DistributedMetaStorageVersion extends IgniteDataTransferObject {
/** Serial version UID. */
private static final long serialVersionUID = 0L;
/** Version with id "0". */
public static final DistributedMetaStorageVersion INITIAL_VERSION = new DistributedMetaStorageVersion(0L, 1L);
/** Incremen... |
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
DistributedMetaStorageVersion ver = (DistributedMetaStorageVersion)o;
return id == ver.id && hash == ver.hash;
| 1,300 | 75 | 1,375 | <methods>public non-sealed void <init>() ,public byte getProtocolVersion() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>private static final int MAGIC,protected static fina... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/MetricsMxBeanImpl.java | MetricsMxBeanImpl | resetMetrics | class MetricsMxBeanImpl implements MetricsMxBean {
/** Metric manager. */
private final GridMetricManager mmgr;
/** Logger. */
private final IgniteLogger log;
/**
* @param mmgr Metric manager.
* @param log Logger.
*/
public MetricsMxBeanImpl(GridMetricManager mmgr, IgniteLogger ... |
assert registry != null;
MetricRegistryImpl mreg = mmgr.registry(registry);
if (mreg != null)
mreg.reset();
else if (log.isInfoEnabled())
log.info("\"" + registry + "\" not found.");
| 315 | 74 | 389 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/PushMetricsExporterAdapter.java | PushMetricsExporterAdapter | onContextInitialized0 | class PushMetricsExporterAdapter extends IgniteSpiAdapter implements MetricExporterSpi {
/** Default export period in milliseconds. */
public static final long DFLT_EXPORT_PERIOD = 60_000L;
/** Metric registry. */
protected ReadOnlyMetricManager mreg;
/** Metric filter. */
protected @Nullable ... |
super.onContextInitialized0(spiCtx);
execSvc = Executors.newSingleThreadScheduledExecutor(new IgniteThreadFactory(igniteInstanceName,
"push-metrics-exporter"));
fut = execSvc.scheduleWithFixedDelay(() -> {
try {
export();
}
catch... | 558 | 162 | 720 | <methods>public long clientFailureDetectionTimeout() ,public long failureDetectionTimeout() ,public void failureDetectionTimeoutEnabled(boolean) ,public boolean failureDetectionTimeoutEnabled() ,public org.apache.ignite.internal.util.IgniteExceptionRegistry getExceptionRegistry() ,public java.lang.String getName() ,pub... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/metric/SqlViewMetricExporterSpi.java | SqlViewMetricExporterSpi | onContextInitialized0 | class SqlViewMetricExporterSpi extends IgniteSpiAdapter implements MetricExporterSpi {
/** System view name. */
public static final String SYS_VIEW_NAME = "metrics";
/** Metric Registry. */
private ReadOnlyMetricManager mreg;
/** {@inheritDoc} */
@Override protected void onContextInitialized0(... |
GridKernalContext ctx = ((IgniteEx)ignite()).context();
ctx.systemView().registerInnerCollectionView(
SYS_VIEW_NAME,
"Ignite metrics",
new MetricsViewWalker(),
mreg,
r -> r,
(r, m) -> new MetricsView(m)
);
if (log... | 285 | 124 | 409 | <methods>public long clientFailureDetectionTimeout() ,public long failureDetectionTimeout() ,public void failureDetectionTimeoutEnabled(boolean) ,public boolean failureDetectionTimeoutEnabled() ,public org.apache.ignite.internal.util.IgniteExceptionRegistry getExceptionRegistry() ,public java.lang.String getName() ,pub... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/nodevalidation/OsDiscoveryNodeValidationProcessor.java | OsDiscoveryNodeValidationProcessor | validateNode | class OsDiscoveryNodeValidationProcessor extends GridProcessorAdapter implements DiscoveryNodeValidationProcessor {
/**
* @param ctx Kernal context.
*/
public OsDiscoveryNodeValidationProcessor(GridKernalContext ctx) {
super(ctx);
}
/** {@inheritDoc} */
@Nullable @Override public ... |
ClusterNode locNode = ctx.discovery().localNode();
// Check version.
String locBuildVer = locNode.attribute(ATTR_BUILD_VER);
String rmtBuildVer = node.attribute(ATTR_BUILD_VER);
if (!F.eq(rmtBuildVer, locBuildVer)) {
// OS nodes don't support rolling updates.
... | 106 | 331 | 437 | <methods>public void collectGridNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public void collectJoiningNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType discoveryDataType() ,public void onDisconnected(IgniteFuture<?>) thr... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientAsyncResponse.java | ClientAsyncResponse | error | class ClientAsyncResponse extends ClientResponse implements ClientListenerAsyncResponse {
/** Future for response. */
private final IgniteInternalFuture<? extends ClientListenerResponse> fut;
/**
* Constructs async response.
*/
public ClientAsyncResponse(long reqId, IgniteInternalFuture<? ext... |
assert fut.isDone();
try {
return fut.get().error();
}
catch (Exception e) {
return e.getMessage();
}
| 362 | 46 | 408 | <methods>public void <init>(long) ,public void <init>(long, java.lang.String) ,public void <init>(long, int, java.lang.String) ,public void encode(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext, org.apache.ignite.internal.binary.BinaryRawWriterEx, org.apache.ignite.internal.processors.pla... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBatchExecuteRequest.java | JdbcBatchExecuteRequest | readBinary | class JdbcBatchExecuteRequest extends JdbcRequest {
/** Schema name. */
private String schemaName;
/** Sql query. */
@GridToStringInclude(sensitive = true)
private List<JdbcQuery> queries;
/** Client auto commit flag state. */
private boolean autoCommit;
/**
* Last stream batch f... |
super.readBinary(reader, protoCtx);
schemaName = reader.readString();
int n = reader.readInt();
queries = new ArrayList<>(n);
for (int i = 0; i < n; ++i) {
JdbcQuery qry = new JdbcQuery();
qry.readBinary(reader, protoCtx);
queries.add(qr... | 1,002 | 161 | 1,163 | <methods>public void <init>(byte) ,public void readBinary(org.apache.ignite.internal.binary.BinaryReaderExImpl, org.apache.ignite.internal.processors.odbc.jdbc.JdbcProtocolContext) throws org.apache.ignite.binary.BinaryObjectException,public static org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequest readRequest... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcBinaryTypeGetResult.java | JdbcBinaryTypeGetResult | readBinary | class JdbcBinaryTypeGetResult extends JdbcResult {
/** ID of initial request. */
private long reqId;
/** Binary type metadata. */
private BinaryMetadata meta;
/** Default constructor for deserialization purpose. */
JdbcBinaryTypeGetResult() {
super(BINARY_TYPE_GET);
}
/**
... |
super.readBinary(reader, protoCtx);
reqId = reader.readLong();
meta = new BinaryMetadata();
try {
meta.readFrom(reader);
}
catch (IOException e) {
throw new BinaryObjectException(e);
}
| 463 | 75 | 538 | <methods>public void <init>(byte) ,public void readBinary(org.apache.ignite.internal.binary.BinaryReaderExImpl, org.apache.ignite.internal.processors.odbc.jdbc.JdbcProtocolContext) throws org.apache.ignite.binary.BinaryObjectException,public static org.apache.ignite.internal.processors.odbc.jdbc.JdbcResult readResult(o... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcColumnMeta.java | JdbcColumnMeta | hashCode | class JdbcColumnMeta implements JdbcRawBinarylizable {
/** Cache name. */
private String schemaName;
/** Table name. */
private String tblName;
/** Column name. */
private String colName;
/** Data type. */
private int dataType;
/** Data type. */
private String dataTypeName;
... |
int result = schemaName != null ? schemaName.hashCode() : 0;
result = 31 * result + (tblName != null ? tblName.hashCode() : 0);
result = 31 * result + colName.hashCode();
return result;
| 1,219 | 73 | 1,292 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcMetaColumnsRequest.java | JdbcMetaColumnsRequest | readBinary | class JdbcMetaColumnsRequest extends JdbcRequest {
/** Schema name pattern. */
private String schemaName;
/** Table name pattern. */
private String tblName;
/** Column name pattern. */
private String colName;
/**
* Default constructor is used for deserialization.
*/
JdbcMeta... |
super.readBinary(reader, protoCtx);
schemaName = reader.readString();
tblName = reader.readString();
colName = reader.readString();
| 504 | 48 | 552 | <methods>public void <init>(byte) ,public void readBinary(org.apache.ignite.internal.binary.BinaryReaderExImpl, org.apache.ignite.internal.processors.odbc.jdbc.JdbcProtocolContext) throws org.apache.ignite.binary.BinaryObjectException,public static org.apache.ignite.internal.processors.odbc.jdbc.JdbcRequest readRequest... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequest.java | JdbcRequest | readRequest | class JdbcRequest extends ClientListenerRequestNoId implements JdbcRawBinarylizable {
/** Execute sql query request. */
public static final byte QRY_EXEC = 2;
/** Fetch query results request. */
static final byte QRY_FETCH = 3;
/** Close query request. */
static final byte QRY_CLOSE = 4;
... |
int reqType = reader.readByte();
JdbcRequest req;
switch (reqType) {
case QRY_EXEC:
req = new JdbcQueryExecuteRequest();
break;
case QRY_FETCH:
req = new JdbcQueryFetchRequest();
break;
cas... | 1,161 | 627 | 1,788 | <methods>public non-sealed void <init>() ,public long requestId() <variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcRequestHandlerWorker.java | JdbcRequestHandlerWorker | body | class JdbcRequestHandlerWorker extends GridWorker {
/** Requests queue.*/
private final LinkedBlockingQueue<T2<JdbcRequest, GridFutureAdapter<ClientListenerResponse>>> queue =
new LinkedBlockingQueue<>();
/** Handler.*/
private final JdbcRequestHandler hnd;
/** Context.*/
private final... |
try {
while (!isCancelled()) {
T2<JdbcRequest, GridFutureAdapter<ClientListenerResponse>> req = queue.take();
GridFutureAdapter<ClientListenerResponse> fut = req.get2();
try {
JdbcResponse res = hnd.doHandle(req.get1());
... | 462 | 253 | 715 | <methods>public void blockingSectionBegin() ,public void blockingSectionEnd() ,public void cancel() ,public long heartbeatTs() ,public java.lang.String igniteInstanceName() ,public boolean isCancelled() ,public boolean isDone() ,public void join() throws java.lang.InterruptedException,public java.lang.String name() ,pu... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/jdbc/JdbcResult.java | JdbcResult | readResult | class JdbcResult implements JdbcRawBinarylizable {
/** Execute sql result. */
static final byte QRY_EXEC = 2;
/** Fetch query results. */
static final byte QRY_FETCH = 3;
/** Query result's columns metadata result. */
static final byte QRY_META = 5;
/** Batch queries. */
public static... |
int resId = reader.readByte();
JdbcResult res;
switch (resId) {
case QRY_EXEC:
res = new JdbcQueryExecuteResult();
break;
case QRY_FETCH:
res = new JdbcQueryFetchResult();
break;
case QRY_M... | 867 | 673 | 1,540 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/odbc/OdbcTableMeta.java | OdbcTableMeta | hashCode | class OdbcTableMeta {
/** Catalog name. */
private final String catalog;
/** Schema name. */
private final String schema;
/** Table name. */
private final String table;
/** Table type. */
private final String tableType;
/**
* @param catalog Catalog name.
* @param schema... |
int hash = Objects.hashCode(catalog);
hash = 31 * hash + Objects.hashCode(schema);
hash = 31 * hash + Objects.hashCode(table);
hash = 31 * hash + Objects.hashCode(tableType);
return hash;
| 430 | 76 | 506 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformAbstractBootstrap.java | PlatformAbstractBootstrap | start | class PlatformAbstractBootstrap implements PlatformBootstrap {
/** {@inheritDoc} */
@Override public PlatformProcessor start(IgniteConfiguration cfg, @Nullable GridSpringResourceContext springCtx,
long envPtr) {<FILL_FUNCTION_BODY>}
/** {@inheritDoc} */
@Override public void init(long dataPtr) ... |
IgniteConfiguration cfg0 = closure(envPtr).apply(cfg);
try {
IgniteEx node = (IgniteEx)IgnitionEx.start(cfg0, springCtx);
return node.context().platform();
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
}
| 245 | 90 | 335 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNoopProcessor.java | PlatformNoopProcessor | context | class PlatformNoopProcessor extends GridProcessorAdapter implements PlatformProcessor {
/** */
public PlatformNoopProcessor(GridKernalContext ctx) {
super(ctx);
}
/** {@inheritDoc} */
@Override public Ignite ignite() {
return null;
}
/** {@inheritDoc} */
@Override publi... |
throw new IgniteException("Platforms are not available [nodeId=" + ctx.grid().localNode().id() + "] " +
"(Use Apache.Ignite.Core.Ignition.Start() or Apache.Ignite.exe to start Ignite.NET nodes; " +
"ignite::Ignition::Start() or ignite.exe to start Ignite C++ nodes).");
| 331 | 95 | 426 | <methods>public void collectGridNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public void collectJoiningNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType discoveryDataType() ,public void onDisconnected(IgniteFuture<?>) thr... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/expiry/PlatformExpiryPolicy.java | PlatformExpiryPolicy | convert | class PlatformExpiryPolicy implements ExpiryPolicy {
/** Duration: unchanged. */
private static final long DUR_UNCHANGED = -2;
/** Duration: eternal. */
private static final long DUR_ETERNAL = -1;
/** Duration: zero. */
private static final long DUR_ZERO = 0;
/** Expiry for create. */
... |
if (dur == DUR_UNCHANGED)
return null;
else if (dur == DUR_ETERNAL)
return Duration.ETERNAL;
else if (dur == DUR_ZERO)
return Duration.ZERO;
else {
assert dur > 0;
return new Duration(TimeUnit.MILLISECONDS, dur);
}
... | 546 | 108 | 654 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/query/PlatformAbstractQueryCursor.java | PlatformAbstractQueryCursor | processInLongOutLong | class PlatformAbstractQueryCursor<T> extends PlatformAbstractTarget implements AutoCloseable {
/** Get multiple entries. */
private static final int OP_GET_ALL = 1;
/** Get all entries. */
private static final int OP_GET_BATCH = 2;
/** Get single entry. */
private static final int OP_GET_SINGL... |
switch (type) {
case OP_ITERATOR:
iter = cursor.iterator();
return TRUE;
case OP_ITERATOR_CLOSE:
cursor.close();
return TRUE;
case OP_ITERATOR_HAS_NEXT:
assert iter != null : "iterator() has ... | 1,172 | 124 | 1,296 | <methods>public java.lang.Exception convertException(java.lang.Exception) ,public org.apache.ignite.internal.processors.platform.PlatformContext platformContext() ,public long processInLongOutLong(int, long) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.processors.platform.PlatformTa... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientGetIdleTimeoutRequest.java | ClientGetIdleTimeoutRequest | getEffectiveIdleTimeout | class ClientGetIdleTimeoutRequest extends ClientRequest {
/**
* Constructor.
*
* @param reader Reader.
*/
ClientGetIdleTimeoutRequest(BinaryRawReader reader) {
super(reader);
}
/** {@inheritDoc} */
@Override public ClientResponse process(ClientConnectionContext ctx) {
... |
ClientConnectorConfiguration cfg = ctx.kernalContext().config().getClientConnectorConfiguration();
return cfg == null ? ClientConnectorConfiguration.DFLT_IDLE_TIMEOUT : cfg.getIdleTimeout();
| 174 | 57 | 231 | <methods>public void <init>(org.apache.ignite.binary.BinaryRawReader) ,public void <init>(long) ,public boolean isAsync(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext) ,public org.apache.ignite.internal.processors.platform.client.ClientResponse process(org.apache.ignite.internal.processor... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/ClientRequest.java | ClientRequest | processAsync | class ClientRequest implements ClientListenerRequest {
/** Request id. */
private final long reqId;
/**
* Constructor.
*
* @param reader Reader.
*/
public ClientRequest(BinaryRawReader reader) {
reqId = reader.readLong();
}
/**
* Constructor.
*
* @par... |
throw new IllegalStateException("Async operation is not implemented for request " + getClass().getName());
| 322 | 25 | 347 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/binary/ClientBinaryTypeGetResponse.java | ClientBinaryTypeGetResponse | encode | class ClientBinaryTypeGetResponse extends ClientResponse {
/** Meta. */
private final BinaryMetadata meta;
/**
* Constructor.
*
* @param requestId Request id.
*/
ClientBinaryTypeGetResponse(long requestId, BinaryMetadata meta) {
super(requestId);
this.meta = meta;
... |
super.encode(ctx, writer);
if (meta != null) {
writer.writeBoolean(true); // Not null.
PlatformUtils.writeBinaryMetadata(writer, meta, true);
}
else {
writer.writeBoolean(false); // Null.
}
| 134 | 77 | 211 | <methods>public void <init>(long) ,public void <init>(long, java.lang.String) ,public void <init>(long, int, java.lang.String) ,public void encode(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext, org.apache.ignite.internal.binary.BinaryRawWriterEx, org.apache.ignite.internal.processors.pla... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCacheGetAndPutRequest.java | ClientCacheGetAndPutRequest | process0 | class ClientCacheGetAndPutRequest extends ClientCacheKeyValueRequest {
/**
* Ctor.
*
* @param reader Reader.
*/
public ClientCacheGetAndPutRequest(BinaryRawReaderEx reader) {
super(reader);
}
/** {@inheritDoc} */
@Override public ClientResponse process0(ClientConnectionC... |
Object res = cache(ctx).getAndPut(key(), val());
return new ClientObjectResponse(requestId(), res);
| 170 | 34 | 204 | <methods>public java.lang.Object val() <variables>private final non-sealed java.lang.Object val |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCacheGetNamesResponse.java | ClientCacheGetNamesResponse | encode | class ClientCacheGetNamesResponse extends ClientResponse {
/** Cache names. */
private final Collection<String> cacheNames;
/**
* Constructor.
*
* @param reqId Request id.
* @param cacheNames Cache names.
*/
ClientCacheGetNamesResponse(long reqId, Collection<String> cacheNames)... |
super.encode(ctx, writer);
writer.writeInt(cacheNames.size());
for (String name : cacheNames) {
writer.writeString(name);
}
| 160 | 50 | 210 | <methods>public void <init>(long) ,public void <init>(long, java.lang.String) ,public void <init>(long, int, java.lang.String) ,public void encode(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext, org.apache.ignite.internal.binary.BinaryRawWriterEx, org.apache.ignite.internal.processors.pla... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCacheGetOrCreateWithConfigurationRequest.java | ClientCacheGetOrCreateWithConfigurationRequest | process | class ClientCacheGetOrCreateWithConfigurationRequest extends ClientRequest {
/** Cache configuration. */
private final CacheConfiguration cacheCfg;
/**
* Constructor.
*
* @param reader Reader.
* @param protocolCtx Client protocol context.
*/
public ClientCacheGetOrCreateWithCon... |
checkClientCacheConfiguration(cacheCfg);
try {
ctx.kernalContext().grid().getOrCreateCache(cacheCfg);
}
catch (CacheExistsException e) {
throw new IgniteClientException(ClientStatus.CACHE_EXISTS, e.getMessage());
}
return super.process(ctx);
... | 159 | 88 | 247 | <methods>public void <init>(org.apache.ignite.binary.BinaryRawReader) ,public void <init>(long) ,public boolean isAsync(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext) ,public org.apache.ignite.internal.processors.platform.client.ClientResponse process(org.apache.ignite.internal.processor... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCacheNodePartitionsRequest.java | ClientCacheNodePartitionsRequest | process | class ClientCacheNodePartitionsRequest extends ClientCacheRequest {
/**
* Initializes a new instance of ClientRawRequest class.
* @param reader Reader.
*/
public ClientCacheNodePartitionsRequest(BinaryRawReader reader) {
super(reader);
}
/** {@inheritDoc} */
@Override public ... |
IgniteCache cache = cache(ctx);
GridDiscoveryManager discovery = ctx.kernalContext().discovery();
Collection<ClusterNode> nodes = discovery.discoCache().cacheNodes(cache.getName());
Affinity aff = ctx.kernalContext().affinity().affinityProxy(cache.getName());
ArrayList<Client... | 104 | 217 | 321 | <methods>public static org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor cacheDescriptor(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext, int) <variables>private static final byte FLAG_WITH_EXPIRY_POLICY,private static final byte KEEP_BINARY_FLAG_MASK,private static final ... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCachePartitionAwarenessGroup.java | ClientCachePartitionAwarenessGroup | equals | class ClientCachePartitionAwarenessGroup {
/** Partition mapping. If {@code null} then cache must be excluded in partition awareness usage (e.g. REPLICATED cache). */
private final @Nullable ClientCachePartitionMapping mapping;
/** {@code true} if the RendezvousAffinityFunction is used with the default af... |
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ClientCachePartitionAwarenessGroup grp = (ClientCachePartitionAwarenessGroup)o;
return dfltAffinity == grp.dfltAffinity && Objects.equals(mapping, grp.mapping);
| 888 | 97 | 985 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCacheQueryContinuousHandle.java | ClientCacheQueryContinuousHandle | onUpdated | class ClientCacheQueryContinuousHandle implements CacheEntryUpdatedListener<Object, Object>, ClientCloseableResource {
/** */
private final ClientConnectionContext ctx;
/** */
private final AtomicBoolean closeGuard = new AtomicBoolean();
/** */
private volatile Long id;
/** */
private... |
// Client is not yet ready to receive notifications - skip them.
if (id == null)
return;
ClientCacheEntryEventNotification notification = new ClientCacheEntryEventNotification(
ClientMessageParser.OP_QUERY_CONTINUOUS_EVENT_NOTIFICATION, id, iterable);
ctx.n... | 360 | 86 | 446 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCacheQueryRequest.java | ClientCacheQueryRequest | updateAffinityMetrics | class ClientCacheQueryRequest extends ClientCacheDataRequest {
/** */
ClientCacheQueryRequest(BinaryRawReader reader) {
super(reader);
}
/** */
protected void updateAffinityMetrics(ClientConnectionContext ctx, int part) {<FILL_FUNCTION_BODY>}
} |
DynamicCacheDescriptor desc = cacheDescriptor(ctx);
CacheConfiguration<?, ?> cfg = desc.cacheConfiguration();
if (cfg.getCacheMode() == CacheMode.PARTITIONED && cfg.isStatisticsEnabled()) {
String cacheName = desc.cacheName();
try {
GridKernalContext kc... | 76 | 184 | 260 | <methods>public boolean isTransactional() ,public int txId() <variables>private final non-sealed int txId |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCacheScanQueryRequest.java | ClientCacheScanQueryRequest | createFilter | class ClientCacheScanQueryRequest extends ClientCacheQueryRequest implements ClientTxAwareRequest {
/** Local flag. */
private final boolean loc;
/** Page size. */
private final int pageSize;
/** Partition. */
private final Integer part;
/** Filter platform. */
private final byte filt... |
if (filterObj == null)
return null;
switch (filterPlatform) {
case ClientPlatform.JAVA:
return ((BinaryObject)filterObj).deserialize();
case ClientPlatform.DOTNET:
PlatformContext platformCtx = ctx.platform().context();
... | 579 | 207 | 786 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cluster/ClientClusterGroupGetNodesDetailsRequest.java | ClientClusterGroupGetNodesDetailsRequest | process | class ClientClusterGroupGetNodesDetailsRequest extends ClientRequest {
/** Node ids. */
private final UUID[] nodeIds;
/**
* Constructor.
*
* @param reader Reader.
*/
public ClientClusterGroupGetNodesDetailsRequest(BinaryRawReader reader) {
super(reader);
int cnt = re... |
IgniteClusterEx cluster = ctx.kernalContext().grid().cluster();
ClusterGroup clusterGrp = cluster.forNodeIds(Arrays.asList(nodeIds));
return new ClientClusterGroupGetNodesDetailsResponse(requestId(), clusterGrp.nodes());
| 182 | 67 | 249 | <methods>public void <init>(org.apache.ignite.binary.BinaryRawReader) ,public void <init>(long) ,public boolean isAsync(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext) ,public org.apache.ignite.internal.processors.platform.client.ClientResponse process(org.apache.ignite.internal.processor... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cluster/ClientClusterGroupProjection.java | ClientClusterGroupProjection | apply | class ClientClusterGroupProjection {
/** */
private static final short ATTRIBUTE = 1;
/** */
private static final short SERVER_NODES = 2;
/**
* Projection items.
*/
private final ProjectionItem[] prjItems;
/**
* Constructor.
*
* @param prjItems Projection items.
... |
if (prjItems != null) {
for (ProjectionItem item : prjItems)
clusterGrp = item.apply(clusterGrp);
}
return clusterGrp;
| 877 | 52 | 929 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/compute/ClientComputeTask.java | ClientComputeTask | close | class ClientComputeTask implements ClientCloseableResource {
/** No failover flag mask. */
private static final byte NO_FAILOVER_FLAG_MASK = 0x01;
/** No result cache flag mask. */
private static final byte NO_RESULT_CACHE_FLAG_MASK = 0x02;
/** Keep binary flag mask. */
public static final byt... |
if (closed.compareAndSet(false, true)) {
ctx.decrementActiveTasksCount();
try {
if (taskFut != null)
taskFut.cancel();
}
catch (IgniteCheckedException e) {
log.warning("Failed to cancel task", e);
}... | 1,056 | 85 | 1,141 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/datastructures/ClientIgniteSetKeyRequest.java | ClientIgniteSetKeyRequest | process | class ClientIgniteSetKeyRequest extends ClientIgniteSetRequest {
/** Key. */
private final Object key;
/**
* Constructor.
*
* @param reader Reader.
*/
ClientIgniteSetKeyRequest(BinaryRawReaderEx reader) {
super(reader);
// Clients can enable deserialized values on s... |
IgniteSet<Object> igniteSet = igniteSet(ctx);
if (igniteSet == null)
return notFoundResponse();
return process(igniteSet, key);
| 270 | 51 | 321 | <methods>public void <init>(org.apache.ignite.binary.BinaryRawReader) ,public org.apache.ignite.internal.processors.platform.client.ClientResponse process(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext) <variables>private final non-sealed int cacheId,private final non-sealed boolean collo... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/service/ClientServiceTopologyRequest.java | ClientServiceTopologyRequest | process | class ClientServiceTopologyRequest extends ClientRequest {
/** The service name. */
private final String name;
/**
* Creates the service topology request.
*
* @param reader Reader to read the {@link #name} from.
*/
public ClientServiceTopologyRequest(BinaryRawReader reader) {
... |
Map<UUID, Integer> srvcTop;
try {
srvcTop = ctx.kernalContext().service().serviceTopology(name, 0);
}
catch (IgniteCheckedException e) {
throw new IgniteClientException(ClientStatus.FAILED, "Failed to get topology for service '" + name + "'.", e);
}
... | 135 | 133 | 268 | <methods>public void <init>(org.apache.ignite.binary.BinaryRawReader) ,public void <init>(long) ,public boolean isAsync(org.apache.ignite.internal.processors.platform.client.ClientConnectionContext) ,public org.apache.ignite.internal.processors.platform.client.ClientResponse process(org.apache.ignite.internal.processor... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/streamer/ClientDataStreamerAddDataRequest.java | ClientDataStreamerAddDataRequest | process | class ClientDataStreamerAddDataRequest extends ClientDataStreamerRequest {
/** */
private final long streamerId;
/** */
private final byte flags;
/** */
private final Collection<DataStreamerEntry> entries;
/**
* Constructor.
*
* @param reader Data reader.
*/
public... |
ClientDataStreamerHandle handle = ctx.resources().get(streamerId);
DataStreamerImpl<KeyCacheObject, CacheObject> dataStreamer =
(DataStreamerImpl<KeyCacheObject, CacheObject>)handle.getStreamer();
try {
if (entries != null)
dataStreamer.addData(entri... | 189 | 188 | 377 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractFunc.java | PlatformAbstractFunc | invoke | class PlatformAbstractFunc implements PlatformSecurityAwareJob, Serializable {
/** */
private static final long serialVersionUID = 0L;
/** Serialized platform func. */
private final Object func;
/** Handle for local execution. */
@SuppressWarnings("TransientFieldNotInitialized")
private fi... |
assert ignite != null;
PlatformContext ctx = PlatformUtils.platformContext(ignite);
try (PlatformMemory mem = ctx.memory().allocate()) {
PlatformOutputStream out = mem.output();
if (ptr != 0) {
out.writeBoolean(true);
out.writeLong(ptr)... | 369 | 181 | 550 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformAbstractJob.java | PlatformAbstractJob | runLocal | class PlatformAbstractJob implements PlatformJob, Externalizable {
/** Marker object denoting the job execution result is stored in native platform. */
static final Object LOC_JOB_RES = new Object();
/** Ignite instance. */
@IgniteInstanceResource
protected transient Ignite ignite;
/** Parent ... |
// Local job, must execute it with respect to possible concurrent task completion.
if (task.onJobLock()) {
try {
ctx.gateway().computeJobExecuteLocal(ptr, cancel ? 1 : 0);
return LOC_JOB_RES;
}
finally {
task.onJobUnlo... | 833 | 117 | 950 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformBroadcastingSingleClosureTask.java | PlatformBroadcastingSingleClosureTask | map | class PlatformBroadcastingSingleClosureTask extends PlatformAbstractTask {
/** */
private static final long serialVersionUID = 0L;
/** */
private PlatformJob job;
/**
* Constructor.
*
* @param ctx Platform context.
* @param taskPtr Task pointer.
*/
public PlatformBroad... |
assert job != null : "Job null-check must be performed in native platform.";
if (!F.isEmpty(subgrid)) {
Map<ComputeJob, ClusterNode> map = new HashMap<>(subgrid.size(), 1);
boolean first = true;
for (ClusterNode node : subgrid) {
if (first) {
... | 213 | 169 | 382 | <methods>public void onDone(java.lang.Exception) ,public java.lang.Void reduce(List<org.apache.ignite.compute.ComputeJobResult>) ,public org.apache.ignite.compute.ComputeJobResultPolicy result(org.apache.ignite.compute.ComputeJobResult, List<org.apache.ignite.compute.ComputeJobResult>) <variables>protected final non-se... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/compute/PlatformFullJob.java | PlatformFullJob | cancel | class PlatformFullJob extends PlatformAbstractJob {
/** */
private static final long serialVersionUID = 0L;
/** Job is initialized. */
private static final byte STATE_INIT = 0;
/** Job is running. */
private static final byte STATE_RUNNING = 1;
/** Job execution completed. */
private ... |
PlatformProcessor proc = PlatformUtils.platformProcessor(ignite);
synchronized (this) {
if (state == STATE_INIT)
state = STATE_CANCELLED;
else if (state == STATE_RUNNING) {
assert ptr != 0;
try {
proc.context(... | 1,171 | 123 | 1,294 | <methods>public java.lang.Object execute() ,public java.lang.Object job() ,public java.lang.String name() ,public long pointer() <variables>static final java.lang.Object LOC_JOB_RES,protected transient org.apache.ignite.Ignite ignite,protected java.lang.Object job,protected java.lang.String jobName,protected transient ... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastreamer/PlatformStreamReceiverImpl.java | PlatformStreamReceiverImpl | receive | class PlatformStreamReceiverImpl extends PlatformAbstractPredicate implements PlatformStreamReceiver {
/** */
private static final long serialVersionUID = 0L;
/** */
private boolean keepBinary;
/**
* Constructor.
*/
public PlatformStreamReceiverImpl() {
super();
}
/*... |
assert ctx != null;
try (PlatformMemory mem = ctx.memory().allocate()) {
PlatformOutputStream out = mem.output();
out.writeLong(ptr);
out.writeBoolean(keepBinary);
BinaryRawWriterEx writer = ctx.writer(out);
writer.writeObject(pred);
... | 406 | 219 | 625 | <methods>public void <init>() ,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException<variables>protected transient org.apache.ignite.internal.processors.platform.PlatformContext ctx,protected ... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/datastructures/PlatformAtomicSequence.java | PlatformAtomicSequence | processInLongOutLong | class PlatformAtomicSequence extends PlatformAbstractTarget {
/** */
private final IgniteAtomicSequence atomicSeq;
/** */
private static final int OP_ADD_AND_GET = 1;
/** */
private static final int OP_CLOSE = 2;
/** */
private static final int OP_GET = 3;
/** */
private stat... |
switch (type) {
case OP_ADD_AND_GET:
return atomicSeq.addAndGet(val);
case OP_GET_AND_ADD:
return atomicSeq.getAndAdd(val);
case OP_SET_BATCH_SIZE:
atomicSeq.batchSize((int)val);
return TRUE;
cas... | 356 | 254 | 610 | <methods>public java.lang.Exception convertException(java.lang.Exception) ,public org.apache.ignite.internal.processors.platform.PlatformContext platformContext() ,public long processInLongOutLong(int, long) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.processors.platform.PlatformTa... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/dotnet/PlatformDotNetConsoleStream.java | PlatformDotNetConsoleStream | write | class PlatformDotNetConsoleStream extends OutputStream {
/** Indicates whether this is an error stream. */
private final boolean isErr;
/**
* Ctor.
*
* @param err Error stream flag.
*/
public PlatformDotNetConsoleStream(boolean err) {
isErr = err;
}
/** {@inheritDoc... |
String s = new String(b, off, len);
PlatformCallbackGateway.consoleWrite(s, isErr);
| 185 | 34 | 219 | <methods>public void <init>() ,public void close() throws java.io.IOException,public void flush() throws java.io.IOException,public static java.io.OutputStream nullOutputStream() ,public abstract void write(int) throws java.io.IOException,public void write(byte[]) throws java.io.IOException,public void write(byte[], in... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/entityframework/PlatformDotNetEntityFrameworkCacheEntry.java | PlatformDotNetEntityFrameworkCacheEntry | readBinary | class PlatformDotNetEntityFrameworkCacheEntry implements Binarylizable {
/** Dependent entity set names. */
private String[] entitySets;
/** Cached data bytes. */
private byte[] data;
/**
* Ctor.
*/
public PlatformDotNetEntityFrameworkCacheEntry() {
// No-op.
}
/**
... |
BinaryRawReader raw = reader.rawReader();
int cnt = raw.readInt();
if (cnt >= 0) {
entitySets = new String[cnt];
for (int i = 0; i < cnt; i++)
entitySets[i] = raw.readString();
}
else
entitySets = null;
data = raw.r... | 405 | 108 | 513 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/events/PlatformLocalEventListener.java | PlatformLocalEventListener | apply | class PlatformLocalEventListener implements IgnitePredicate<Event> {
/** */
private static final long serialVersionUID = 0L;
/** Listener id. */
private final int id;
/** Ignite. */
@SuppressWarnings("unused")
@IgniteInstanceResource
private transient Ignite ignite;
/**
*... |
assert ignite != null;
PlatformContext ctx = PlatformUtils.platformContext(ignite);
assert ctx != null;
try (PlatformMemory mem = ctx.memory().allocate()) {
PlatformOutputStream out = mem.output();
BinaryRawWriterEx writer = ctx.writer(out);
writ... | 252 | 144 | 396 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/memory/PlatformBigEndianInputStreamImpl.java | PlatformBigEndianInputStreamImpl | readIntArray | class PlatformBigEndianInputStreamImpl extends PlatformInputStreamImpl {
/**
* Constructor.
*
* @param mem Memory chunk.
*/
public PlatformBigEndianInputStreamImpl(PlatformMemory mem) {
super(mem);
}
/** {@inheritDoc} */
@Override public short readShort() {
retur... |
int[] res = super.readIntArray(cnt);
for (int i = 0; i < cnt; i++)
res[i] = Integer.reverseBytes(res[i]);
return res;
| 935 | 59 | 994 | <methods>public void <init>(org.apache.ignite.internal.processors.platform.memory.PlatformMemory) ,public byte[] array() ,public byte[] arrayCopy() ,public int capacity() ,public boolean hasArray() ,public long offheapPointer() ,public int position() ,public void position(int) ,public long rawOffheapPointer() ,public i... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/memory/PlatformUnpooledMemory.java | PlatformUnpooledMemory | reallocate | class PlatformUnpooledMemory extends PlatformAbstractMemory {
/**
* Constructor.
*
* @param memPtr Cross-platform memory pointer.
*/
public PlatformUnpooledMemory(long memPtr) {
super(memPtr);
}
/** {@inheritDoc} */
@Override public void reallocate(int cap) {<FILL_FUNCTI... |
// Try doubling capacity to avoid excessive allocations.
int doubledCap = PlatformMemoryUtils.capacity(memPtr) << 1;
if (doubledCap > cap)
cap = doubledCap;
reallocateUnpooled(memPtr, cap);
| 132 | 71 | 203 | <methods>public int capacity() ,public long data() ,public org.apache.ignite.internal.processors.platform.memory.PlatformInputStream input() ,public int length() ,public org.apache.ignite.internal.processors.platform.memory.PlatformOutputStream output() ,public long pointer() <variables>private static final org.apache.... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/query/DistributedSqlConfiguration.java | DistributedSqlConfiguration | onReadyToWrite | class DistributedSqlConfiguration {
/** */
private static final String QUERY_TIMEOUT_PROPERTY_NAME = "sql.defaultQueryTimeout";
/** Property update message. */
protected static final String PROPERTY_UPDATE_MESSAGE =
"SQL parameter '%s' was changed from '%s' to '%s'";
/** Default value of t... |
if (ReadableDistributedMetaStorage.isSupported(ctx)) {
setDefaultValue(
dfltQryTimeout,
(int)ctx.config().getSqlConfiguration().getDefaultQueryTimeout(),
log);
}
... | 680 | 133 | 813 | <no_super_class> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.