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/managers/communication/FileReceiver.java | FileReceiver | readChunk | class FileReceiver extends TransmissionReceiver {
/** Handler to notify when a file has been received. */
private final Consumer<File> hnd;
/** File to receive data into. */
private File file;
/** The corresponding file channel to work with. */
@GridToStringExclude
private FileIO fileIo;
... |
assert fileIo != null;
long batchSize = Math.min(chunkSize, meta.count() - transferred);
long read = fileIo.transferFrom(ch, meta.offset() + transferred, batchSize);
if (read == 0)
throw new IOException("Channel is reached the end of stream. Probably, channel is closed on... | 657 | 109 | 766 | <methods>public void receive(java.nio.channels.ReadableByteChannel) throws java.io.IOException, java.lang.InterruptedException<variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/FileSender.java | FileSender | updateSenderState | class FileSender extends AbstractTransmission {
/** Corresponding file channel to work with a given file. */
@GridToStringExclude
private FileIO fileIo;
/**
* @param file File which is going to be sent by chunks.
* @param off File offset.
* @param cnt Number of bytes to transfer.
* ... |
// The remote node doesn't have a file meta info.
if (rcvMeta == null || rcvMeta.offset() < 0) {
transferred = 0;
return;
}
long uploadedBytes = rcvMeta.offset() - meta.offset();
assertParameter(meta.name().equals(rcvMeta.name()), "Attempt to transfer ... | 885 | 232 | 1,117 | <methods>public org.apache.ignite.internal.managers.communication.TransmissionMeta state() ,public java.lang.String toString() ,public long transferred() <variables>protected final non-sealed int chunkSize,protected final non-sealed org.apache.ignite.IgniteLogger log,protected org.apache.ignite.internal.managers.commun... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/IgniteMessageFactoryImpl.java | IgniteMessageFactoryImpl | register | class IgniteMessageFactoryImpl implements IgniteMessageFactory {
/** Offset. */
private static final int OFF = -Short.MIN_VALUE;
/** Array size. */
private static final int ARR_SIZE = 1 << Short.SIZE;
/** Message suppliers. */
private final Supplier<Message>[] msgSuppliers = (Supplier<Message>... |
if (initialized) {
throw new IllegalStateException("Message factory is already initialized. " +
"Registration of new message types is forbidden.");
}
int idx = directTypeToIndex(directType);
Supplier<Message> curr = msgSuppliers[idx];
if (curr ... | 967 | 167 | 1,134 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java | GridDeploymentInfoBean | equals | class GridDeploymentInfoBean implements Message, GridDeploymentInfo, Externalizable {
/** */
private static final long serialVersionUID = 0L;
/** */
private IgniteUuid clsLdrId;
/** */
private DeploymentMode depMode;
/** */
private String userVer;
/** */
@Deprecated // Left f... |
return o == this || o instanceof GridDeploymentInfoBean &&
clsLdrId.equals(((GridDeploymentInfoBean)o).clsLdrId);
| 1,713 | 42 | 1,755 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentStoreAdapter.java | GridDeploymentStoreAdapter | clearSerializationCaches | class GridDeploymentStoreAdapter implements GridDeploymentStore {
/** Logger. */
protected final IgniteLogger log;
/** Deployment SPI. */
protected final DeploymentSpi spi;
/** Kernal context. */
protected final GridKernalContext ctx;
/** Deployment communication. */
protected final G... |
try {
clearSerializationCache(Class.forName("java.io.ObjectInputStream$Caches"), "subclassAudits");
clearSerializationCache(Class.forName("java.io.ObjectOutputStream$Caches"), "subclassAudits");
clearSerializationCache(Class.forName("java.io.ObjectStreamClass$Caches"), "loca... | 915 | 245 | 1,160 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageResultsCollector.java | NodeMessage | onNodeFailed | class NodeMessage<M> {
/** */
boolean nodeFailed;
/** */
M msg;
/**
* @param msg Message.
*/
NodeMessage(M msg) {
this.msg = msg;
}
/**
* @return Message or {@code null} if node failed.
*/
@Nullabl... |
if (nodeFailed || msg != null)
return false;
nodeFailed = true;
return true;
| 273 | 34 | 307 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/indexing/GridIndexingManager.java | GridIndexingManager | query | class GridIndexingManager extends GridManagerAdapter<IndexingSpi> {
/** */
private final GridSpinBusyLock busyLock = new GridSpinBusyLock();
/**
* @param ctx Kernal context.
*/
public GridIndexingManager(GridKernalContext ctx) {
super(ctx, ctx.config().getIndexingSpi());
}
/... |
if (!enabled())
throw new IgniteCheckedException("Indexing SPI is not configured.");
if (!busyLock.enterBusy())
throw new IllegalStateException("Failed to execute query (grid is stopping).");
try {
final Iterator<?> res = getSpi().query(cacheName, params, f... | 792 | 281 | 1,073 | <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 boolean enabled() ,public void onAfterSp... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/loadbalancer/GridLoadBalancerManager.java | GridLoadBalancerManager | getLoadBalancer | class GridLoadBalancerManager extends GridManagerAdapter<LoadBalancingSpi> {
/**
* @param ctx Grid kernal context.
*/
public GridLoadBalancerManager(GridKernalContext ctx) {
super(ctx, ctx.config().getLoadBalancingSpi());
}
/** {@inheritDoc} */
@Override public void start() throws... |
assert ses != null;
// Return value is not intended for sending over network.
return new GridLoadBalancerAdapter() {
@Nullable @Override public ClusterNode getBalancedNode(ComputeJob job, @Nullable Collection<ClusterNode> exclNodes) {
A.notNull(job, "job");
... | 498 | 193 | 691 | <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 boolean enabled() ,public void onAfterSp... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/FiltrableSystemViewAdapter.java | FiltrableSystemViewAdapter | iterator | class FiltrableSystemViewAdapter<R, D> extends AbstractSystemView<R> implements FiltrableSystemView<R> {
/** Data supplier for the view. */
private Function<Map<String, Object>, Iterable<D>> dataSupplier;
/** Row function. */
private final Function<D, R> rowFunc;
/**
* @param name Name.
... |
if (filter == null)
filter = Collections.emptyMap();
return F.iterator(dataSupplier.apply(filter), rowFunc::apply, true);
| 374 | 44 | 418 | <methods>public java.lang.String description() ,public java.lang.String name() ,public SystemViewRowAttributeWalker<R> walker() <variables>private final non-sealed java.lang.String desc,private final non-sealed java.lang.String name,private final non-sealed SystemViewRowAttributeWalker<R> walker |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/SqlViewExporterSpi.java | SqlViewExporterSpi | register | class SqlViewExporterSpi extends AbstractSystemViewExporterSpi {
/** */
private GridKernalContext ctx;
/** {@inheritDoc} */
@Override protected void onContextInitialized0(IgniteSpiContext spiCtx) throws IgniteSpiException {
ctx = ((IgniteEx)ignite()).context();
sysViewReg.forEach(this::... |
if (log.isDebugEnabled())
log.debug("Found new system view [name=" + sysView.name() + ']');
ctx.query().schemaManager().createSystemView(SCHEMA_SYS, sysView);
| 175 | 61 | 236 | <methods>public non-sealed void <init>() ,public void setExportFilter(Predicate<SystemView<?>>) ,public void setSystemViewRegistry(org.apache.ignite.spi.systemview.ReadOnlySystemViewRegistry) ,public void spiStart(java.lang.String) throws org.apache.ignite.spi.IgniteSpiException,public void spiStop() throws org.apache.... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/BinaryMetadataViewWalker.java | BinaryMetadataViewWalker | visitAll | class BinaryMetadataViewWalker implements SystemViewRowAttributeWalker<BinaryMetadataView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {<FILL_FUNCTION_BODY>}
/** {@inheritDoc} */
@Override public void visitAll(BinaryMetadataView row, AttributeWithValueVisitor v) {
... |
v.accept(0, "typeId", int.class);
v.accept(1, "typeName", String.class);
v.accept(2, "affKeyFieldName", String.class);
v.accept(3, "fieldsCount", int.class);
v.accept(4, "fields", String.class);
v.accept(5, "schemasIds", String.class);
v.accept(6, "isEnum", boole... | 260 | 116 | 376 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/ClientConnectionViewWalker.java | ClientConnectionViewWalker | visitAll | class ClientConnectionViewWalker implements SystemViewRowAttributeWalker<ClientConnectionView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "connectionId", long.class);
v.accept(1, "localAddress", InetSocketAddress.class);
v.accept(2, "remoteAdd... |
v.acceptLong(0, "connectionId", row.connectionId());
v.accept(1, "localAddress", InetSocketAddress.class, row.localAddress());
v.accept(2, "remoteAddress", InetSocketAddress.class, row.remoteAddress());
v.accept(3, "type", String.class, row.type());
v.accept(4, "user", String.cl... | 218 | 126 | 344 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/ComputeJobViewWalker.java | ComputeJobViewWalker | visitAll | class ComputeJobViewWalker implements SystemViewRowAttributeWalker<ComputeJobView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "id", IgniteUuid.class);
v.accept(1, "sessionId", IgniteUuid.class);
v.accept(2, "originNodeId", UUID.class);
... |
v.accept(0, "id", IgniteUuid.class, row.id());
v.accept(1, "sessionId", IgniteUuid.class, row.sessionId());
v.accept(2, "originNodeId", UUID.class, row.originNodeId());
v.accept(3, "taskName", String.class, row.taskName());
v.accept(4, "taskClassName", String.class, row.taskClas... | 404 | 350 | 754 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/PagesListViewWalker.java | PagesListViewWalker | visitAll | class PagesListViewWalker implements SystemViewRowAttributeWalker<PagesListView> {
/** Filter key for attribute "bucketNumber" */
public static final String BUCKET_NUMBER_FILTER = "bucketNumber";
/** List of filtrable attributes. */
private static final List<String> FILTRABLE_ATTRS = Collections.unmodi... |
v.accept(0, "name", String.class);
v.accept(1, "bucketNumber", int.class);
v.accept(2, "bucketSize", long.class);
v.accept(3, "stripesCount", int.class);
v.accept(4, "cachedPagesCount", int.class);
v.accept(5, "pageFreeSpace", int.class);
| 365 | 104 | 469 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/PartitionStateViewWalker.java | PartitionStateViewWalker | visitAll | class PartitionStateViewWalker implements SystemViewRowAttributeWalker<PartitionStateView> {
/** Filter key for attribute "cacheGroupId" */
public static final String CACHE_GROUP_ID_FILTER = "cacheGroupId";
/** Filter key for attribute "nodeId" */
public static final String NODE_ID_FILTER = "nodeId";
... |
v.acceptInt(0, "cacheGroupId", row.cacheGroupId());
v.accept(1, "nodeId", UUID.class, row.nodeId());
v.acceptInt(2, "partitionId", row.partitionId());
v.accept(3, "state", String.class, row.state());
v.acceptBoolean(4, "isPrimary", row.isPrimary());
| 398 | 99 | 497 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/ReentrantLockViewWalker.java | ReentrantLockViewWalker | visitAll | class ReentrantLockViewWalker implements SystemViewRowAttributeWalker<ReentrantLockView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {<FILL_FUNCTION_BODY>}
/** {@inheritDoc} */
@Override public void visitAll(ReentrantLockView row, AttributeWithValueVisitor v) {
v.a... |
v.accept(0, "name", String.class);
v.accept(1, "locked", boolean.class);
v.accept(2, "hasQueuedThreads", boolean.class);
v.accept(3, "failoverSafe", boolean.class);
v.accept(4, "fair", boolean.class);
v.accept(5, "broken", boolean.class);
v.accept(6, "groupName",... | 293 | 147 | 440 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/ScanQueryViewWalker.java | ScanQueryViewWalker | visitAll | class ScanQueryViewWalker implements SystemViewRowAttributeWalker<ScanQueryView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {<FILL_FUNCTION_BODY>}
/** {@inheritDoc} */
@Override public void visitAll(ScanQueryView row, AttributeWithValueVisitor v) {
v.accept(0, "or... |
v.accept(0, "originNodeId", UUID.class);
v.accept(1, "queryId", long.class);
v.accept(2, "cacheName", String.class);
v.accept(3, "cacheId", int.class);
v.accept(4, "cacheGroupId", int.class);
v.accept(5, "cacheGroupName", String.class);
v.accept(6, "startTime", l... | 472 | 297 | 769 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SemaphoreViewWalker.java | SemaphoreViewWalker | visitAll | class SemaphoreViewWalker implements SystemViewRowAttributeWalker<SemaphoreView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "name", String.class);
v.accept(1, "availablePermits", long.class);
v.accept(2, "hasQueuedThreads", boolean.class);
... |
v.accept(0, "name", String.class, row.name());
v.acceptLong(1, "availablePermits", row.availablePermits());
v.acceptBoolean(2, "hasQueuedThreads", row.hasQueuedThreads());
v.acceptInt(3, "queueLength", row.queueLength());
v.acceptBoolean(4, "failoverSafe", row.failoverSafe());
... | 268 | 175 | 443 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SetViewWalker.java | SetViewWalker | visitAll | class SetViewWalker implements SystemViewRowAttributeWalker<SetView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "id", IgniteUuid.class);
v.accept(1, "name", String.class);
v.accept(2, "size", int.class);
v.accept(3, "groupName", String... |
v.accept(0, "id", IgniteUuid.class, row.id());
v.accept(1, "name", String.class, row.name());
v.acceptInt(2, "size", row.size());
v.accept(3, "groupName", String.class, row.groupName());
v.acceptInt(4, "groupId", row.groupId());
v.acceptBoolean(5, "collocated", row.collo... | 228 | 135 | 363 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryHistoryViewWalker.java | SqlQueryHistoryViewWalker | visitAll | class SqlQueryHistoryViewWalker implements SystemViewRowAttributeWalker<SqlQueryHistoryView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "schemaName", String.class);
v.accept(1, "sql", String.class);
v.accept(2, "local", boolean.class);
... |
v.accept(0, "schemaName", String.class, row.schemaName());
v.accept(1, "sql", String.class, row.sql());
v.acceptBoolean(2, "local", row.local());
v.acceptLong(3, "executions", row.executions());
v.acceptLong(4, "failures", row.failures());
v.acceptLong(5, "durationMin", ... | 249 | 154 | 403 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlQueryViewWalker.java | SqlQueryViewWalker | visitAll | class SqlQueryViewWalker implements SystemViewRowAttributeWalker<SqlQueryView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "queryId", String.class);
v.accept(1, "sql", String.class);
v.accept(2, "originNodeId", UUID.class);
v.accept(3, ... |
v.accept(0, "queryId", String.class, row.queryId());
v.accept(1, "sql", String.class, row.sql());
v.accept(2, "originNodeId", UUID.class, row.originNodeId());
v.accept(3, "startTime", Date.class, row.startTime());
v.acceptLong(4, "duration", row.duration());
v.accept(5, ... | 263 | 186 | 449 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlViewColumnViewWalker.java | SqlViewColumnViewWalker | visitAll | class SqlViewColumnViewWalker implements SystemViewRowAttributeWalker<SqlViewColumnView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "columnName", String.class);
v.accept(1, "viewName", String.class);
v.accept(2, "schemaName", String.class);
... |
v.accept(0, "columnName", String.class, row.columnName());
v.accept(1, "viewName", String.class, row.viewName());
v.accept(2, "schemaName", String.class, row.schemaName());
v.accept(3, "defaultValue", String.class, row.defaultValue());
v.acceptBoolean(4, "nullable", row.nullable... | 248 | 158 | 406 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/SqlViewViewWalker.java | SqlViewViewWalker | visitAll | class SqlViewViewWalker implements SystemViewRowAttributeWalker<SqlViewView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {<FILL_FUNCTION_BODY>}
/** {@inheritDoc} */
@Override public void visitAll(SqlViewView row, AttributeWithValueVisitor v) {
v.accept(0, "name", S... |
v.accept(0, "name", String.class);
v.accept(1, "schema", String.class);
v.accept(2, "description", String.class);
| 176 | 48 | 224 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/StatisticsColumnGlobalDataViewWalker.java | StatisticsColumnGlobalDataViewWalker | visitAll | class StatisticsColumnGlobalDataViewWalker implements SystemViewRowAttributeWalker<StatisticsColumnGlobalDataView> {
/** Filter key for attribute "schema" */
public static final String SCHEMA_FILTER = "schema";
/** Filter key for attribute "type" */
public static final String TYPE_FILTER = "type";
... |
v.accept(0, "schema", String.class, row.schema());
v.accept(1, "type", String.class, row.type());
v.accept(2, "name", String.class, row.name());
v.accept(3, "column", String.class, row.column());
v.acceptLong(4, "rowsCount", row.rowsCount());
v.acceptLong(5, "distinct", ... | 509 | 206 | 715 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/managers/systemview/walker/TransactionViewWalker.java | TransactionViewWalker | visitAll | class TransactionViewWalker implements SystemViewRowAttributeWalker<TransactionView> {
/** {@inheritDoc} */
@Override public void visitAll(AttributeVisitor v) {
v.accept(0, "originatingNodeId", UUID.class);
v.accept(1, "state", TransactionState.class);
v.accept(2, "xid", IgniteUuid.class... |
v.accept(0, "originatingNodeId", UUID.class, row.originatingNodeId());
v.accept(1, "state", TransactionState.class, row.state());
v.accept(2, "xid", IgniteUuid.class, row.xid());
v.accept(3, "label", String.class, row.label());
v.acceptLong(4, "startTime", row.startTime());
... | 544 | 512 | 1,056 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectSharedStreamRegistry.java | OptimizedObjectSharedStreamRegistry | closeIn | class OptimizedObjectSharedStreamRegistry extends OptimizedObjectStreamRegistry {
/** */
private static final ThreadLocal<StreamHolder> holders = new ThreadLocal<>();
/** {@inheritDoc} */
@Override OptimizedObjectOutputStream out() {
return holder().acquireOut();
}
/** {@inheritDoc} */... |
U.close(in, null);
StreamHolder holder = holders.get();
if (holder != null)
holder.releaseIn();
| 681 | 42 | 723 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/marshaller/optimized/OptimizedObjectStreamRegistry.java | OptimizedObjectStreamRegistry | createIn | class OptimizedObjectStreamRegistry {
/**
* Gets output stream.
*
* @return Object output stream.
* @throws org.apache.ignite.internal.IgniteInterruptedCheckedException If thread is interrupted while trying to take holder from pool.
*/
abstract OptimizedObjectOutputStream out() throws I... |
try {
return new OptimizedObjectInputStream(new GridUnsafeDataInput());
}
catch (IOException e) {
throw new IgniteException("Failed to create object input stream.", e);
}
| 401 | 54 | 455 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageUtils.java | PageUtils | getBytes | class PageUtils {
/**
* @param addr Start address.
* @param off Offset.
* @return Byte value from given address.
*/
public static byte getByte(long addr, int off) {
assert addr > 0 : addr;
assert off >= 0;
return GridUnsafe.getByte(addr + off);
}
/**
*... |
assert srcAddr > 0;
assert srcOff > 0;
assert dst != null;
assert dstOff >= 0;
assert len >= 0;
GridUnsafe.copyMemory(null, srcAddr + srcOff, dst, GridUnsafe.BYTE_ARR_OFF + dstOff, len);
| 1,555 | 82 | 1,637 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/DataEntry.java | DataEntry | flags | class DataEntry {
/** Empty flags. */
public static final byte EMPTY_FLAGS = 0;
/** */
public static final byte PRIMARY_FLAG = 0b00000001;
/** */
public static final byte PRELOAD_FLAG = 0b00000010;
/** */
public static final byte FROM_STORE_FLAG = 0b00000100;
/** Cache ID. */
... |
byte val = EMPTY_FLAGS;
val |= primary ? PRIMARY_FLAG : EMPTY_FLAGS;
val |= preload ? PRELOAD_FLAG : EMPTY_FLAGS;
val |= fromStore ? FROM_STORE_FLAG : EMPTY_FLAGS;
return val;
| 1,469 | 81 | 1,550 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/IncrementalSnapshotFinishRecord.java | IncrementalSnapshotFinishRecord | dataSize | class IncrementalSnapshotFinishRecord extends WALRecord {
/** Incremental snapshot ID. */
@GridToStringInclude
private final UUID id;
/**
* Set of transactions committed between {@link IncrementalSnapshotStartRecord} and {@link IncrementalSnapshotFinishRecord}
* to include into the incrementa... |
int size = 16 + 4 + 4; // ID, included and excluded tx count.
for (GridCacheVersion v: included)
size += CacheVersionIO.size(v, false);
for (GridCacheVersion v: excluded)
size += CacheVersionIO.size(v, false);
return size;
| 429 | 83 | 512 | <methods>public non-sealed void <init>() ,public void chainSize(int) ,public int chainSize() ,public org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer position() ,public void position(org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer) ,public org.apache.ignite.internal.pagemem.... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/IndexRenameRootPageRecord.java | IndexRenameRootPageRecord | writeRecord | class IndexRenameRootPageRecord extends WALRecord {
/** Cache id. */
private final int cacheId;
/** Old name of underlying index tree name. */
private final String oldTreeName;
/** New name of underlying index tree name. */
private final String newTreeName;
/** Number of segments. */
... |
buf.putInt(cacheId);
buf.putInt(segments);
byte[] oldTreeNameBytes = oldTreeName.getBytes(UTF_8);
buf.putInt(oldTreeNameBytes.length);
buf.put(oldTreeNameBytes);
byte[] newTreeNameBytes = newTreeName.getBytes(UTF_8);
buf.putInt(newTreeNameBytes.length);
... | 905 | 115 | 1,020 | <methods>public non-sealed void <init>() ,public void chainSize(int) ,public int chainSize() ,public org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer position() ,public void position(org.apache.ignite.internal.processors.cache.persistence.wal.WALPointer) ,public org.apache.ignite.internal.pagemem.... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/LazyDataEntry.java | LazyDataEntry | key | class LazyDataEntry extends DataEntry implements MarshalledDataEntry {
/** */
private GridCacheSharedContext cctx;
/** Data Entry key type code. See {@link CacheObject} for built-in value type codes */
private byte keyType;
/** Key value bytes. */
private byte[] keyBytes;
/** Data Entry V... |
try {
if (key == null) {
GridCacheContext cacheCtx = cctx.cacheContext(cacheId);
if (cacheCtx == null)
throw new IgniteException("Failed to find cache context for the given cache ID: " + cacheId);
IgniteCacheObjectProcessor co = ... | 767 | 175 | 942 | <methods>public void <init>(int, org.apache.ignite.internal.processors.cache.KeyCacheObject, org.apache.ignite.internal.processors.cache.CacheObject, org.apache.ignite.internal.processors.cache.GridCacheOperation, org.apache.ignite.internal.processors.cache.version.GridCacheVersion, org.apache.ignite.internal.processor... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/UnwrapDataEntry.java | UnwrapDataEntry | unwrappedValue | class UnwrapDataEntry extends DataEntry implements UnwrappedDataEntry {
/** Cache object value context. Context is used for unwrapping objects. */
private final CacheObjectValueContext cacheObjValCtx;
/** Keep binary. This flag disables converting of non-primitive types (BinaryObjects). */
private fina... |
try {
return unwrapValue(val, keepBinary, cacheObjValCtx);
}
catch (Exception e) {
cacheObjValCtx.kernalContext().log(UnwrapDataEntry.class)
.error("Unable to convert value [" + value() + "]", e);
return null;
}
| 888 | 86 | 974 | <methods>public void <init>(int, org.apache.ignite.internal.processors.cache.KeyCacheObject, org.apache.ignite.internal.processors.cache.CacheObject, org.apache.ignite.internal.processors.cache.GridCacheOperation, org.apache.ignite.internal.processors.cache.version.GridCacheVersion, org.apache.ignite.internal.processor... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/InnerReplaceRecord.java | InnerReplaceRecord | applyDelta | class InnerReplaceRecord<L> extends PageDeltaRecord {
/** */
private int dstIdx;
/** */
private long srcPageId;
/** */
private int srcIdx;
/** */
private long rmvId;
/**
* @param grpId Cache group ID.
* @param pageId Page ID.
* @param dstIdx Destination index.
... |
throw new IgniteCheckedException("Inner replace record should not be logged.");
| 547 | 21 | 568 | <methods>public abstract void applyDelta(org.apache.ignite.internal.pagemem.PageMemory, long) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.pagemem.FullPageId fullPageId() ,public int groupId() ,public long pageId() ,public java.lang.String toString() <variables>private int grpId,pri... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MergeRecord.java | MergeRecord | toString | class MergeRecord<L> extends PageDeltaRecord {
/** */
@GridToStringExclude
private long prntId;
/** */
@GridToStringExclude
private long rightId;
/** */
private int prntIdx;
/** */
private boolean emptyBranch;
/**
* @param grpId Cache group ID.
* @param pageId ... |
return S.toString(MergeRecord.class, this, "prntId", U.hexLong(prntId), "rightId", U.hexLong(rightId),
"super", super.toString());
| 520 | 53 | 573 | <methods>public abstract void applyDelta(org.apache.ignite.internal.pagemem.PageMemory, long) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.pagemem.FullPageId fullPageId() ,public int groupId() ,public long pageId() ,public java.lang.String toString() <variables>private int grpId,pri... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageInitRootInlineRecord.java | MetaPageInitRootInlineRecord | applyDelta | class MetaPageInitRootInlineRecord extends MetaPageInitRootRecord {
/** */
private final int inlineSize;
/**
* @param grpId Cache group ID.
* @param pageId Meta page ID.
* @param rootId
* @param inlineSize Inline size.
*/
public MetaPageInitRootInlineRecord(int grpId, long page... |
BPlusMetaIO io = BPlusMetaIO.VERSIONS.forPage(pageAddr);
io.initRoot(pageAddr, rootId, pageMem.realPageSize(groupId()));
io.setInlineSize(pageAddr, inlineSize);
| 309 | 63 | 372 | <methods>public void <init>(int, long, long) ,public void applyDelta(org.apache.ignite.internal.pagemem.PageMemory, long) throws org.apache.ignite.IgniteCheckedException,public long rootId() ,public java.lang.String toString() ,public org.apache.ignite.internal.pagemem.wal.record.WALRecord.RecordType type() <variables>... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateLastAllocatedIndex.java | MetaPageUpdateLastAllocatedIndex | applyDelta | class MetaPageUpdateLastAllocatedIndex extends PageDeltaRecord {
/** */
private final int lastAllocatedIdx;
/**
* @param pageId Meta page ID.
*/
public MetaPageUpdateLastAllocatedIndex(int grpId, long pageId, int lastAllocatedIdx) {
super(grpId, pageId);
this.lastAllocatedIdx... |
int type = PageIO.getType(pageAddr);
assert type == PageIO.T_META || type == PageIO.T_PART_META;
PageMetaIO io = PageIO.getPageIO(type, PageIO.getVersion(pageAddr));
io.setLastAllocatedPageCount(pageAddr, lastAllocatedIdx);
| 287 | 90 | 377 | <methods>public abstract void applyDelta(org.apache.ignite.internal.pagemem.PageMemory, long) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.pagemem.FullPageId fullPageId() ,public int groupId() ,public long pageId() ,public java.lang.String toString() <variables>private int grpId,pri... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdatePartitionDataRecord.java | MetaPageUpdatePartitionDataRecord | applyDelta | class MetaPageUpdatePartitionDataRecord extends PageDeltaRecord {
/** */
private long updateCntr;
/** */
private long globalRmvId;
/** TODO: Partition size may be long */
private int partSize;
/** */
private byte state;
/** */
private int allocatedIdxCandidate;
/** */
... |
PagePartitionMetaIO io = PagePartitionMetaIO.VERSIONS.forPage(pageAddr);
io.setUpdateCounter(pageAddr, updateCntr);
io.setGlobalRemoveId(pageAddr, globalRmvId);
io.setSize(pageAddr, partSize);
io.setCountersPageId(pageAddr, cntrsPageId);
io.setPartitionState(pageAddr, s... | 915 | 123 | 1,038 | <methods>public abstract void applyDelta(org.apache.ignite.internal.pagemem.PageMemory, long) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.pagemem.FullPageId fullPageId() ,public int groupId() ,public long pageId() ,public java.lang.String toString() <variables>private int grpId,pri... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdatePartitionDataRecordV3.java | MetaPageUpdatePartitionDataRecordV3 | applyDelta | class MetaPageUpdatePartitionDataRecordV3 extends MetaPageUpdatePartitionDataRecordV2 {
/** Index of the last reencrypted page. */
private int encryptedPageIdx;
/** Total pages to be reencrypted. */
private int encryptedPageCnt;
/**
* @param grpId Group id.
* @param pageId Page id.
... |
super.applyDelta(pageMem, pageAddr);
PagePartitionMetaIOV3 io = (PagePartitionMetaIOV3)PagePartitionMetaIO.VERSIONS.forPage(pageAddr);
io.setEncryptedPageIndex(pageAddr, encryptedPageIdx);
io.setEncryptedPageCount(pageAddr, encryptedPageCnt);
| 751 | 86 | 837 | <methods>public void <init>(int, long, long, long, int, long, byte, int, long) ,public void <init>(java.io.DataInput) throws java.io.IOException,public void applyDelta(org.apache.ignite.internal.pagemem.PageMemory, long) throws org.apache.ignite.IgniteCheckedException,public long link() ,public void toBytes(java.nio.By... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/PagesListRemovePageRecord.java | PagesListRemovePageRecord | applyDelta | class PagesListRemovePageRecord extends PageDeltaRecord {
/** */
@GridToStringExclude
private final long rmvdPageId;
/**
* @param cacheId Cache ID.
* @param pageId Page ID.
* @param rmvdPageId Data page ID to remove.
*/
public PagesListRemovePageRecord(int cacheId, long pageId, ... |
PagesListNodeIO io = PagesListNodeIO.VERSIONS.forPage(pageAddr);
boolean rmvd = io.removePage(pageAddr, rmvdPageId);
assert rmvd;
| 343 | 52 | 395 | <methods>public abstract void applyDelta(org.apache.ignite.internal.pagemem.PageMemory, long) throws org.apache.ignite.IgniteCheckedException,public org.apache.ignite.internal.pagemem.FullPageId fullPageId() ,public int groupId() ,public long pageId() ,public java.lang.String toString() <variables>private int grpId,pri... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityUtils.java | GridAffinityUtils | affinityMessage | class GridAffinityUtils {
/**
* Creates a job that will look up {@link AffinityKeyMapper} and {@link AffinityFunction} on a
* cache with given name. If they exist, this job will serialize and transfer them together with all deployment
* information needed to unmarshal objects on remote node. Result i... |
Class cls = o.getClass();
GridDeployment dep = ctx.deploy().deploy(cls, cls.getClassLoader());
if (dep == null)
throw new IgniteDeploymentCheckedException("Failed to deploy affinity object with class: " + cls.getName());
return new GridAffinityMessage(
U.marsh... | 1,354 | 136 | 1,490 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/IdealAffinityAssignment.java | IdealAffinityAssignment | calculatePrimaries | class IdealAffinityAssignment {
/** Topology version. */
private final AffinityTopologyVersion topologyVersion;
/** Assignment. */
private final List<List<ClusterNode>> assignment;
/** Ideal primaries. */
private final Map<Object, Set<Integer>> idealPrimaries;
/**
* @param topologyVe... |
int nodesSize = nodes != null ? nodes.size() : 100;
Map<Object, Set<Integer>> primaryPartitions = U.newHashMap(nodesSize);
for (int size = assignment.size(), p = 0; p < size; p++) {
List<ClusterNode> affNodes = assignment.get(p);
if (!affNodes.isEmpty()) {
... | 782 | 172 | 954 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/authentication/User.java | User | equals | class User implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** Default user name. */
public static final String DFAULT_USER_NAME = "ignite";
/** Default user password. */
private static final String DFLT_USER_PASSWORD = "ignite";
/**
* @see BCrypt#GE... |
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
User u = (User)o;
return F.eq(name, u.name) && F.eq(hashedPasswd, u.hashedPasswd);
| 818 | 82 | 900 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/authentication/UserAuthenticateRequestMessage.java | UserAuthenticateRequestMessage | readFrom | class UserAuthenticateRequestMessage implements Message {
/** */
private static final long serialVersionUID = 0L;
/** User name. */
private String name;
/** User password.. */
private String passwd;
/** Request ID. */
private IgniteUuid id = IgniteUuid.randomUuid();
/**
*
... |
reader.setBuffer(buf);
if (!reader.beforeMessageRead())
return false;
switch (reader.state()) {
case 0:
id = reader.readIgniteUuid("id");
if (!reader.isLastRead())
return false;
reader.incrementState... | 654 | 194 | 848 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/authentication/UserAuthenticateResponseMessage.java | UserAuthenticateResponseMessage | readFrom | class UserAuthenticateResponseMessage implements Message {
/** */
private static final long serialVersionUID = 0L;
/** Request ID. */
private IgniteUuid id;
/** Error message. */
private String errMsg;
/**
*
*/
public UserAuthenticateResponseMessage() {
// No-op.
... |
reader.setBuffer(buf);
if (!reader.beforeMessageRead())
return false;
switch (reader.state()) {
case 0:
errMsg = reader.readString("errMsg");
if (!reader.isLastRead())
return false;
reader.incrementS... | 603 | 151 | 754 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/BulkLoadProcessor.java | BulkLoadProcessor | processBatch | class BulkLoadProcessor implements AutoCloseable {
/** Parser of the input bytes. */
private final BulkLoadParser inputParser;
/**
* Converter, which transforms the list of strings parsed from the input stream to the key+value entry to add to
* the cache.
*/
private final IgniteClosureX<... |
try (TraceSurroundings ignored = MTC.support(tracing.create(SQL_BATCH_PROCESS, qrySpan))) {
if (isClosed)
throw new IgniteIllegalStateException("Attempt to process a batch on a closed BulkLoadProcessor");
Iterable<List<Object>> inputRecords = inputParser.parseBatch(batc... | 1,002 | 151 | 1,153 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/pipeline/CsvLineProcessorBlock.java | CsvLineProcessorBlock | accept | class CsvLineProcessorBlock extends PipelineBlock<String, String[]> {
/** Empty string array. */
public static final String[] EMPTY_STR_ARRAY = new String[0];
/** Field delimiter pattern. */
private final char fldDelim;
/** Quote character. */
private final char quoteChars;
/** Null strin... |
List<String> fields = new ArrayList<>();
StringBuilder curField = new StringBuilder(256);
ReaderState state = ReaderState.IDLE;
final int length = input.length();
int copy = 0;
int cur = 0;
int prev = -1;
int copyStart = 0;
boolean quotesMatch... | 453 | 679 | 1,132 | <methods>public abstract void accept(java.lang.String, boolean) throws org.apache.ignite.IgniteCheckedException,public PipelineBlock<java.lang.String[],N> append(PipelineBlock<java.lang.String[],N>) <variables>PipelineBlock<java.lang.String[],?> nextBlock |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/AutoClosableCursorIterator.java | AutoClosableCursorIterator | hasNext | class AutoClosableCursorIterator<T> implements Iterator<T> {
/** Cursor. */
private final QueryCursor cursor;
/** Iterator. */
private final Iterator<T> iter;
/**
* Constructor.
*
* @param cursor Query cursor.
* @param iter Wrapped iterator.
*/
public AutoClosableCurso... |
boolean hasNext = iter.hasNext();
if (!hasNext)
cursor.close();
return hasNext;
| 190 | 35 | 225 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConfigurationOverride.java | CacheConfigurationOverride | isEmpty | class CacheConfigurationOverride {
/** */
private CacheMode mode;
/** */
private Integer backups;
/** */
private String cacheGroup;
/** */
private String dataRegion;
/** */
private CacheWriteSynchronizationMode writeSync;
/**
* @return Cache mode.
*/
public... |
return mode == null &&
backups == null &&
cacheGroup == null &&
dataRegion == null &&
writeSync == null;
| 819 | 37 | 856 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheConfigurationSplitterImpl.java | CacheConfigurationSplitterImpl | supports | class CacheConfigurationSplitterImpl implements CacheConfigurationSplitter {
/** Cache configuration to hold default field values. */
private static final CacheConfiguration<?, ?> DEFAULT_CACHE_CONFIG = new CacheConfiguration<>();
/** Near cache configuration to hold default field values. */
private st... |
if (field.getDeclaredAnnotation(SerializeSeparately.class) == null)
return false;
if (IgniteFeatures.allNodesSupport(ctx.config().getDiscoverySpi(), IgniteFeatures.SPLITTED_CACHE_CONFIGURATIONS_V2))
return true;
for (String filedName : FIELDS_V1) {
if (file... | 1,019 | 124 | 1,143 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryImpl.java | CacheEntryImpl | unwrap | class CacheEntryImpl<K, V> implements Cache.Entry<K, V>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
/** */
private K key;
/** */
private V val;
/** Entry version. */
private GridCacheVersion ver;
/**
* Required by {@link Externalizable}.
*/... |
if (cls.isAssignableFrom(getClass()))
return cls.cast(this);
if (cls.isAssignableFrom(CacheEntry.class))
return (T)new CacheEntryImplEx<>(key, val, ver);
throw new IllegalArgumentException("Unwrapping to class is not supported: " + cls);
| 493 | 87 | 580 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEntryInfoCollection.java | CacheEntryInfoCollection | writeTo | class CacheEntryInfoCollection implements Message {
/** */
private static final long serialVersionUID = 0L;
/** */
@GridDirectCollection(GridCacheEntryInfo.class)
private List<GridCacheEntryInfo> infos;
/** */
public CacheEntryInfoCollection() {
// No-op
}
/**
* @para... |
writer.setBuffer(buf);
if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType(), fieldsCount()))
return false;
writer.onHeaderWritten();
}
switch (writer.state()) {
case 0:
if (!writer.writeCollection("i... | 673 | 121 | 794 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheInvokeResult.java | CacheInvokeResult | get | class CacheInvokeResult<T> implements EntryProcessorResult<T>, Externalizable {
/** */
private static final long serialVersionUID = 0L;
/** */
@GridToStringInclude(sensitive = true)
private T res;
/** */
private Exception err;
/**
* Empty constructor required by {@link Externaliz... |
if (err != null) {
if (err instanceof UnregisteredClassException || err instanceof UnregisteredBinaryTypeException)
throw (IgniteException)err;
if (err instanceof EntryProcessorException)
throw (EntryProcessorException)err;
throw new EntryPr... | 558 | 85 | 643 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheJoinNodeDiscoveryData.java | CacheInfo | readObject | class CacheInfo implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** */
@GridToStringInclude
private StoredCacheData cacheData;
/** */
@GridToStringInclude
private CacheType cacheType;
/** */
@GridToStrin... |
ObjectInputStream.GetField gf = ois.readFields();
cacheData = (StoredCacheData)gf.get("cacheData", null);
cacheType = (CacheType)gf.get("cacheType", null);
sql = gf.get("sql", false);
flags = gf.get("flags", 0L);
staticallyConfigured = gf.get("st... | 594 | 109 | 703 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectAdapter.java | CacheObjectAdapter | putValue | class CacheObjectAdapter implements CacheObject, Externalizable {
/** */
private static final long serialVersionUID = 2006765505127197251L;
/** Head size. */
protected static final int HEAD_SIZE = 5; // 4 bytes len + 1 byte type
/** */
@GridToStringInclude(sensitive = true)
@GridDirectTran... |
int dataLen = valBytes.length;
if (buf.remaining() < len)
return false;
if (off == 0 && len >= HEAD_SIZE) {
buf.putInt(dataLen);
buf.put(cacheObjType);
len -= HEAD_SIZE;
}
else if (off >= HEAD_SIZE)
off -= HEAD_SIZE;... | 1,706 | 282 | 1,988 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectByteArrayImpl.java | CacheObjectByteArrayImpl | putValue | class CacheObjectByteArrayImpl implements CacheObject, Externalizable {
/** */
private static final long serialVersionUID = 0L;
/** */
protected byte[] val;
/**
* Required by {@link Message}.
*/
public CacheObjectByteArrayImpl() {
// No-op.
}
/**
* @param val Va... |
assert val != null : "Value is not initialized";
return CacheObjectAdapter.putValue(cacheObjectType(), buf, off, len, val, 0);
| 1,193 | 43 | 1,236 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheObjectImpl.java | CacheObjectImpl | finishUnmarshal | class CacheObjectImpl extends CacheObjectAdapter {
/** */
private static final long serialVersionUID = 0L;
/**
*
*/
public CacheObjectImpl() {
// No-op.
}
/**
* @param val Value.
* @param valBytes Value bytes.
*/
public CacheObjectImpl(Object val, byte[] va... |
assert val != null || valBytes != null;
if (val == null && ctx.storeValue())
val = valueFromValueBytes(ctx, ldr);
| 948 | 45 | 993 | <methods>public non-sealed void <init>() ,public byte cacheObjectType() ,public byte fieldsCount() ,public static int objectPutSize(int) ,public boolean putValue(java.nio.ByteBuffer) throws org.apache.ignite.IgniteCheckedException,public int putValue(long) throws org.apache.ignite.IgniteCheckedException,public static i... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClientCacheChangeDummyDiscoveryMessage.java | ClientCacheChangeDummyDiscoveryMessage | toString | class ClientCacheChangeDummyDiscoveryMessage extends AbstractCachePartitionExchangeWorkerTask
implements DiscoveryCustomMessage {
/** */
private static final long serialVersionUID = 0L;
/** */
private final UUID reqId;
/** */
private final Map<String, DynamicCacheChangeRequest> startReqs;
... |
return S.toString(ClientCacheChangeDummyDiscoveryMessage.class, this,
"startCaches", (startReqs != null ? startReqs.keySet() : ""));
| 655 | 50 | 705 | <methods>public org.apache.ignite.internal.processors.security.SecurityContext securityContext() <variables>private final non-sealed org.apache.ignite.internal.processors.security.SecurityContext secCtx |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/EntryProcessorResourceInjectorProxy.java | EntryProcessorResourceInjectorProxy | process | class EntryProcessorResourceInjectorProxy<K, V, T> implements EntryProcessor<K, V, T>, Serializable {
/** */
private static final long serialVersionUID = 0L;
/** Delegate. */
private EntryProcessor<K, V, T> delegate;
/** Injected flag. */
private transient boolean injected;
/**
* @pa... |
if (!injected) {
GridCacheContext cctx = entry.unwrap(GridCacheContext.class);
GridResourceProcessor rsrc = cctx.kernalContext().resource();
try {
rsrc.inject(delegate, GridResourceIoc.AnnotationSet.ENTRY_PROCESSOR, cctx.name());
}
c... | 511 | 137 | 648 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/FetchActiveTxOwnerTraceClosure.java | FetchActiveTxOwnerTraceClosure | call | class FetchActiveTxOwnerTraceClosure implements IgniteCallable<String> {
/** */
private static final long serialVersionUID = 0L;
/** */
private final long txOwnerThreadId;
/** */
public FetchActiveTxOwnerTraceClosure(long txOwnerThreadId) {
this.txOwnerThreadId = txOwnerThreadId;
}... |
GridStringBuilder traceDump = new GridStringBuilder("Stack trace of the transaction owner thread:\n");
try {
U.printStackTrace(txOwnerThreadId, traceDump);
}
catch (SecurityException | IllegalArgumentException e) {
traceDump = new GridStringBuilder("Could not ge... | 160 | 105 | 265 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheLoaderWriterStoreFactory.java | GridCacheLoaderWriterStoreFactory | create | class GridCacheLoaderWriterStoreFactory<K, V> implements Factory<CacheStore<K, V>> {
/** */
private static final long serialVersionUID = 0L;
/** */
private final Factory<CacheLoader<K, V>> ldrFactory;
/** */
private final Factory<CacheWriter<K, V>> writerFactory;
/**
* @param ldrFact... |
CacheLoader<K, V> ldr = ldrFactory == null ? null : ldrFactory.create();
CacheWriter<K, V> writer = writerFactory == null ? null : writerFactory.create();
return new GridCacheLoaderWriterStore<>(ldr, writer);
| 315 | 70 | 385 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheManagerAdapter.java | GridCacheManagerAdapter | onKernalStop | class GridCacheManagerAdapter<K, V> implements GridCacheManager<K, V> {
/** Context. */
protected GridCacheContext cctx;
/** Logger. */
protected IgniteLogger log;
/** Starting flag. */
protected final AtomicBoolean starting = new AtomicBoolean(false);
/** {@inheritDoc} */
@Override p... |
if (!starting.get())
// Ignoring attempt to stop manager that has never been started.
return;
onKernalStop0(cancel);
if (log != null && log.isDebugEnabled())
log.debug(kernalStopInfo());
| 956 | 71 | 1,027 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/QueryCursorImpl.java | QueryCursorImpl | closeIter | class QueryCursorImpl<T> implements QueryCursorEx<T>, FieldsQueryCursor<T> {
/** */
private static final AtomicReferenceFieldUpdater<QueryCursorImpl, State> STATE_UPDATER =
AtomicReferenceFieldUpdater.newUpdater(QueryCursorImpl.class, State.class, "state");
/** Query executor. */
private final ... |
if (iter instanceof AutoCloseable) {
try {
((AutoCloseable)iter).close();
}
catch (Exception e) {
throw new IgniteException(e);
}
}
| 1,834 | 56 | 1,890 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/affinity/GridCacheAffinityImpl.java | GridCacheAffinityImpl | mapKeysToNodes | class GridCacheAffinityImpl<K, V> implements Affinity<K> {
/** */
public static final String FAILED_TO_FIND_CACHE_ERR_MSG = "Failed to find cache (cache was not started " +
"yet or cache was already stopped): ";
/** Cache context. */
private GridCacheContext<K, V> cctx;
/** Logger. */
... |
A.notNull(keys, "keys");
AffinityTopologyVersion topVer = topologyVersion();
int nodesCnt = cctx.discovery().cacheGroupAffinityNodes(cctx.groupId(), topVer).size();
// Must return empty map if no alive nodes present or keys is empty.
Map<ClusterNode, Collection<K>> res = new ... | 1,510 | 263 | 1,773 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/IgniteBinaryImpl.java | IgniteBinaryImpl | registerClass | class IgniteBinaryImpl implements IgniteBinary {
/** */
private GridKernalContext ctx;
/** */
private IgniteCacheObjectProcessor proc;
/**
* @param ctx Context.
*/
public IgniteBinaryImpl(GridKernalContext ctx, IgniteCacheObjectProcessor proc) {
this.ctx = ctx;
this.... |
guard();
try {
return proc.registerClass(cls);
}
finally {
unguard();
}
| 1,024 | 37 | 1,061 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/binary/MetadataRemoveProposedMessage.java | MetadataRemoveProposedMessage | ackMessage | class MetadataRemoveProposedMessage implements DiscoveryCustomMessage {
/** */
private static final long serialVersionUID = 0L;
/** */
private final IgniteUuid id = IgniteUuid.randomUuid();
/** Node UUID which initiated metadata update. */
private final UUID origNodeId;
/** Metadata type ... |
return (status == ProposalStatus.SUCCESSFUL) ? new MetadataRemoveAcceptedMessage(typeId) : null;
| 711 | 35 | 746 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTtlUpdateRequest.java | GridCacheTtlUpdateRequest | prepareMarshal | class GridCacheTtlUpdateRequest extends GridCacheIdMessage {
/** */
private static final long serialVersionUID = 0L;
/** Entries keys. */
@GridToStringInclude
@GridDirectCollection(KeyCacheObject.class)
private List<KeyCacheObject> keys;
/** Entries versions. */
@GridDirectCollection(G... |
super.prepareMarshal(ctx);
GridCacheContext cctx = ctx.cacheContext(cacheId);
prepareMarshalCacheObjects(keys, cctx);
prepareMarshalCacheObjects(nearKeys, cctx);
| 1,922 | 59 | 1,981 | <methods>public non-sealed void <init>() ,public boolean cacheGroupMessage() ,public int cacheId() ,public void cacheId(int) ,public byte fieldsCount() ,public int handlerId() ,public boolean readFrom(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageReader) ,public java.lang.String toString... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTxRecoveryRequest.java | GridCacheTxRecoveryRequest | readFrom | class GridCacheTxRecoveryRequest extends GridDistributedBaseMessage {
/** */
private static final long serialVersionUID = 0L;
/** Future ID. */
private IgniteUuid futId;
/** Mini future ID. */
private IgniteUuid miniId;
/** Near transaction ID. */
private GridCacheVersion nearXidVer;
... |
reader.setBuffer(buf);
if (!reader.beforeMessageRead())
return false;
if (!super.readFrom(buf, reader))
return false;
switch (reader.state()) {
case 8:
futId = reader.readIgniteUuid("futId");
if (!reader.isLastRead(... | 1,185 | 365 | 1,550 | <methods>public boolean addDeploymentInfo() ,public Collection<org.apache.ignite.internal.processors.cache.version.GridCacheVersion> committedVersions() ,public void completedVersions(Collection<org.apache.ignite.internal.processors.cache.version.GridCacheVersion>, Collection<org.apache.ignite.internal.processors.cache... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxMapping.java | GridDistributedTxMapping | addBackups | class GridDistributedTxMapping {
/** */
private static final AtomicReferenceFieldUpdater<GridDistributedTxMapping, Set> BACKUPS_FIELD_UPDATER
= AtomicReferenceFieldUpdater.newUpdater(GridDistributedTxMapping.class, Set.class, "backups");
/** Mapped node. */
@GridToStringExclude
private fina... |
if (newBackups == null)
return;
if (backups == null)
BACKUPS_FIELD_UPDATER.compareAndSet(this, null, Collections.newSetFromMap(new ConcurrentHashMap<>()));
backups.addAll(newBackups);
| 1,941 | 76 | 2,017 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/IgniteExternalizableExpiryPolicy.java | IgniteExternalizableExpiryPolicy | writeDuration | class IgniteExternalizableExpiryPolicy implements ExpiryPolicy, Externalizable {
/** */
private static final long serialVersionUID = 0L;
/** */
private ExpiryPolicy plc;
/** */
private static final byte CREATE_TTL_MASK = 0x01;
/** */
private static final byte UPDATE_TTL_MASK = 0x02;
... |
if (duration != null) {
if (duration.getDurationAmount() == 0L) {
if (duration.isEternal())
out.writeLong(0);
else
out.writeLong(CU.TTL_ZERO);
}
else
out.writeLong(duration.getTimeUnit().... | 945 | 99 | 1,044 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtUnreservedPartitionException.java | GridDhtUnreservedPartitionException | toString | class GridDhtUnreservedPartitionException extends IgniteCheckedException {
/** */
private static final long serialVersionUID = 0L;
/** Partition. */
private final int part;
/** Topology version. */
private final AffinityTopologyVersion topVer;
/**
* @param part Partition.
* @par... |
return getClass() + " [part=" + part + ", msg=" + getMessage() + ']';
| 262 | 30 | 292 | <methods>public void <init>() ,public void <init>(java.lang.String) ,public void <init>(java.lang.Throwable) ,public void <init>(java.lang.String, java.lang.Throwable, boolean) ,public void <init>(java.lang.String, java.lang.Throwable) ,public T getCause(Class<T>) ,public final transient boolean hasCause(Class<? extend... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/PartitionUpdateCountersMessage.java | PartitionUpdateCountersMessage | readFrom | class PartitionUpdateCountersMessage implements Message {
/** */
private static final int ITEM_SIZE = 4 /* partition */ + 8 /* initial counter */ + 8 /* updates count */;
/** */
private static final long serialVersionUID = 193442457510062844L;
/** */
private byte data[];
/** */
privat... |
reader.setBuffer(buf);
if (!reader.beforeMessageRead())
return false;
switch (reader.state()) {
case 0:
cacheId = reader.readInt("cacheId");
if (!reader.isLastRead())
return false;
reader.incrementSt... | 1,638 | 163 | 1,801 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicCheckUpdateRequest.java | GridNearAtomicCheckUpdateRequest | writeTo | class GridNearAtomicCheckUpdateRequest extends GridCacheIdMessage {
/** */
private static final long serialVersionUID = 0L;
/** Cache message index. */
public static final int CACHE_MSG_IDX = nextIndexId();
/** */
@GridDirectTransient
private GridNearAtomicAbstractUpdateRequest updateReq;
... |
writer.setBuffer(buf);
if (!super.writeTo(buf, writer))
return false;
if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType(), fieldsCount()))
return false;
writer.onHeaderWritten();
}
switch (writer.state()) ... | 786 | 169 | 955 | <methods>public non-sealed void <init>() ,public boolean cacheGroupMessage() ,public int cacheId() ,public void cacheId(int) ,public byte fieldsCount() ,public int handlerId() ,public boolean readFrom(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageReader) ,public java.lang.String toString... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java | GridDhtDetachedCacheEntry | storeValue | class GridDhtDetachedCacheEntry extends GridDistributedCacheEntry {
/**
* @param ctx Cache context.
* @param key Cache key.
*/
public GridDhtDetachedCacheEntry(GridCacheContext ctx, KeyCacheObject key) {
super(ctx, key);
}
/**
* Sets value to detached entry so it can be retr... |
return false;
// No-op for detached entries, index is updated on primary nodes.
| 663 | 26 | 689 | <methods>public void <init>(GridCacheContext#RAW, org.apache.ignite.internal.processors.cache.KeyCacheObject) ,public org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate addLocal(long, org.apache.ignite.internal.processors.cache.version.GridCacheVersion, org.apache.ignite.internal.processors.affinity.Aff... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtForceKeysRequest.java | GridDhtForceKeysRequest | writeTo | class GridDhtForceKeysRequest extends GridCacheIdMessage implements GridCacheDeployable {
/** */
private static final long serialVersionUID = 0L;
/** Future ID. */
private IgniteUuid futId;
/** Mini-future ID. */
private IgniteUuid miniId;
/** Keys to request. */
@GridToStringInclude
... |
writer.setBuffer(buf);
if (!super.writeTo(buf, writer))
return false;
if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType(), fieldsCount()))
return false;
writer.onHeaderWritten();
}
switch (writer.state()) ... | 1,249 | 259 | 1,508 | <methods>public non-sealed void <init>() ,public boolean cacheGroupMessage() ,public int cacheId() ,public void cacheId(int) ,public byte fieldsCount() ,public int handlerId() ,public boolean readFrom(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageReader) ,public java.lang.String toString... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessageV2.java | GridDhtPartitionSupplyMessageV2 | writeTo | class GridDhtPartitionSupplyMessageV2 extends GridDhtPartitionSupplyMessage {
/** */
private static final long serialVersionUID = 0L;
/** Available since. */
public static final IgniteProductVersion AVAILABLE_SINCE = IgniteProductVersion.fromString("2.7.0");
/** Supplying process error. */
@Gr... |
writer.setBuffer(buf);
if (!super.writeTo(buf, writer))
return false;
if (!writer.isHeaderWritten()) {
if (!writer.writeHeader(directType(), fieldsCount()))
return false;
writer.onHeaderWritten();
}
switch (writer.state()) ... | 762 | 134 | 896 | <methods>public void <init>() ,public boolean addDeploymentInfo() ,public void addEstimatedKeysCount(long) ,public void addKeysForCache(int, long) ,public short directType() ,public long estimatedKeysCount() ,public byte fieldsCount() ,public void finishUnmarshal(GridCacheSharedContext#RAW, java.lang.ClassLoader) throw... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/IgniteDhtPartitionCountersMap2.java | IgniteDhtPartitionCountersMap2 | get | class IgniteDhtPartitionCountersMap2 implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** */
private Map<Integer, CachePartitionFullCountersMap> map;
/**
* @return {@code True} if map is empty.
*/
public synchronized boolean empty() {
return m... |
if (map == null)
return null;
CachePartitionFullCountersMap cntrMap = map.get(cacheId);
if (cntrMap == null)
return null;
return cntrMap;
| 259 | 63 | 322 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/IgniteDhtPartitionsToReloadMap.java | IgniteDhtPartitionsToReloadMap | put | class IgniteDhtPartitionsToReloadMap implements Serializable {
/** */
private static final long serialVersionUID = 0L;
/** */
private Map<UUID, Map<Integer, Set<Integer>>> map;
/**
* @param nodeId Node ID.
* @param cacheId Cache ID.
* @return Collection of partitions to reload.
... |
if (map == null)
map = new HashMap<>();
Map<Integer, Set<Integer>> nodeMap = map.get(nodeId);
if (nodeMap == null) {
nodeMap = new HashMap<>();
map.put(nodeId, nodeMap);
}
Set<Integer> parts = nodeMap.get(cacheId);
if (parts == nu... | 375 | 140 | 515 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/IgniteRebalanceIteratorImpl.java | IgniteRebalanceIteratorImpl | remove | class IgniteRebalanceIteratorImpl implements IgniteRebalanceIterator {
/** */
private static final long serialVersionUID = 0L;
/** Iterators for full preloading, ordered by partition ID. */
@Nullable private final NavigableMap<Integer, GridCloseableIterator<CacheDataRow>> fullIterators;
/** Iterat... |
try {
removeX();
}
catch (IgniteCheckedException e) {
throw new IgniteException(e);
}
| 1,383 | 40 | 1,423 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionDefferedDeleteQueueCleanupTask.java | PartitionDefferedDeleteQueueCleanupTask | run | class PartitionDefferedDeleteQueueCleanupTask implements GridTimeoutObject {
/** */
private final IgniteUuid id = IgniteUuid.randomUuid();
/** */
private final long endTime;
/** */
private final long timeout;
/** */
private final GridCacheSharedContext cctx;
/** */
private fi... |
try {
for (CacheGroupContext grp : cctx.cache().cacheGroups()) {
if (grp.affinityNode()) {
GridDhtPartitionTopology top = null;
try {
top = grp.topology();
... | 317 | 254 | 571 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFastFinishFuture.java | GridNearTxFastFinishFuture | finish | class GridNearTxFastFinishFuture extends GridFutureAdapter<IgniteInternalTx> implements NearTxFinishFuture {
/** */
private final GridNearTxLocal tx;
/** */
private final boolean commit;
/**
* @param tx Transaction.
* @param commit Commit flag.
*/
GridNearTxFastFinishFuture(Grid... |
try {
if (commit) {
tx.state(PREPARING);
tx.state(PREPARED);
tx.state(COMMITTING);
tx.context().tm().fastFinishTx(tx, true, true);
tx.state(COMMITTED);
}
else {
tx.state(PREPARI... | 277 | 171 | 448 | <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.cache.transactions.IgniteInternalTx>,T>) ,public IgniteInternalFuture<T> chain(IgniteOut... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteTxMappingsImpl.java | IgniteTxMappingsImpl | localMapping | class IgniteTxMappingsImpl implements IgniteTxMappings {
/** */
private final Map<UUID, GridDistributedTxMapping> mappings = new ConcurrentHashMap<>();
/** {@inheritDoc} */
@Override public void clear() {
mappings.clear();
}
/** {@inheritDoc} */
@Override public boolean empty() {
... |
for (GridDistributedTxMapping m : mappings.values()) {
if (m.primary().isLocal())
return m;
}
return null;
| 419 | 45 | 464 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesObsoleteEntryExtras.java | GridCacheAttributesObsoleteEntryExtras | mvcc | class GridCacheAttributesObsoleteEntryExtras extends GridCacheEntryExtrasAdapter {
/** Obsolete version. */
private GridCacheVersion obsoleteVer;
/**
* Constructor.
*
* @param obsoleteVer Obsolete version.
*/
GridCacheAttributesObsoleteEntryExtras(GridCacheVersion obsoleteVer) {
... |
return mvcc != null ? new GridCacheAttributesMvccObsoleteEntryExtras(mvcc, obsoleteVer) : this;
| 446 | 38 | 484 | <methods>public non-sealed void <init>() ,public long expireTime() ,public org.apache.ignite.internal.processors.cache.GridCacheMvcc mvcc() ,public org.apache.ignite.internal.processors.cache.version.GridCacheVersion obsoleteVersion() ,public long ttl() <variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheAttributesObsoleteTtlEntryExtras.java | GridCacheAttributesObsoleteTtlEntryExtras | obsoleteVersion | class GridCacheAttributesObsoleteTtlEntryExtras extends GridCacheEntryExtrasAdapter {
/** Obsolete version. */
private GridCacheVersion obsoleteVer;
/** TTL. */
private long ttl;
/** Expire time. */
private long expireTime;
/**
* Constructor.
*
* @param obsoleteVer Obsolete... |
if (obsoleteVer != null) {
this.obsoleteVer = obsoleteVer;
return this;
}
else
return new GridCacheAttributesTtlEntryExtras(ttl, expireTime);
| 640 | 62 | 702 | <methods>public non-sealed void <init>() ,public long expireTime() ,public org.apache.ignite.internal.processors.cache.GridCacheMvcc mvcc() ,public org.apache.ignite.internal.processors.cache.version.GridCacheVersion obsoleteVersion() ,public long ttl() <variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/extras/GridCacheMvccObsoleteEntryExtras.java | GridCacheMvccObsoleteEntryExtras | mvcc | class GridCacheMvccObsoleteEntryExtras extends GridCacheEntryExtrasAdapter {
/** MVCC. */
private GridCacheMvcc mvcc;
/** Obsolete version. */
private GridCacheVersion obsoleteVer;
/**
* Constructor.
*
* @param mvcc MVCC.
* @param obsoleteVer Obsolete version.
*/
GridC... |
if (mvcc != null) {
this.mvcc = mvcc;
return this;
}
else
return new GridCacheObsoleteEntryExtras(obsoleteVer);
| 558 | 55 | 613 | <methods>public non-sealed void <init>() ,public long expireTime() ,public org.apache.ignite.internal.processors.cache.GridCacheMvcc mvcc() ,public org.apache.ignite.internal.processors.cache.version.GridCacheVersion obsoleteVersion() ,public long ttl() <variables> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CacheStripedExecutor.java | CacheStripedExecutor | submit | class CacheStripedExecutor {
/** Error appeared during submitted task execution. */
private final AtomicReference<IgniteCheckedException> error = new AtomicReference<>();
/** Delegate striped executor. */
private final StripedExecutor exec;
/** Limit number of concurrent tasks submitted to the exe... |
int stripes = exec.stripesCount();
int stripe = U.stripeIdx(stripes, grpId, partId);
assert stripe >= 0 && stripe <= stripes : "idx=" + stripe + ", stripes=" + stripes;
try {
semaphore.acquire();
}
catch (InterruptedException e) {
throw new Ign... | 744 | 268 | 1,012 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/CleanCacheStoresMaintenanceAction.java | CleanCacheStoresMaintenanceAction | execute | class CleanCacheStoresMaintenanceAction implements MaintenanceAction<Void> {
/** */
public static final String ACTION_NAME = "clean_data_files";
/** */
private final File rootStoreDir;
/** */
private final String[] cacheStoreDirs;
/**
* @param rootStoreDir
* @param cacheStoreDir... |
for (String cacheStoreDirName : cacheStoreDirs) {
File cacheStoreDir = new File(rootStoreDir, cacheStoreDirName);
if (cacheStoreDir.exists() && cacheStoreDir.isDirectory()) {
for (File file : cacheStoreDir.listFiles()) {
if (!file.getName().equals(CA... | 248 | 113 | 361 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointEntry.java | GroupStateLazyStore | remap | class GroupStateLazyStore {
/** */
private static final AtomicIntegerFieldUpdater<GroupStateLazyStore> initGuardUpdater =
AtomicIntegerFieldUpdater.newUpdater(GroupStateLazyStore.class, "initGuard");
/** Cache states. Initialized lazily. */
@Nullable private volatile Map<Int... |
if (stateRec.isEmpty())
return Collections.emptyMap();
Map<Integer, GroupState> grpStates = U.newHashMap(stateRec.size());
for (Integer grpId : stateRec.keySet()) {
CacheState recState = stateRec.get(grpId);
GroupState grpState = ne... | 920 | 238 | 1,158 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/diagnostic/pagelocktracker/PageLockTrackerManager.java | PageLockTrackerManager | dumpLocksToFile | class PageLockTrackerManager implements LifecycleAware {
/** No-op page lock listener. */
public static final PageLockListener NOOP_LSNR = new PageLockListener() {
@Override public void onBeforeWriteLock(int cacheId, long pageId, long page) {
// No-op.
}
@Override public voi... |
try {
Path path = Paths.get(U.defaultWorkDirectory(), DEFAULT_TARGET_FOLDER);
return ToFileDumpProcessor.toFileDump(dumpLocks(), path, managerNameId);
}
catch (IgniteCheckedException e) {
throw U.convertException(e);
}
| 1,699 | 86 | 1,785 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/diagnostic/pagelocktracker/dumpprocessors/ToFileDumpProcessor.java | ToFileDumpProcessor | toFileDump | class ToFileDumpProcessor {
/** Date format. */
public static final DateTimeFormatter DATE_FMT = DateTimeFormatter
.ofPattern("yyyy_MM_dd_HH_mm_ss_SSS")
.withZone(ZoneId.systemDefault());
/** File name prefix. */
public static final String PREFIX_NAME = "page_lock_dump_";
/**
... |
try {
Files.createDirectories(dir);
String dumpName = PREFIX_NAME + name + "_" + DATE_FMT.format(Instant.ofEpochMilli(pageLockDump.time));
Path file = dir.resolve(dumpName);
Files.write(file, toStringDump(pageLockDump).getBytes(StandardCharsets.UTF_8));
... | 173 | 141 | 314 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/diagnostic/pagelocktracker/store/OffHeapPageMetaInfoStore.java | OffHeapPageMetaInfoStore | free | class OffHeapPageMetaInfoStore implements PageMetaInfoStore {
/** */
private static final long OVERHEAD_SIZE = 16 + 4 + 4 + 8 + 8;
/** */
private static final int PAGE_ID_OFFSET = 0;
/** */
private static final int PAGE_HEADER_ADDRESS_OFFSET = 8;
/** */
private static final int PAGE_A... |
GridUnsafe.freeMemory(ptr);
if (memCalc != null) {
memCalc.onHeapFree(OVERHEAD_SIZE);
memCalc.onOffHeapFree(size);
}
| 1,424 | 61 | 1,485 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/AbstractFileIO.java | AbstractFileIO | writeFully | class AbstractFileIO implements FileIO {
/** Max io timeout milliseconds. */
private static final int MAX_IO_TIMEOUT_MS = 2000;
/**
*
*/
private interface IOOperation {
/**
* @param offs Offset.
*
* @return Number of bytes operated.
*/
publi... |
return fully(new IOOperation() {
@Override public int run(int offs) throws IOException {
return write(srcBuf, position + offs);
}
}, position, srcBuf.remaining(), true);
| 1,048 | 57 | 1,105 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/AsyncFileIO.java | AsyncFileIO | read | class AsyncFileIO extends AbstractFileIO {
/**
* File channel associated with {@code file}
*/
private final AsynchronousFileChannel ch;
/** Native file descriptor. */
private final int fd;
/** */
private final int fsBlockSize;
/**
* Channel's position.
*/
private v... |
ChannelOpFuture fut = holder.get();
fut.reset();
ch.read(ByteBuffer.wrap(buf, off, length), position, this, fut);
try {
return fut.getUninterruptibly();
}
catch (IgniteCheckedException e) {
throw new IOException(e);
}
| 1,604 | 86 | 1,690 | <methods>public non-sealed void <init>() ,public int readFully(java.nio.ByteBuffer) throws java.io.IOException,public int readFully(java.nio.ByteBuffer, long) throws java.io.IOException,public int readFully(byte[], int, int) throws java.io.IOException,public int writeFully(java.nio.ByteBuffer) throws java.io.IOExceptio... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/AsyncFileIOFactory.java | AsyncFileIOFactory | create | class AsyncFileIOFactory implements FileIOFactory {
/** */
private static final long serialVersionUID = 0L;
/** Thread local channel future holder. */
private transient volatile ThreadLocal<AsyncFileIO.ChannelOpFuture> holder = initHolder();
/** {@inheritDoc} */
@Override public FileIO create(... |
if (holder == null) {
synchronized (this) {
if (holder == null)
holder = initHolder();
}
}
return new AsyncFileIO(file, holder, modes);
| 196 | 57 | 253 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/file/UnzipFileIO.java | UnzipFileIO | position | class UnzipFileIO extends AbstractFileIO {
/** Zip input stream. */
private final ZipInputStream zis;
/** Byte array for draining data. */
private final byte[] arr = new byte[128 * 1024];
/** Size of uncompressed data. */
private final long size;
/** Total bytes read counter. */
priva... |
if (newPosition == totalBytesRead)
return;
if (newPosition < totalBytesRead)
throw new UnsupportedOperationException("Seeking backwards is not supported.");
long bytesRemaining = newPosition - totalBytesRead;
while (bytesRemaining > 0) {
int bytesT... | 855 | 124 | 979 | <methods>public non-sealed void <init>() ,public int readFully(java.nio.ByteBuffer) throws java.io.IOException,public int readFully(java.nio.ByteBuffer, long) throws java.io.IOException,public int readFully(byte[], int, int) throws java.io.IOException,public int writeFully(java.nio.ByteBuffer) throws java.io.IOExceptio... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/io/PagesListMetaIO.java | PagesListMetaIO | getBucketsData | class PagesListMetaIO extends PageIO {
/** */
private static final int CNT_OFF = COMMON_HEADER_END;
/** */
private static final int NEXT_META_PAGE_OFF = CNT_OFF + 2;
/** */
public static final int ITEMS_OFF = NEXT_META_PAGE_OFF + 8;
/** */
public static final int ITEM_SIZE = 10;
... |
int cnt = getCount(pageAddr);
assert cnt >= 0 && cnt <= Short.MAX_VALUE : cnt;
if (cnt == 0)
return;
int off = offset(0);
for (int i = 0; i < cnt; i++) {
int bucket = (int)PageUtils.getShort(pageAddr, off);
assert bucket >= 0 && bucket <= ... | 1,440 | 208 | 1,648 | <methods>public static org.apache.ignite.internal.metric.IndexPageType deriveIndexPageType(long) ,public static Q getBPlusIO(long) throws org.apache.ignite.IgniteCheckedException,public static Q getBPlusIO(int, int) throws org.apache.ignite.IgniteCheckedException,public static short getCompactedSize(java.nio.ByteBuffer... |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/metastorage/MetastoragePageIOUtils.java | MetastoragePageIOUtils | storeByOffset | class MetastoragePageIOUtils {
/**
* @see MetastorageBPlusIO#getLink(long, int)
*/
public static <IO extends BPlusIO<MetastorageRow> & MetastorageBPlusIO> long getLink(
IO io,
long pageAddr,
int idx
) {
assert idx < io.getCount(pageAddr) : idx;
return PageU... |
assert row.link() != 0;
PageUtils.putLong(pageAddr, off, row.link());
byte[] bytes = row.key().getBytes();
assert bytes.length <= Short.MAX_VALUE;
if (row.keyLink() != 0) {
PageUtils.putShort(pageAddr, off + 8, (short)bytes.length);
PageUtils.putLong(p... | 1,120 | 187 | 1,307 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/DelayedDirtyPageStoreWrite.java | DelayedDirtyPageStoreWrite | finishReplacement | class DelayedDirtyPageStoreWrite implements PageStoreWriter {
/** Real flush dirty page implementation. */
private final PageStoreWriter flushDirtyPage;
/** Page size. */
private final int pageSize;
/** Thread local with byte buffers. */
private final ThreadLocal<ByteBuffer> byteBufThreadLoc;
... |
if (byteBuf == null && fullPageId == null)
return;
try {
flushDirtyPage.writePage(fullPageId, byteBuf, tag);
}
finally {
tracker.unlock(fullPageId);
fullPageId = null;
byteBuf = null;
tag = -1;
}
| 646 | 90 | 736 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageReadWriteManagerImpl.java | PageReadWriteManagerImpl | write | class PageReadWriteManagerImpl implements PageReadWriteManager {
/** */
private final GridKernalContext ctx;
/** */
@GridToStringExclude
protected final PageStoreCollection pageStores;
/** */
@SuppressWarnings("unused")
private final String name;
/**
* @param ctx Kernal conte... |
int partId = PageIdUtils.partId(pageId);
PageStore store = pageStores.getStore(grpId, partId);
try {
int pageSize = store.getPageSize();
int compressedPageSize = pageSize;
CacheGroupContext grpCtx = ctx.cache().cacheGroup(grpId);
if (grpCtx != ... | 623 | 392 | 1,015 | <no_super_class> |
apache_ignite | ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PagesWriteThrottle.java | PagesWriteThrottle | onMarkDirty | class PagesWriteThrottle implements PagesWriteThrottlePolicy {
/** Page memory. */
private final PageMemoryImpl pageMemory;
/** Database manager. */
private final IgniteOutClosure<CheckpointProgress> cpProgress;
/** If true, throttle will only protect from checkpoint buffer overflow, not from dirt... |
assert stateChecker.checkpointLockIsHeldByThread();
boolean shouldThrottle = false;
if (isPageInCheckpoint)
shouldThrottle = isCpBufferOverflowThresholdExceeded();
if (!shouldThrottle && !throttleOnlyPagesInCheckpoint) {
CheckpointProgress progress = cpProgres... | 886 | 858 | 1,744 | <no_super_class> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.