id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
15,300 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/operation/BaseMigrationOperation.java | BaseMigrationOperation.setActiveMigration | void setActiveMigration() {
InternalPartitionServiceImpl partitionService = getService();
MigrationManager migrationManager = partitionService.getMigrationManager();
MigrationInfo currentActiveMigration = migrationManager.setActiveMigration(migrationInfo);
if (currentActiveMigration != n... | java | void setActiveMigration() {
InternalPartitionServiceImpl partitionService = getService();
MigrationManager migrationManager = partitionService.getMigrationManager();
MigrationInfo currentActiveMigration = migrationManager.setActiveMigration(migrationInfo);
if (currentActiveMigration != n... | [
"void",
"setActiveMigration",
"(",
")",
"{",
"InternalPartitionServiceImpl",
"partitionService",
"=",
"getService",
"(",
")",
";",
"MigrationManager",
"migrationManager",
"=",
"partitionService",
".",
"getMigrationManager",
"(",
")",
";",
"MigrationInfo",
"currentActiveMi... | Sets the active migration and the partition migration flag. | [
"Sets",
"the",
"active",
"migration",
"and",
"the",
"partition",
"migration",
"flag",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/operation/BaseMigrationOperation.java#L201-L219 |
15,301 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/aggregation/impl/AbstractAggregator.java | AbstractAggregator.extract | @SuppressWarnings("unchecked")
private <T> T extract(I input) {
if (attributePath == null) {
if (input instanceof Map.Entry) {
return (T) ((Map.Entry) input).getValue();
}
} else if (input instanceof Extractable) {
return (T) ((Extractable) input).... | java | @SuppressWarnings("unchecked")
private <T> T extract(I input) {
if (attributePath == null) {
if (input instanceof Map.Entry) {
return (T) ((Map.Entry) input).getValue();
}
} else if (input instanceof Extractable) {
return (T) ((Extractable) input).... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"<",
"T",
">",
"T",
"extract",
"(",
"I",
"input",
")",
"{",
"if",
"(",
"attributePath",
"==",
"null",
")",
"{",
"if",
"(",
"input",
"instanceof",
"Map",
".",
"Entry",
")",
"{",
"return",
... | Extract the value of the given attributePath from the given entry. | [
"Extract",
"the",
"value",
"of",
"the",
"given",
"attributePath",
"from",
"the",
"given",
"entry",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/aggregation/impl/AbstractAggregator.java#L85-L95 |
15,302 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java | Invocation.initInvocationTarget | final void initInvocationTarget() throws Exception {
Member previousTargetMember = targetMember;
T target = getInvocationTarget();
if (target == null) {
remote = false;
throw newTargetNullException();
}
targetMember = toTargetMember(target);
if (t... | java | final void initInvocationTarget() throws Exception {
Member previousTargetMember = targetMember;
T target = getInvocationTarget();
if (target == null) {
remote = false;
throw newTargetNullException();
}
targetMember = toTargetMember(target);
if (t... | [
"final",
"void",
"initInvocationTarget",
"(",
")",
"throws",
"Exception",
"{",
"Member",
"previousTargetMember",
"=",
"targetMember",
";",
"T",
"target",
"=",
"getInvocationTarget",
"(",
")",
";",
"if",
"(",
"target",
"==",
"null",
")",
"{",
"remote",
"=",
"... | Initializes the invocation target.
@throws Exception if the initialization was a failure | [
"Initializes",
"the",
"invocation",
"target",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java#L284-L316 |
15,303 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java | Invocation.notifyBackupComplete | void notifyBackupComplete() {
int newBackupAcksCompleted = BACKUP_ACKS_RECEIVED.incrementAndGet(this);
Object pendingResponse = this.pendingResponse;
if (pendingResponse == VOID) {
// no pendingResponse has been set, so we are done since the invocation on the primary needs to comple... | java | void notifyBackupComplete() {
int newBackupAcksCompleted = BACKUP_ACKS_RECEIVED.incrementAndGet(this);
Object pendingResponse = this.pendingResponse;
if (pendingResponse == VOID) {
// no pendingResponse has been set, so we are done since the invocation on the primary needs to comple... | [
"void",
"notifyBackupComplete",
"(",
")",
"{",
"int",
"newBackupAcksCompleted",
"=",
"BACKUP_ACKS_RECEIVED",
".",
"incrementAndGet",
"(",
"this",
")",
";",
"Object",
"pendingResponse",
"=",
"this",
".",
"pendingResponse",
";",
"if",
"(",
"pendingResponse",
"==",
"... | this method can be called concurrently | [
"this",
"method",
"can",
"be",
"called",
"concurrently"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java#L431-L455 |
15,304 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java | Invocation.detectAndHandleTimeout | boolean detectAndHandleTimeout(long heartbeatTimeoutMillis) {
if (skipTimeoutDetection()) {
return false;
}
HeartbeatTimeout heartbeatTimeout = detectTimeout(heartbeatTimeoutMillis);
if (heartbeatTimeout == TIMEOUT) {
complete(HEARTBEAT_TIMEOUT);
re... | java | boolean detectAndHandleTimeout(long heartbeatTimeoutMillis) {
if (skipTimeoutDetection()) {
return false;
}
HeartbeatTimeout heartbeatTimeout = detectTimeout(heartbeatTimeoutMillis);
if (heartbeatTimeout == TIMEOUT) {
complete(HEARTBEAT_TIMEOUT);
re... | [
"boolean",
"detectAndHandleTimeout",
"(",
"long",
"heartbeatTimeoutMillis",
")",
"{",
"if",
"(",
"skipTimeoutDetection",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"HeartbeatTimeout",
"heartbeatTimeout",
"=",
"detectTimeout",
"(",
"heartbeatTimeoutMillis",
")",
... | Checks if this Invocation has received a heartbeat in time.
If the response is already set, or if a heartbeat has been received in time, then {@code false} is returned.
If no heartbeat has been received, then the future.set is called with HEARTBEAT_TIMEOUT and {@code true} is returned.
Gets called from the monitor-th... | [
"Checks",
"if",
"this",
"Invocation",
"has",
"received",
"a",
"heartbeat",
"in",
"time",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java#L467-L480 |
15,305 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java | Invocation.detectAndHandleBackupTimeout | boolean detectAndHandleBackupTimeout(long timeoutMillis) {
// if the backups have completed, we are done; this also filters out all non backup-aware operations
// since the backupsAcksExpected will always be equal to the backupsAcksReceived
boolean backupsCompleted = backupsAcksExpected == backu... | java | boolean detectAndHandleBackupTimeout(long timeoutMillis) {
// if the backups have completed, we are done; this also filters out all non backup-aware operations
// since the backupsAcksExpected will always be equal to the backupsAcksReceived
boolean backupsCompleted = backupsAcksExpected == backu... | [
"boolean",
"detectAndHandleBackupTimeout",
"(",
"long",
"timeoutMillis",
")",
"{",
"// if the backups have completed, we are done; this also filters out all non backup-aware operations",
"// since the backupsAcksExpected will always be equal to the backupsAcksReceived",
"boolean",
"backupsComple... | gets called from the monitor-thread | [
"gets",
"called",
"from",
"the",
"monitor",
"-",
"thread"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/Invocation.java#L520-L559 |
15,306 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/usercodedeployment/UserCodeDeploymentService.java | UserCodeDeploymentService.handleClassNotFoundException | public Class<?> handleClassNotFoundException(String name)
throws ClassNotFoundException {
if (!enabled) {
throw new ClassNotFoundException("User Code Deployment is not enabled. Cannot find class " + name);
}
return locator.handleClassNotFoundException(name);
} | java | public Class<?> handleClassNotFoundException(String name)
throws ClassNotFoundException {
if (!enabled) {
throw new ClassNotFoundException("User Code Deployment is not enabled. Cannot find class " + name);
}
return locator.handleClassNotFoundException(name);
} | [
"public",
"Class",
"<",
"?",
">",
"handleClassNotFoundException",
"(",
"String",
"name",
")",
"throws",
"ClassNotFoundException",
"{",
"if",
"(",
"!",
"enabled",
")",
"{",
"throw",
"new",
"ClassNotFoundException",
"(",
"\"User Code Deployment is not enabled. Cannot find... | called by User Code Deployment classloader on this member | [
"called",
"by",
"User",
"Code",
"Deployment",
"classloader",
"on",
"this",
"member"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/usercodedeployment/UserCodeDeploymentService.java#L84-L90 |
15,307 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/scheduler/SecondsBasedEntryTaskScheduler.java | SecondsBasedEntryTaskScheduler.get | @Override
public ScheduledEntry<K, V> get(K key) {
synchronized (mutex) {
if (scheduleType.equals(ScheduleType.FOR_EACH)) {
return getByCompositeKey(key);
}
Integer second = secondsOfKeys.get(key);
if (second != null) {
Map<Obje... | java | @Override
public ScheduledEntry<K, V> get(K key) {
synchronized (mutex) {
if (scheduleType.equals(ScheduleType.FOR_EACH)) {
return getByCompositeKey(key);
}
Integer second = secondsOfKeys.get(key);
if (second != null) {
Map<Obje... | [
"@",
"Override",
"public",
"ScheduledEntry",
"<",
"K",
",",
"V",
">",
"get",
"(",
"K",
"key",
")",
"{",
"synchronized",
"(",
"mutex",
")",
"{",
"if",
"(",
"scheduleType",
".",
"equals",
"(",
"ScheduleType",
".",
"FOR_EACH",
")",
")",
"{",
"return",
"... | in the case of composite keys this method will return only one scheduled entry with no ordering guarantee | [
"in",
"the",
"case",
"of",
"composite",
"keys",
"this",
"method",
"will",
"return",
"only",
"one",
"scheduled",
"entry",
"with",
"no",
"ordering",
"guarantee"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/scheduler/SecondsBasedEntryTaskScheduler.java#L199-L214 |
15,308 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/quorum/impl/QuorumServiceImpl.java | QuorumServiceImpl.scanQuorums | private void scanQuorums() {
for (QuorumImpl quorum : quorums.values()) {
if (quorum.isHeartbeatAware()) {
this.heartbeatAware = true;
}
if (quorum.isPingAware()) {
this.pingAware = true;
}
}
} | java | private void scanQuorums() {
for (QuorumImpl quorum : quorums.values()) {
if (quorum.isHeartbeatAware()) {
this.heartbeatAware = true;
}
if (quorum.isPingAware()) {
this.pingAware = true;
}
}
} | [
"private",
"void",
"scanQuorums",
"(",
")",
"{",
"for",
"(",
"QuorumImpl",
"quorum",
":",
"quorums",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"quorum",
".",
"isHeartbeatAware",
"(",
")",
")",
"{",
"this",
".",
"heartbeatAware",
"=",
"true",
";",
... | scan quorums for heartbeat-aware and ping-aware implementations and set corresponding flags | [
"scan",
"quorums",
"for",
"heartbeat",
"-",
"aware",
"and",
"ping",
"-",
"aware",
"implementations",
"and",
"set",
"corresponding",
"flags"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/quorum/impl/QuorumServiceImpl.java#L188-L197 |
15,309 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/networking/InboundHandler.java | InboundHandler.initSrcBuffer | protected final void initSrcBuffer(int sizeBytes) {
ChannelOptions config = channel.options();
src = (S) newByteBuffer(sizeBytes, config.getOption(DIRECT_BUF));
} | java | protected final void initSrcBuffer(int sizeBytes) {
ChannelOptions config = channel.options();
src = (S) newByteBuffer(sizeBytes, config.getOption(DIRECT_BUF));
} | [
"protected",
"final",
"void",
"initSrcBuffer",
"(",
"int",
"sizeBytes",
")",
"{",
"ChannelOptions",
"config",
"=",
"channel",
".",
"options",
"(",
")",
";",
"src",
"=",
"(",
"S",
")",
"newByteBuffer",
"(",
"sizeBytes",
",",
"config",
".",
"getOption",
"(",... | Initializes the src buffer. Should only be called by InboundHandler
implementations that have a ByteBuffer as source.
@param sizeBytes the size of the srcBuffer in bytes. | [
"Initializes",
"the",
"src",
"buffer",
".",
"Should",
"only",
"be",
"called",
"by",
"InboundHandler",
"implementations",
"that",
"have",
"a",
"ByteBuffer",
"as",
"source",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/networking/InboundHandler.java#L75-L78 |
15,310 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractCacheService.java | AbstractCacheService.getQuorumName | @Override
public String getQuorumName(String cacheName) {
CacheConfig cacheConfig = getCacheConfig(cacheName);
if (cacheConfig == null) {
return null;
}
return cacheConfig.getQuorumName();
} | java | @Override
public String getQuorumName(String cacheName) {
CacheConfig cacheConfig = getCacheConfig(cacheName);
if (cacheConfig == null) {
return null;
}
return cacheConfig.getQuorumName();
} | [
"@",
"Override",
"public",
"String",
"getQuorumName",
"(",
"String",
"cacheName",
")",
"{",
"CacheConfig",
"cacheConfig",
"=",
"getCacheConfig",
"(",
"cacheName",
")",
";",
"if",
"(",
"cacheConfig",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return... | Gets the name of the quorum associated with specified cache
@param cacheName name of the cache
@return name of the associated quorum
null if there is no associated quorum | [
"Gets",
"the",
"name",
"of",
"the",
"quorum",
"associated",
"with",
"specified",
"cache"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractCacheService.java#L778-L785 |
15,311 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/semaphore/RaftSemaphore.java | RaftSemaphore.acquire | AcquireResult acquire(AcquireInvocationKey key, boolean wait) {
SemaphoreEndpoint endpoint = key.endpoint();
SessionSemaphoreState state = sessionStates.get(key.sessionId());
if (state != null && state.containsInvocation(endpoint.threadId(), key.invocationUid())) {
return new Acquire... | java | AcquireResult acquire(AcquireInvocationKey key, boolean wait) {
SemaphoreEndpoint endpoint = key.endpoint();
SessionSemaphoreState state = sessionStates.get(key.sessionId());
if (state != null && state.containsInvocation(endpoint.threadId(), key.invocationUid())) {
return new Acquire... | [
"AcquireResult",
"acquire",
"(",
"AcquireInvocationKey",
"key",
",",
"boolean",
"wait",
")",
"{",
"SemaphoreEndpoint",
"endpoint",
"=",
"key",
".",
"endpoint",
"(",
")",
";",
"SessionSemaphoreState",
"state",
"=",
"sessionStates",
".",
"get",
"(",
"key",
".",
... | Assigns permits to the endpoint, if sufficient number of permits are
available. If there are no sufficient number of permits and the second
argument is true, a wait key is created and added to the wait queue.
Permits are not assigned if the acquire request is a retry of
a successful acquire request of a session-aware p... | [
"Assigns",
"permits",
"to",
"the",
"endpoint",
"if",
"sufficient",
"number",
"of",
"permits",
"are",
"available",
".",
"If",
"there",
"are",
"no",
"sufficient",
"number",
"of",
"permits",
"and",
"the",
"second",
"argument",
"is",
"true",
"a",
"wait",
"key",
... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/semaphore/RaftSemaphore.java#L100-L120 |
15,312 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/semaphore/RaftSemaphore.java | RaftSemaphore.change | ReleaseResult change(SemaphoreEndpoint endpoint, UUID invocationUid, int permits) {
if (permits == 0) {
return ReleaseResult.failed(Collections.<AcquireInvocationKey>emptyList());
}
Collection<AcquireInvocationKey> cancelled = cancelWaitKeys(endpoint, invocationUid);
long s... | java | ReleaseResult change(SemaphoreEndpoint endpoint, UUID invocationUid, int permits) {
if (permits == 0) {
return ReleaseResult.failed(Collections.<AcquireInvocationKey>emptyList());
}
Collection<AcquireInvocationKey> cancelled = cancelWaitKeys(endpoint, invocationUid);
long s... | [
"ReleaseResult",
"change",
"(",
"SemaphoreEndpoint",
"endpoint",
",",
"UUID",
"invocationUid",
",",
"int",
"permits",
")",
"{",
"if",
"(",
"permits",
"==",
"0",
")",
"{",
"return",
"ReleaseResult",
".",
"failed",
"(",
"Collections",
".",
"<",
"AcquireInvocatio... | Changes the number of permits by adding the given permit value. Permits
are not changed if it is a retry of a previous successful change request
of a session-aware proxy. Permits are changed again if it is a retry of
a successful change request of a sessionless proxy. If number of permits
increase, new assignments can ... | [
"Changes",
"the",
"number",
"of",
"permits",
"by",
"adding",
"the",
"given",
"permit",
"value",
".",
"Permits",
"are",
"not",
"changed",
"if",
"it",
"is",
"a",
"retry",
"of",
"a",
"previous",
"successful",
"change",
"request",
"of",
"a",
"session",
"-",
... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/semaphore/RaftSemaphore.java#L265-L296 |
15,313 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/semaphore/RaftSemaphore.java | RaftSemaphore.onSessionClose | @Override
protected void onSessionClose(long sessionId, Map<Long, Object> responses) {
SessionSemaphoreState state = sessionStates.get(sessionId);
if (state != null) {
// remove the session after release() because release() checks existence of the session
if (state.acquiredPe... | java | @Override
protected void onSessionClose(long sessionId, Map<Long, Object> responses) {
SessionSemaphoreState state = sessionStates.get(sessionId);
if (state != null) {
// remove the session after release() because release() checks existence of the session
if (state.acquiredPe... | [
"@",
"Override",
"protected",
"void",
"onSessionClose",
"(",
"long",
"sessionId",
",",
"Map",
"<",
"Long",
",",
"Object",
">",
"responses",
")",
"{",
"SessionSemaphoreState",
"state",
"=",
"sessionStates",
".",
"get",
"(",
"sessionId",
")",
";",
"if",
"(",
... | Releases permits of the closed session. | [
"Releases",
"permits",
"of",
"the",
"closed",
"session",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/semaphore/RaftSemaphore.java#L301-L317 |
15,314 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/CapacityUtil.java | CapacityUtil.roundCapacity | public static long roundCapacity(long requestedCapacity) {
if (requestedCapacity > MAX_LONG_CAPACITY) {
throw new IllegalArgumentException(requestedCapacity + " is greater than max allowed capacity["
+ MAX_LONG_CAPACITY + "].");
}
return Math.max(MIN_CAPACITY, Qu... | java | public static long roundCapacity(long requestedCapacity) {
if (requestedCapacity > MAX_LONG_CAPACITY) {
throw new IllegalArgumentException(requestedCapacity + " is greater than max allowed capacity["
+ MAX_LONG_CAPACITY + "].");
}
return Math.max(MIN_CAPACITY, Qu... | [
"public",
"static",
"long",
"roundCapacity",
"(",
"long",
"requestedCapacity",
")",
"{",
"if",
"(",
"requestedCapacity",
">",
"MAX_LONG_CAPACITY",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"requestedCapacity",
"+",
"\" is greater than max allowed capacity... | Round the capacity to the next allowed value. | [
"Round",
"the",
"capacity",
"to",
"the",
"next",
"allowed",
"value",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/CapacityUtil.java#L47-L54 |
15,315 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/CapacityUtil.java | CapacityUtil.nextCapacity | public static int nextCapacity(int current) {
assert current > 0 && Long.bitCount(current) == 1 : "Capacity must be a power of two.";
if (current < MIN_CAPACITY / 2) {
current = MIN_CAPACITY / 2;
}
current <<= 1;
if (current < 0) {
throw new RuntimeExcep... | java | public static int nextCapacity(int current) {
assert current > 0 && Long.bitCount(current) == 1 : "Capacity must be a power of two.";
if (current < MIN_CAPACITY / 2) {
current = MIN_CAPACITY / 2;
}
current <<= 1;
if (current < 0) {
throw new RuntimeExcep... | [
"public",
"static",
"int",
"nextCapacity",
"(",
"int",
"current",
")",
"{",
"assert",
"current",
">",
"0",
"&&",
"Long",
".",
"bitCount",
"(",
"current",
")",
"==",
"1",
":",
"\"Capacity must be a power of two.\"",
";",
"if",
"(",
"current",
"<",
"MIN_CAPACI... | Returns the next possible capacity, counting from the current buffers' size. | [
"Returns",
"the",
"next",
"possible",
"capacity",
"counting",
"from",
"the",
"current",
"buffers",
"size",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/CapacityUtil.java#L67-L79 |
15,316 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/flakeidgen/impl/FlakeIdGeneratorProxy.java | FlakeIdGeneratorProxy.getNodeId | int getNodeId(long nanoTime) {
// Check if it is a time to check for updated nodeId. We need to recheck, because if duplicate node ID
// is assigned during a network split, this will be resolved after a cluster merge.
// We throttle the calls to avoid contention due to the lock+unlock call in ge... | java | int getNodeId(long nanoTime) {
// Check if it is a time to check for updated nodeId. We need to recheck, because if duplicate node ID
// is assigned during a network split, this will be resolved after a cluster merge.
// We throttle the calls to avoid contention due to the lock+unlock call in ge... | [
"int",
"getNodeId",
"(",
"long",
"nanoTime",
")",
"{",
"// Check if it is a time to check for updated nodeId. We need to recheck, because if duplicate node ID",
"// is assigned during a network split, this will be resolved after a cluster merge.",
"// We throttle the calls to avoid contention due ... | package-visible for tests | [
"package",
"-",
"visible",
"for",
"tests"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/flakeidgen/impl/FlakeIdGeneratorProxy.java#L216-L246 |
15,317 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/json/internal/JsonSchemaHelper.java | JsonSchemaHelper.createSchema | public static JsonSchemaNode createSchema(JsonParser parser) throws IOException {
JsonSchemaNode dummy = new JsonSchemaStructNode(null);
JsonSchemaStructNode parent = (JsonSchemaStructNode) dummy;
JsonToken currentToken = parser.nextToken();
int nameLocation = -1;
if (currentToke... | java | public static JsonSchemaNode createSchema(JsonParser parser) throws IOException {
JsonSchemaNode dummy = new JsonSchemaStructNode(null);
JsonSchemaStructNode parent = (JsonSchemaStructNode) dummy;
JsonToken currentToken = parser.nextToken();
int nameLocation = -1;
if (currentToke... | [
"public",
"static",
"JsonSchemaNode",
"createSchema",
"(",
"JsonParser",
"parser",
")",
"throws",
"IOException",
"{",
"JsonSchemaNode",
"dummy",
"=",
"new",
"JsonSchemaStructNode",
"(",
"null",
")",
";",
"JsonSchemaStructNode",
"parent",
"=",
"(",
"JsonSchemaStructNod... | Creates a description out of a JsonValue. The parser must be
pointing to the start of the input.
@param parser
@return
@throws IOException | [
"Creates",
"a",
"description",
"out",
"of",
"a",
"JsonValue",
".",
"The",
"parser",
"must",
"be",
"pointing",
"to",
"the",
"start",
"of",
"the",
"input",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/json/internal/JsonSchemaHelper.java#L164-L200 |
15,318 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/config/MergePolicyValidator.java | MergePolicyValidator.checkMapMergePolicyWhenStatisticsAreDisabled | private static void checkMapMergePolicyWhenStatisticsAreDisabled(String mergePolicyClass, List<Class> requiredMergeTypes) {
for (Class<?> requiredMergeType : requiredMergeTypes) {
if (MergingLastStoredTime.class.isAssignableFrom(requiredMergeType)
|| MergingExpirationTime.class.i... | java | private static void checkMapMergePolicyWhenStatisticsAreDisabled(String mergePolicyClass, List<Class> requiredMergeTypes) {
for (Class<?> requiredMergeType : requiredMergeTypes) {
if (MergingLastStoredTime.class.isAssignableFrom(requiredMergeType)
|| MergingExpirationTime.class.i... | [
"private",
"static",
"void",
"checkMapMergePolicyWhenStatisticsAreDisabled",
"(",
"String",
"mergePolicyClass",
",",
"List",
"<",
"Class",
">",
"requiredMergeTypes",
")",
"{",
"for",
"(",
"Class",
"<",
"?",
">",
"requiredMergeType",
":",
"requiredMergeTypes",
")",
"... | Checks if the configured merge policy requires merge types, which are just available if map statistics are enabled.
@param mergePolicyClass the name of the configured merge policy class
@param requiredMergeTypes the required merge types of the configured merge policy | [
"Checks",
"if",
"the",
"configured",
"merge",
"policy",
"requires",
"merge",
"types",
"which",
"are",
"just",
"available",
"if",
"map",
"statistics",
"are",
"enabled",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/config/MergePolicyValidator.java#L164-L173 |
15,319 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/AbstractInvocationFuture.java | AbstractInvocationFuture.unwrap | protected Throwable unwrap(Throwable throwable) {
if (throwable instanceof ExecutionException && throwable.getCause() != null) {
return throwable.getCause();
}
return throwable;
} | java | protected Throwable unwrap(Throwable throwable) {
if (throwable instanceof ExecutionException && throwable.getCause() != null) {
return throwable.getCause();
}
return throwable;
} | [
"protected",
"Throwable",
"unwrap",
"(",
"Throwable",
"throwable",
")",
"{",
"if",
"(",
"throwable",
"instanceof",
"ExecutionException",
"&&",
"throwable",
".",
"getCause",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"throwable",
".",
"getCause",
"(",
")",
"... | this method should not be needed; but there is a difference between client and server how it handles async throwables | [
"this",
"method",
"should",
"not",
"be",
"needed",
";",
"but",
"there",
"is",
"a",
"difference",
"between",
"client",
"and",
"server",
"how",
"it",
"handles",
"async",
"throwables"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/AbstractInvocationFuture.java#L271-L276 |
15,320 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/AbstractInvocationFuture.java | AbstractInvocationFuture.complete | @Override
public final boolean complete(Object value) {
for (; ; ) {
final Object oldState = state;
if (isDone(oldState)) {
warnIfSuspiciousDoubleCompletion(oldState, value);
return false;
}
if (compareAndSetState(oldState, valu... | java | @Override
public final boolean complete(Object value) {
for (; ; ) {
final Object oldState = state;
if (isDone(oldState)) {
warnIfSuspiciousDoubleCompletion(oldState, value);
return false;
}
if (compareAndSetState(oldState, valu... | [
"@",
"Override",
"public",
"final",
"boolean",
"complete",
"(",
"Object",
"value",
")",
"{",
"for",
"(",
";",
";",
")",
"{",
"final",
"Object",
"oldState",
"=",
"state",
";",
"if",
"(",
"isDone",
"(",
"oldState",
")",
")",
"{",
"warnIfSuspiciousDoubleCom... | Can be called multiple times, but only the first answer will lead to the
future getting triggered. All subsequent complete calls are ignored.
@param value The type of response to offer.
@return <tt>true</tt> if offered response, either a final response or an
internal response, is set/applied, <tt>false</tt> otherwise.... | [
"Can",
"be",
"called",
"multiple",
"times",
"but",
"only",
"the",
"first",
"answer",
"will",
"lead",
"to",
"the",
"future",
"getting",
"triggered",
".",
"All",
"subsequent",
"complete",
"calls",
"are",
"ignored",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/AbstractInvocationFuture.java#L366-L380 |
15,321 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/AbstractInvocationFuture.java | AbstractInvocationFuture.warnIfSuspiciousDoubleCompletion | private void warnIfSuspiciousDoubleCompletion(Object s0, Object s1) {
if (s0 != s1 && !(s0 instanceof CancellationException) && !(s1 instanceof CancellationException)) {
logger.warning(String.format("Future.complete(Object) on completed future. "
+ "Request: %s, current v... | java | private void warnIfSuspiciousDoubleCompletion(Object s0, Object s1) {
if (s0 != s1 && !(s0 instanceof CancellationException) && !(s1 instanceof CancellationException)) {
logger.warning(String.format("Future.complete(Object) on completed future. "
+ "Request: %s, current v... | [
"private",
"void",
"warnIfSuspiciousDoubleCompletion",
"(",
"Object",
"s0",
",",
"Object",
"s1",
")",
"{",
"if",
"(",
"s0",
"!=",
"s1",
"&&",
"!",
"(",
"s0",
"instanceof",
"CancellationException",
")",
"&&",
"!",
"(",
"s1",
"instanceof",
"CancellationException... | received a response, but before it cleans up itself, it receives a HazelcastInstanceNotActiveException | [
"received",
"a",
"response",
"but",
"before",
"it",
"cleans",
"up",
"itself",
"it",
"receives",
"a",
"HazelcastInstanceNotActiveException"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/AbstractInvocationFuture.java#L388-L394 |
15,322 | hazelcast/hazelcast | hazelcast-client/src/main/java/com/hazelcast/client/cache/impl/ClientCacheHelper.java | ClientCacheHelper.getCacheConfig | static <K, V> CacheConfig<K, V> getCacheConfig(HazelcastClientInstanceImpl client,
String cacheName, String simpleCacheName) {
ClientMessage request = CacheGetConfigCodec.encodeRequest(cacheName, simpleCacheName);
try {
int partitionId = cli... | java | static <K, V> CacheConfig<K, V> getCacheConfig(HazelcastClientInstanceImpl client,
String cacheName, String simpleCacheName) {
ClientMessage request = CacheGetConfigCodec.encodeRequest(cacheName, simpleCacheName);
try {
int partitionId = cli... | [
"static",
"<",
"K",
",",
"V",
">",
"CacheConfig",
"<",
"K",
",",
"V",
">",
"getCacheConfig",
"(",
"HazelcastClientInstanceImpl",
"client",
",",
"String",
"cacheName",
",",
"String",
"simpleCacheName",
")",
"{",
"ClientMessage",
"request",
"=",
"CacheGetConfigCod... | Gets the cache configuration from the server.
@param client the client instance which will send the operation to server
@param cacheName full cache name with prefixes
@param simpleCacheName pure cache name without any prefix
@param <K> type of the key of the cache
@param <V> type... | [
"Gets",
"the",
"cache",
"configuration",
"from",
"the",
"server",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/cache/impl/ClientCacheHelper.java#L68-L82 |
15,323 | hazelcast/hazelcast | hazelcast-client/src/main/java/com/hazelcast/client/cache/impl/ClientCacheHelper.java | ClientCacheHelper.createCacheConfig | static <K, V> CacheConfig<K, V> createCacheConfig(HazelcastClientInstanceImpl client,
CacheConfig<K, V> newCacheConfig) {
try {
String nameWithPrefix = newCacheConfig.getNameWithPrefix();
int partitionId = client.getClientPartitionSer... | java | static <K, V> CacheConfig<K, V> createCacheConfig(HazelcastClientInstanceImpl client,
CacheConfig<K, V> newCacheConfig) {
try {
String nameWithPrefix = newCacheConfig.getNameWithPrefix();
int partitionId = client.getClientPartitionSer... | [
"static",
"<",
"K",
",",
"V",
">",
"CacheConfig",
"<",
"K",
",",
"V",
">",
"createCacheConfig",
"(",
"HazelcastClientInstanceImpl",
"client",
",",
"CacheConfig",
"<",
"K",
",",
"V",
">",
"newCacheConfig",
")",
"{",
"try",
"{",
"String",
"nameWithPrefix",
"... | Creates a new cache configuration on Hazelcast members.
@param client the client instance which will send the operation to server
@param newCacheConfig the cache configuration to be sent to server
@param <K> type of the key of the cache
@param <V> type of the value of the ... | [
"Creates",
"a",
"new",
"cache",
"configuration",
"on",
"Hazelcast",
"members",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/cache/impl/ClientCacheHelper.java#L114-L132 |
15,324 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.validateAndGetArrayQuantifierFromCurrentToken | static int validateAndGetArrayQuantifierFromCurrentToken(String token, String fullPath) {
String quantifier = extractArgumentsFromAttributeName(token);
if (quantifier == null) {
throw new IllegalArgumentException("Malformed quantifier in " + fullPath);
}
int index = Integer.p... | java | static int validateAndGetArrayQuantifierFromCurrentToken(String token, String fullPath) {
String quantifier = extractArgumentsFromAttributeName(token);
if (quantifier == null) {
throw new IllegalArgumentException("Malformed quantifier in " + fullPath);
}
int index = Integer.p... | [
"static",
"int",
"validateAndGetArrayQuantifierFromCurrentToken",
"(",
"String",
"token",
",",
"String",
"fullPath",
")",
"{",
"String",
"quantifier",
"=",
"extractArgumentsFromAttributeName",
"(",
"token",
")",
";",
"if",
"(",
"quantifier",
"==",
"null",
")",
"{",
... | Extracts and validates the quantifier from the given path token
@param token token from which the quantifier is retrieved
@param fullPath fullPath to which the token belongs - just for output
@return validated quantifier | [
"Extracts",
"and",
"validates",
"the",
"quantifier",
"from",
"the",
"given",
"path",
"token"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L44-L54 |
15,325 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.getPortableArrayCellPosition | static int getPortableArrayCellPosition(BufferObjectDataInput in, int streamPosition, int cellIndex)
throws IOException {
return in.readInt(streamPosition + cellIndex * Bits.INT_SIZE_IN_BYTES);
} | java | static int getPortableArrayCellPosition(BufferObjectDataInput in, int streamPosition, int cellIndex)
throws IOException {
return in.readInt(streamPosition + cellIndex * Bits.INT_SIZE_IN_BYTES);
} | [
"static",
"int",
"getPortableArrayCellPosition",
"(",
"BufferObjectDataInput",
"in",
",",
"int",
"streamPosition",
",",
"int",
"cellIndex",
")",
"throws",
"IOException",
"{",
"return",
"in",
".",
"readInt",
"(",
"streamPosition",
"+",
"cellIndex",
"*",
"Bits",
"."... | Calculates and reads the position of the Portable object stored in a Portable array under the given index.
@param in data input stream
@param streamPosition streamPosition to begin the reading from
@param cellIndex index of the cell
@return the position of the given portable object in the stream
@thro... | [
"Calculates",
"and",
"reads",
"the",
"position",
"of",
"the",
"Portable",
"object",
"stored",
"in",
"a",
"Portable",
"array",
"under",
"the",
"given",
"index",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L65-L68 |
15,326 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.getStreamPositionOfTheField | static int getStreamPositionOfTheField(FieldDefinition fd, BufferObjectDataInput in, int offset) throws IOException {
int pos = in.readInt(offset + fd.getIndex() * Bits.INT_SIZE_IN_BYTES);
short len = in.readShort(pos);
// name + len + type
return pos + Bits.SHORT_SIZE_IN_BYTES + len + 1... | java | static int getStreamPositionOfTheField(FieldDefinition fd, BufferObjectDataInput in, int offset) throws IOException {
int pos = in.readInt(offset + fd.getIndex() * Bits.INT_SIZE_IN_BYTES);
short len = in.readShort(pos);
// name + len + type
return pos + Bits.SHORT_SIZE_IN_BYTES + len + 1... | [
"static",
"int",
"getStreamPositionOfTheField",
"(",
"FieldDefinition",
"fd",
",",
"BufferObjectDataInput",
"in",
",",
"int",
"offset",
")",
"throws",
"IOException",
"{",
"int",
"pos",
"=",
"in",
".",
"readInt",
"(",
"offset",
"+",
"fd",
".",
"getIndex",
"(",
... | Calculates the position of the given field in the portable byte stream
@param fd given field definition
@param in data input stream
@param offset offset to use while stream reading
@return position of the given field
@throws IOException on any stream errors | [
"Calculates",
"the",
"position",
"of",
"the",
"given",
"field",
"in",
"the",
"portable",
"byte",
"stream"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L79-L84 |
15,327 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.getArrayLengthOfTheField | static int getArrayLengthOfTheField(FieldDefinition fd, BufferObjectDataInput in, int offset) throws IOException {
int originalPos = in.position();
try {
int pos = getStreamPositionOfTheField(fd, in, offset);
in.position(pos);
return in.readInt();
} finally {
... | java | static int getArrayLengthOfTheField(FieldDefinition fd, BufferObjectDataInput in, int offset) throws IOException {
int originalPos = in.position();
try {
int pos = getStreamPositionOfTheField(fd, in, offset);
in.position(pos);
return in.readInt();
} finally {
... | [
"static",
"int",
"getArrayLengthOfTheField",
"(",
"FieldDefinition",
"fd",
",",
"BufferObjectDataInput",
"in",
",",
"int",
"offset",
")",
"throws",
"IOException",
"{",
"int",
"originalPos",
"=",
"in",
".",
"position",
"(",
")",
";",
"try",
"{",
"int",
"pos",
... | Reads the length of the given array.
It does not validate if the current position is actually an array - has to be taken care of by the caller.
@param fd field of the array
@param in data input stream
@param offset offset to use while stream reading
@return length of the array
@throws IOException on any stream... | [
"Reads",
"the",
"length",
"of",
"the",
"given",
"array",
".",
"It",
"does",
"not",
"validate",
"if",
"the",
"current",
"position",
"is",
"actually",
"an",
"array",
"-",
"has",
"to",
"be",
"taken",
"care",
"of",
"by",
"the",
"caller",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L96-L105 |
15,328 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java | PortableUtils.validateFactoryAndClass | static void validateFactoryAndClass(FieldDefinition fd, int factoryId, int classId, String fullPath) {
if (factoryId != fd.getFactoryId()) {
throw new IllegalArgumentException("Invalid factoryId! Expected: "
+ fd.getFactoryId() + ", Current: " + factoryId + " in path " + fullPath... | java | static void validateFactoryAndClass(FieldDefinition fd, int factoryId, int classId, String fullPath) {
if (factoryId != fd.getFactoryId()) {
throw new IllegalArgumentException("Invalid factoryId! Expected: "
+ fd.getFactoryId() + ", Current: " + factoryId + " in path " + fullPath... | [
"static",
"void",
"validateFactoryAndClass",
"(",
"FieldDefinition",
"fd",
",",
"int",
"factoryId",
",",
"int",
"classId",
",",
"String",
"fullPath",
")",
"{",
"if",
"(",
"factoryId",
"!=",
"fd",
".",
"getFactoryId",
"(",
")",
")",
"{",
"throw",
"new",
"Il... | Validates if the given factoryId and classId match the ones from the fieldDefinition
@param fd given fieldDefinition to validate against
@param factoryId given factoryId to validate
@param classId given factoryId to validate
@param fullPath full path - just for output | [
"Validates",
"if",
"the",
"given",
"factoryId",
"and",
"classId",
"match",
"the",
"ones",
"from",
"the",
"fieldDefinition"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableUtils.java#L168-L177 |
15,329 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/AliasedDiscoveryConfigUtils.java | AliasedDiscoveryConfigUtils.map | public static List<DiscoveryStrategyConfig> map(List<AliasedDiscoveryConfig<?>> aliasedDiscoveryConfigs) {
List<DiscoveryStrategyConfig> result = new ArrayList<DiscoveryStrategyConfig>();
for (AliasedDiscoveryConfig config : aliasedDiscoveryConfigs) {
if (config.isEnabled()) {
... | java | public static List<DiscoveryStrategyConfig> map(List<AliasedDiscoveryConfig<?>> aliasedDiscoveryConfigs) {
List<DiscoveryStrategyConfig> result = new ArrayList<DiscoveryStrategyConfig>();
for (AliasedDiscoveryConfig config : aliasedDiscoveryConfigs) {
if (config.isEnabled()) {
... | [
"public",
"static",
"List",
"<",
"DiscoveryStrategyConfig",
">",
"map",
"(",
"List",
"<",
"AliasedDiscoveryConfig",
"<",
"?",
">",
">",
"aliasedDiscoveryConfigs",
")",
"{",
"List",
"<",
"DiscoveryStrategyConfig",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"Dis... | Maps aliased discovery strategy configs into discovery strategy configs. | [
"Maps",
"aliased",
"discovery",
"strategy",
"configs",
"into",
"discovery",
"strategy",
"configs",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/AliasedDiscoveryConfigUtils.java#L74-L82 |
15,330 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/JoinConfig.java | JoinConfig.verify | @SuppressWarnings("checkstyle:npathcomplexity")
public void verify() {
int countEnabled = 0;
if (getTcpIpConfig().isEnabled()) {
countEnabled++;
}
if (getMulticastConfig().isEnabled()) {
countEnabled++;
}
if (getAwsConfig().isEnabled()) {
... | java | @SuppressWarnings("checkstyle:npathcomplexity")
public void verify() {
int countEnabled = 0;
if (getTcpIpConfig().isEnabled()) {
countEnabled++;
}
if (getMulticastConfig().isEnabled()) {
countEnabled++;
}
if (getAwsConfig().isEnabled()) {
... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:npathcomplexity\"",
")",
"public",
"void",
"verify",
"(",
")",
"{",
"int",
"countEnabled",
"=",
"0",
";",
"if",
"(",
"getTcpIpConfig",
"(",
")",
".",
"isEnabled",
"(",
")",
")",
"{",
"countEnabled",
"++",
";",
"}... | Verifies this JoinConfig is valid. At most a single joiner should be active.
@throws IllegalStateException when the join config is not valid | [
"Verifies",
"this",
"JoinConfig",
"is",
"valid",
".",
"At",
"most",
"a",
"single",
"joiner",
"should",
"be",
"active",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/JoinConfig.java#L181-L212 |
15,331 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/JoinConfig.java | JoinConfig.verifyDiscoveryProviderConfig | private void verifyDiscoveryProviderConfig() {
Collection<DiscoveryStrategyConfig> discoveryStrategyConfigs = discoveryConfig.getDiscoveryStrategyConfigs();
if (discoveryStrategyConfigs.size() > 0) {
if (getMulticastConfig().isEnabled()) {
throw new InvalidConfigurationExcept... | java | private void verifyDiscoveryProviderConfig() {
Collection<DiscoveryStrategyConfig> discoveryStrategyConfigs = discoveryConfig.getDiscoveryStrategyConfigs();
if (discoveryStrategyConfigs.size() > 0) {
if (getMulticastConfig().isEnabled()) {
throw new InvalidConfigurationExcept... | [
"private",
"void",
"verifyDiscoveryProviderConfig",
"(",
")",
"{",
"Collection",
"<",
"DiscoveryStrategyConfig",
">",
"discoveryStrategyConfigs",
"=",
"discoveryConfig",
".",
"getDiscoveryStrategyConfigs",
"(",
")",
";",
"if",
"(",
"discoveryStrategyConfigs",
".",
"size",... | Verifies this JoinConfig is valid. When Discovery SPI enabled other discovery
methods should be disabled
@throws IllegalStateException when the join config is not valid | [
"Verifies",
"this",
"JoinConfig",
"is",
"valid",
".",
"When",
"Discovery",
"SPI",
"enabled",
"other",
"discovery",
"methods",
"should",
"be",
"disabled"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/JoinConfig.java#L220-L228 |
15,332 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/MapServiceContextImpl.java | MapServiceContextImpl.removeAllRecordStoresOfAllMaps | protected void removeAllRecordStoresOfAllMaps(boolean onShutdown, boolean onRecordStoreDestroy) {
for (PartitionContainer partitionContainer : partitionContainers) {
if (partitionContainer != null) {
removeRecordStoresFromPartitionMatchingWith(allRecordStores(),
... | java | protected void removeAllRecordStoresOfAllMaps(boolean onShutdown, boolean onRecordStoreDestroy) {
for (PartitionContainer partitionContainer : partitionContainers) {
if (partitionContainer != null) {
removeRecordStoresFromPartitionMatchingWith(allRecordStores(),
... | [
"protected",
"void",
"removeAllRecordStoresOfAllMaps",
"(",
"boolean",
"onShutdown",
",",
"boolean",
"onRecordStoreDestroy",
")",
"{",
"for",
"(",
"PartitionContainer",
"partitionContainer",
":",
"partitionContainers",
")",
"{",
"if",
"(",
"partitionContainer",
"!=",
"n... | Removes all record stores from all partitions.
Calls {@link #removeRecordStoresFromPartitionMatchingWith} internally and
@param onShutdown {@code true} if this method is called during map service shutdown,
otherwise set {@code false}
@param onRecordStoreDestroy {@code true} if this method is called during t... | [
"Removes",
"all",
"record",
"stores",
"from",
"all",
"partitions",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapServiceContextImpl.java#L314-L321 |
15,333 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/MXBeanUtil.java | MXBeanUtil.unregisterCacheObject | public static void unregisterCacheObject(String cacheManagerName, String name, boolean stats) {
synchronized (mBeanServer) {
ObjectName objectName = calculateObjectName(cacheManagerName, name, stats);
Set<ObjectName> registeredObjectNames = mBeanServer.queryNames(objectName, null);
... | java | public static void unregisterCacheObject(String cacheManagerName, String name, boolean stats) {
synchronized (mBeanServer) {
ObjectName objectName = calculateObjectName(cacheManagerName, name, stats);
Set<ObjectName> registeredObjectNames = mBeanServer.queryNames(objectName, null);
... | [
"public",
"static",
"void",
"unregisterCacheObject",
"(",
"String",
"cacheManagerName",
",",
"String",
"name",
",",
"boolean",
"stats",
")",
"{",
"synchronized",
"(",
"mBeanServer",
")",
"{",
"ObjectName",
"objectName",
"=",
"calculateObjectName",
"(",
"cacheManager... | UnRegisters the mxbean if registered already.
@param cacheManagerName name generated by URI and classloader.
@param name cache name.
@param stats is mxbean, a statistics mxbean. | [
"UnRegisters",
"the",
"mxbean",
"if",
"registered",
"already",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/MXBeanUtil.java#L79-L99 |
15,334 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/client/impl/protocol/util/MessageFlyweight.java | MessageFlyweight.set | public MessageFlyweight set(boolean value) {
buffer.putByte(index + offset, (byte) (value ? 1 : 0));
index += Bits.BYTE_SIZE_IN_BYTES;
return this;
} | java | public MessageFlyweight set(boolean value) {
buffer.putByte(index + offset, (byte) (value ? 1 : 0));
index += Bits.BYTE_SIZE_IN_BYTES;
return this;
} | [
"public",
"MessageFlyweight",
"set",
"(",
"boolean",
"value",
")",
"{",
"buffer",
".",
"putByte",
"(",
"index",
"+",
"offset",
",",
"(",
"byte",
")",
"(",
"value",
"?",
"1",
":",
"0",
")",
")",
";",
"index",
"+=",
"Bits",
".",
"BYTE_SIZE_IN_BYTES",
"... | region SET Overloads | [
"region",
"SET",
"Overloads"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/client/impl/protocol/util/MessageFlyweight.java#L76-L80 |
15,335 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/client/impl/protocol/util/MessageFlyweight.java | MessageFlyweight.getBoolean | public boolean getBoolean() {
byte result = buffer.getByte(index + offset);
index += Bits.BYTE_SIZE_IN_BYTES;
return result != 0;
} | java | public boolean getBoolean() {
byte result = buffer.getByte(index + offset);
index += Bits.BYTE_SIZE_IN_BYTES;
return result != 0;
} | [
"public",
"boolean",
"getBoolean",
"(",
")",
"{",
"byte",
"result",
"=",
"buffer",
".",
"getByte",
"(",
"index",
"+",
"offset",
")",
";",
"index",
"+=",
"Bits",
".",
"BYTE_SIZE_IN_BYTES",
";",
"return",
"result",
"!=",
"0",
";",
"}"
] | region GET Overloads | [
"region",
"GET",
"Overloads"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/client/impl/protocol/util/MessageFlyweight.java#L137-L141 |
15,336 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/OperatingSystemMXBeanSupport.java | OperatingSystemMXBeanSupport.readLongAttribute | public static long readLongAttribute(String attributeName, long defaultValue) {
try {
String methodName = "get" + attributeName;
OperatingSystemMXBean systemMXBean = OPERATING_SYSTEM_MX_BEAN;
Method method = systemMXBean.getClass().getMethod(methodName);
method.se... | java | public static long readLongAttribute(String attributeName, long defaultValue) {
try {
String methodName = "get" + attributeName;
OperatingSystemMXBean systemMXBean = OPERATING_SYSTEM_MX_BEAN;
Method method = systemMXBean.getClass().getMethod(methodName);
method.se... | [
"public",
"static",
"long",
"readLongAttribute",
"(",
"String",
"attributeName",
",",
"long",
"defaultValue",
")",
"{",
"try",
"{",
"String",
"methodName",
"=",
"\"get\"",
"+",
"attributeName",
";",
"OperatingSystemMXBean",
"systemMXBean",
"=",
"OPERATING_SYSTEM_MX_BE... | Reads a long attribute from OperatingSystemMXBean.
@param attributeName name of the attribute
@param defaultValue default value if the attribute value is null
@return value of the attribute | [
"Reads",
"a",
"long",
"attribute",
"from",
"OperatingSystemMXBean",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/OperatingSystemMXBeanSupport.java#L43-L74 |
15,337 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java | MigrationManager.addCompletedMigration | boolean addCompletedMigration(MigrationInfo migrationInfo) {
if (migrationInfo.getStatus() != MigrationStatus.SUCCESS
&& migrationInfo.getStatus() != MigrationStatus.FAILED) {
throw new IllegalArgumentException("Migration doesn't seem completed: " + migrationInfo);
}
... | java | boolean addCompletedMigration(MigrationInfo migrationInfo) {
if (migrationInfo.getStatus() != MigrationStatus.SUCCESS
&& migrationInfo.getStatus() != MigrationStatus.FAILED) {
throw new IllegalArgumentException("Migration doesn't seem completed: " + migrationInfo);
}
... | [
"boolean",
"addCompletedMigration",
"(",
"MigrationInfo",
"migrationInfo",
")",
"{",
"if",
"(",
"migrationInfo",
".",
"getStatus",
"(",
")",
"!=",
"MigrationStatus",
".",
"SUCCESS",
"&&",
"migrationInfo",
".",
"getStatus",
"(",
")",
"!=",
"MigrationStatus",
".",
... | Adds the migration to the set of completed migrations and increases the completed migration counter.
Acquires the partition service lock to update the migrations.
@param migrationInfo the completed migration
@return {@code true} if the migration has been added or {@code false} if this migration is already in the compl... | [
"Adds",
"the",
"migration",
"to",
"the",
"set",
"of",
"completed",
"migrations",
"and",
"increases",
"the",
"completed",
"migration",
"counter",
".",
"Acquires",
"the",
"partition",
"service",
"lock",
"to",
"update",
"the",
"migrations",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java#L432-L452 |
15,338 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java | MigrationManager.evictCompletedMigrations | private void evictCompletedMigrations(Collection<MigrationInfo> migrations) {
partitionServiceLock.lock();
try {
completedMigrations.removeAll(migrations);
} finally {
partitionServiceLock.unlock();
}
} | java | private void evictCompletedMigrations(Collection<MigrationInfo> migrations) {
partitionServiceLock.lock();
try {
completedMigrations.removeAll(migrations);
} finally {
partitionServiceLock.unlock();
}
} | [
"private",
"void",
"evictCompletedMigrations",
"(",
"Collection",
"<",
"MigrationInfo",
">",
"migrations",
")",
"{",
"partitionServiceLock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"completedMigrations",
".",
"removeAll",
"(",
"migrations",
")",
";",
"}",
"final... | Evicts completed migrations from the list
@param migrations completed migrations to evict | [
"Evicts",
"completed",
"migrations",
"from",
"the",
"list"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java#L469-L476 |
15,339 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java | MigrationManager.triggerControlTask | void triggerControlTask() {
migrationQueue.clear();
if (!node.getClusterService().isJoined()) {
logger.fine("Node is not joined, will not trigger ControlTask");
return;
}
if (!node.isMaster()) {
logger.fine("Node is not master, will not trigger Control... | java | void triggerControlTask() {
migrationQueue.clear();
if (!node.getClusterService().isJoined()) {
logger.fine("Node is not joined, will not trigger ControlTask");
return;
}
if (!node.isMaster()) {
logger.fine("Node is not master, will not trigger Control... | [
"void",
"triggerControlTask",
"(",
")",
"{",
"migrationQueue",
".",
"clear",
"(",
")",
";",
"if",
"(",
"!",
"node",
".",
"getClusterService",
"(",
")",
".",
"isJoined",
"(",
")",
")",
"{",
"logger",
".",
"fine",
"(",
"\"Node is not joined, will not trigger C... | Clears the migration queue and triggers the control task. Called on the master node. | [
"Clears",
"the",
"migration",
"queue",
"and",
"triggers",
"the",
"control",
"task",
".",
"Called",
"on",
"the",
"master",
"node",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java#L479-L493 |
15,340 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java | MigrationManager.applyMigration | void applyMigration(InternalPartitionImpl partition, MigrationInfo migrationInfo) {
final PartitionReplica[] members = Arrays.copyOf(partition.getReplicas(), InternalPartition.MAX_REPLICA_COUNT);
if (migrationInfo.getSourceCurrentReplicaIndex() > -1) {
members[migrationInfo.getSourceCurrentR... | java | void applyMigration(InternalPartitionImpl partition, MigrationInfo migrationInfo) {
final PartitionReplica[] members = Arrays.copyOf(partition.getReplicas(), InternalPartition.MAX_REPLICA_COUNT);
if (migrationInfo.getSourceCurrentReplicaIndex() > -1) {
members[migrationInfo.getSourceCurrentR... | [
"void",
"applyMigration",
"(",
"InternalPartitionImpl",
"partition",
",",
"MigrationInfo",
"migrationInfo",
")",
"{",
"final",
"PartitionReplica",
"[",
"]",
"members",
"=",
"Arrays",
".",
"copyOf",
"(",
"partition",
".",
"getReplicas",
"(",
")",
",",
"InternalPart... | Mutates the partition state and applies the migration. | [
"Mutates",
"the",
"partition",
"state",
"and",
"applies",
"the",
"migration",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/MigrationManager.java#L580-L593 |
15,341 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/networking/nio/SelectorOptimizer.java | SelectorOptimizer.newSelector | static Selector newSelector(ILogger logger) {
checkNotNull(logger, "logger");
Selector selector;
try {
selector = Selector.open();
} catch (IOException e) {
throw new HazelcastException("Failed to open a Selector", e);
}
boolean optimize = Boolea... | java | static Selector newSelector(ILogger logger) {
checkNotNull(logger, "logger");
Selector selector;
try {
selector = Selector.open();
} catch (IOException e) {
throw new HazelcastException("Failed to open a Selector", e);
}
boolean optimize = Boolea... | [
"static",
"Selector",
"newSelector",
"(",
"ILogger",
"logger",
")",
"{",
"checkNotNull",
"(",
"logger",
",",
"\"logger\"",
")",
";",
"Selector",
"selector",
";",
"try",
"{",
"selector",
"=",
"Selector",
".",
"open",
"(",
")",
";",
"}",
"catch",
"(",
"IOE... | Creates a new Selector and will optimize it if possible.
@param logger the logger used for the optimization process.
@return the created Selector.
@throws NullPointerException if logger is null. | [
"Creates",
"a",
"new",
"Selector",
"and",
"will",
"optimize",
"it",
"if",
"possible",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/networking/nio/SelectorOptimizer.java#L55-L70 |
15,342 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/networking/nio/SelectorOptimizer.java | SelectorOptimizer.optimize | static SelectionKeysSet optimize(Selector selector, ILogger logger) {
checkNotNull(selector, "selector");
checkNotNull(logger, "logger");
try {
SelectionKeysSet set = new SelectionKeysSet();
Class<?> selectorImplClass = findOptimizableSelectorClass(selector);
... | java | static SelectionKeysSet optimize(Selector selector, ILogger logger) {
checkNotNull(selector, "selector");
checkNotNull(logger, "logger");
try {
SelectionKeysSet set = new SelectionKeysSet();
Class<?> selectorImplClass = findOptimizableSelectorClass(selector);
... | [
"static",
"SelectionKeysSet",
"optimize",
"(",
"Selector",
"selector",
",",
"ILogger",
"logger",
")",
"{",
"checkNotNull",
"(",
"selector",
",",
"\"selector\"",
")",
";",
"checkNotNull",
"(",
"logger",
",",
"\"logger\"",
")",
";",
"try",
"{",
"SelectionKeysSet",... | Tries to optimize the provided Selector.
@param selector the selector to optimize
@return an FastSelectionKeySet if the optimization was a success, null otherwise.
@throws NullPointerException if selector or logger is null. | [
"Tries",
"to",
"optimize",
"the",
"provided",
"Selector",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/networking/nio/SelectorOptimizer.java#L79-L108 |
15,343 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/DefaultQueryCache.java | DefaultQueryCache.isTryRecoverSucceeded | private boolean isTryRecoverSucceeded(ConcurrentMap<Integer, Long> brokenSequences) {
int numberOfBrokenSequences = brokenSequences.size();
InvokerWrapper invokerWrapper = context.getInvokerWrapper();
SubscriberContext subscriberContext = context.getSubscriberContext();
SubscriberContext... | java | private boolean isTryRecoverSucceeded(ConcurrentMap<Integer, Long> brokenSequences) {
int numberOfBrokenSequences = brokenSequences.size();
InvokerWrapper invokerWrapper = context.getInvokerWrapper();
SubscriberContext subscriberContext = context.getSubscriberContext();
SubscriberContext... | [
"private",
"boolean",
"isTryRecoverSucceeded",
"(",
"ConcurrentMap",
"<",
"Integer",
",",
"Long",
">",
"brokenSequences",
")",
"{",
"int",
"numberOfBrokenSequences",
"=",
"brokenSequences",
".",
"size",
"(",
")",
";",
"InvokerWrapper",
"invokerWrapper",
"=",
"contex... | This tries to reset cursor position of the accumulator to the supplied sequence,
if that sequence is still there, it will be succeeded, otherwise query cache content stays inconsistent. | [
"This",
"tries",
"to",
"reset",
"cursor",
"position",
"of",
"the",
"accumulator",
"to",
"the",
"supplied",
"sequence",
"if",
"that",
"sequence",
"is",
"still",
"there",
"it",
"will",
"be",
"succeeded",
"otherwise",
"query",
"cache",
"content",
"stays",
"incons... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/DefaultQueryCache.java#L146-L173 |
15,344 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/cluster/fd/PhiAccrualFailureDetector.java | PhiAccrualFailureDetector.firstHeartbeat | @SuppressWarnings("checkstyle:magicnumber")
private void firstHeartbeat(long firstHeartbeatEstimateMillis) {
long stdDeviationMillis = firstHeartbeatEstimateMillis / 4;
heartbeatHistory.add(firstHeartbeatEstimateMillis - stdDeviationMillis);
heartbeatHistory.add(firstHeartbeatEstimateMillis ... | java | @SuppressWarnings("checkstyle:magicnumber")
private void firstHeartbeat(long firstHeartbeatEstimateMillis) {
long stdDeviationMillis = firstHeartbeatEstimateMillis / 4;
heartbeatHistory.add(firstHeartbeatEstimateMillis - stdDeviationMillis);
heartbeatHistory.add(firstHeartbeatEstimateMillis ... | [
"@",
"SuppressWarnings",
"(",
"\"checkstyle:magicnumber\"",
")",
"private",
"void",
"firstHeartbeat",
"(",
"long",
"firstHeartbeatEstimateMillis",
")",
"{",
"long",
"stdDeviationMillis",
"=",
"firstHeartbeatEstimateMillis",
"/",
"4",
";",
"heartbeatHistory",
".",
"add",
... | bootstrap with 2 entries with rather high standard deviation | [
"bootstrap",
"with",
"2",
"entries",
"with",
"rather",
"high",
"standard",
"deviation"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/fd/PhiAccrualFailureDetector.java#L92-L97 |
15,345 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/cluster/fd/PhiAccrualFailureDetector.java | PhiAccrualFailureDetector.phi | private double phi(long timestampMillis) {
long timeDiffMillis;
double meanMillis;
double stdDeviationMillis;
synchronized (heartbeatHistory) {
long lastTimestampMillis = lastHeartbeatMillis;
if (lastTimestampMillis == NO_HEARTBEAT_TIMESTAMP) {
re... | java | private double phi(long timestampMillis) {
long timeDiffMillis;
double meanMillis;
double stdDeviationMillis;
synchronized (heartbeatHistory) {
long lastTimestampMillis = lastHeartbeatMillis;
if (lastTimestampMillis == NO_HEARTBEAT_TIMESTAMP) {
re... | [
"private",
"double",
"phi",
"(",
"long",
"timestampMillis",
")",
"{",
"long",
"timeDiffMillis",
";",
"double",
"meanMillis",
";",
"double",
"stdDeviationMillis",
";",
"synchronized",
"(",
"heartbeatHistory",
")",
"{",
"long",
"lastTimestampMillis",
"=",
"lastHeartbe... | The suspicion level of the accrual failure detector.
If a connection does not have any records in failure detector then it is
considered healthy. | [
"The",
"suspicion",
"level",
"of",
"the",
"accrual",
"failure",
"detector",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/fd/PhiAccrualFailureDetector.java#L109-L126 |
15,346 | hazelcast/hazelcast | hazelcast-build-utils/src/main/java/com/hazelcast/buildutils/ElementParser.java | ElementParser.parseDelimitedString | public static List<String> parseDelimitedString(String value, char delimiter, boolean trim) {
if (value == null) {
value = "";
}
List<String> list = new ArrayList<String>();
StringBuilder sb = new StringBuilder();
int expecting = (CHAR | DELIMITER | START_QUOTE);
... | java | public static List<String> parseDelimitedString(String value, char delimiter, boolean trim) {
if (value == null) {
value = "";
}
List<String> list = new ArrayList<String>();
StringBuilder sb = new StringBuilder();
int expecting = (CHAR | DELIMITER | START_QUOTE);
... | [
"public",
"static",
"List",
"<",
"String",
">",
"parseDelimitedString",
"(",
"String",
"value",
",",
"char",
"delimiter",
",",
"boolean",
"trim",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"value",
"=",
"\"\"",
";",
"}",
"List",
"<",
"String... | Parses delimited string and returns an array containing the tokens. This parser obeys quotes, so the delimiter character
will be ignored if it is inside of a quote. This method assumes that the quote character is not included in the set of
delimiter characters.
@param value the delimited string to parse.
@param de... | [
"Parses",
"delimited",
"string",
"and",
"returns",
"an",
"array",
"containing",
"the",
"tokens",
".",
"This",
"parser",
"obeys",
"quotes",
"so",
"the",
"delimiter",
"character",
"will",
"be",
"ignored",
"if",
"it",
"is",
"inside",
"of",
"a",
"quote",
".",
... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-build-utils/src/main/java/com/hazelcast/buildutils/ElementParser.java#L53-L92 |
15,347 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateResults | public static void validateResults(Map<Integer, Object> results) {
for (Object result : results.values()) {
if (result != null && result instanceof CacheClearResponse) {
Object response = ((CacheClearResponse) result).getResponse();
if (response instanceof Throwable) ... | java | public static void validateResults(Map<Integer, Object> results) {
for (Object result : results.values()) {
if (result != null && result instanceof CacheClearResponse) {
Object response = ((CacheClearResponse) result).getResponse();
if (response instanceof Throwable) ... | [
"public",
"static",
"void",
"validateResults",
"(",
"Map",
"<",
"Integer",
",",
"Object",
">",
"results",
")",
"{",
"for",
"(",
"Object",
"result",
":",
"results",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"result",
"!=",
"null",
"&&",
"result",
... | Cache clear response validator, loop on results to validate that no exception exists on the result map.
Throws the first exception in the map.
@param results map of {@link CacheClearResponse}. | [
"Cache",
"clear",
"response",
"validator",
"loop",
"on",
"results",
"to",
"validate",
"that",
"no",
"exception",
"exists",
"on",
"the",
"result",
"map",
".",
"Throws",
"the",
"first",
"exception",
"in",
"the",
"map",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L52-L61 |
15,348 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateNotNull | public static <K, V> void validateNotNull(K key, V value) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
checkNotNull(value, NULL_VALUE_IS_NOT_ALLOWED);
} | java | public static <K, V> void validateNotNull(K key, V value) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
checkNotNull(value, NULL_VALUE_IS_NOT_ALLOWED);
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"void",
"validateNotNull",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"checkNotNull",
"(",
"key",
",",
"NULL_KEY_IS_NOT_ALLOWED",
")",
";",
"checkNotNull",
"(",
"value",
",",
"NULL_VALUE_IS_NOT_ALLOWED",
")",
... | Validates that key, value pair are both not null.
@param key the key to be validated.
@param <K> the type of key.
@param value the value to be validated.
@param <V> the type of value.
@throws java.lang.NullPointerException if key or value is null. | [
"Validates",
"that",
"key",
"value",
"pair",
"are",
"both",
"not",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L87-L90 |
15,349 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateNotNull | public static <K, V> void validateNotNull(K key, V value1, V value2) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
checkNotNull(value1, NULL_VALUE_IS_NOT_ALLOWED);
checkNotNull(value2, NULL_VALUE_IS_NOT_ALLOWED);
} | java | public static <K, V> void validateNotNull(K key, V value1, V value2) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
checkNotNull(value1, NULL_VALUE_IS_NOT_ALLOWED);
checkNotNull(value2, NULL_VALUE_IS_NOT_ALLOWED);
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"void",
"validateNotNull",
"(",
"K",
"key",
",",
"V",
"value1",
",",
"V",
"value2",
")",
"{",
"checkNotNull",
"(",
"key",
",",
"NULL_KEY_IS_NOT_ALLOWED",
")",
";",
"checkNotNull",
"(",
"value1",
",",
"NULL_VAL... | Validates that key and multi values are not null.
@param key the key to be validated.
@param value1 first value to be validated.
@param value2 second value to be validated.
@param <K> the type of key.
@param <V> the type of value.
@throws java.lang.NullPointerException if key or any value is null. | [
"Validates",
"that",
"key",
"and",
"multi",
"values",
"are",
"not",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L102-L106 |
15,350 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateNotNull | public static <K, V> void validateNotNull(Map<? extends K, ? extends V> map) {
checkNotNull(map, "map is null");
boolean containsNullKey = false;
boolean containsNullValue = false;
// we catch possible NPE since the Map implementation could not support null values
// TODO: is it... | java | public static <K, V> void validateNotNull(Map<? extends K, ? extends V> map) {
checkNotNull(map, "map is null");
boolean containsNullKey = false;
boolean containsNullValue = false;
// we catch possible NPE since the Map implementation could not support null values
// TODO: is it... | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"void",
"validateNotNull",
"(",
"Map",
"<",
"?",
"extends",
"K",
",",
"?",
"extends",
"V",
">",
"map",
")",
"{",
"checkNotNull",
"(",
"map",
",",
"\"map is null\"",
")",
";",
"boolean",
"containsNullKey",
"=... | This validator ensures that no key or value is null in the provided map.
@param map the map to be validated.
@param <K> the type of key.
@param <V> the type of value.
@throws java.lang.NullPointerException if provided map contains a null key or value in the map. | [
"This",
"validator",
"ensures",
"that",
"no",
"key",
"or",
"value",
"is",
"null",
"in",
"the",
"provided",
"map",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L129-L154 |
15,351 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateConfiguredTypes | public static <K> void validateConfiguredTypes(CacheConfig cacheConfig, K key) throws ClassCastException {
Class keyType = cacheConfig.getKeyType();
validateConfiguredKeyType(keyType, key);
} | java | public static <K> void validateConfiguredTypes(CacheConfig cacheConfig, K key) throws ClassCastException {
Class keyType = cacheConfig.getKeyType();
validateConfiguredKeyType(keyType, key);
} | [
"public",
"static",
"<",
"K",
">",
"void",
"validateConfiguredTypes",
"(",
"CacheConfig",
"cacheConfig",
",",
"K",
"key",
")",
"throws",
"ClassCastException",
"{",
"Class",
"keyType",
"=",
"cacheConfig",
".",
"getKeyType",
"(",
")",
";",
"validateConfiguredKeyType... | Validates that the configured key matches the provided key.
@param cacheConfig Cache configuration.
@param key the key to be validated with its type.
@param <K> the type of key.
@throws ClassCastException if the provided key does not match with configured type. | [
"Validates",
"that",
"the",
"configured",
"key",
"matches",
"the",
"provided",
"key",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L164-L167 |
15,352 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateConfiguredTypes | public static <K, V> void validateConfiguredTypes(CacheConfig cacheConfig, K key, V value) throws ClassCastException {
Class keyType = cacheConfig.getKeyType();
Class valueType = cacheConfig.getValueType();
validateConfiguredKeyType(keyType, key);
validateConfiguredValueType(valueType, v... | java | public static <K, V> void validateConfiguredTypes(CacheConfig cacheConfig, K key, V value) throws ClassCastException {
Class keyType = cacheConfig.getKeyType();
Class valueType = cacheConfig.getValueType();
validateConfiguredKeyType(keyType, key);
validateConfiguredValueType(valueType, v... | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"void",
"validateConfiguredTypes",
"(",
"CacheConfig",
"cacheConfig",
",",
"K",
"key",
",",
"V",
"value",
")",
"throws",
"ClassCastException",
"{",
"Class",
"keyType",
"=",
"cacheConfig",
".",
"getKeyType",
"(",
"... | Validates the configured key and value types matches the provided key, value types.
@param cacheConfig Cache configuration.
@param key the key to be validated.
@param <K> the type of key.
@param value the value to be validated.
@param <V> the type of value.
@throws ClassCastException if t... | [
"Validates",
"the",
"configured",
"key",
"and",
"value",
"types",
"matches",
"the",
"provided",
"key",
"value",
"types",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L179-L184 |
15,353 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateConfiguredKeyType | public static <K> void validateConfiguredKeyType(Class<K> keyType, K key) throws ClassCastException {
if (Object.class != keyType) {
// means that type checks is required
if (!keyType.isAssignableFrom(key.getClass())) {
throw new ClassCastException("Key '" + key + "' is n... | java | public static <K> void validateConfiguredKeyType(Class<K> keyType, K key) throws ClassCastException {
if (Object.class != keyType) {
// means that type checks is required
if (!keyType.isAssignableFrom(key.getClass())) {
throw new ClassCastException("Key '" + key + "' is n... | [
"public",
"static",
"<",
"K",
">",
"void",
"validateConfiguredKeyType",
"(",
"Class",
"<",
"K",
">",
"keyType",
",",
"K",
"key",
")",
"throws",
"ClassCastException",
"{",
"if",
"(",
"Object",
".",
"class",
"!=",
"keyType",
")",
"{",
"// means that type check... | Validates the key with key type.
@param keyType key class.
@param key key to be validated.
@param <K> the type of key.
@throws ClassCastException if the provided key do not match with keyType. | [
"Validates",
"the",
"key",
"with",
"key",
"type",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L214-L221 |
15,354 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java | CacheProxyUtil.validateConfiguredValueType | public static <V> void validateConfiguredValueType(Class<V> valueType, V value) throws ClassCastException {
if (Object.class != valueType) {
// means that type checks is required
if (!valueType.isAssignableFrom(value.getClass())) {
throw new ClassCastException("Value '" +... | java | public static <V> void validateConfiguredValueType(Class<V> valueType, V value) throws ClassCastException {
if (Object.class != valueType) {
// means that type checks is required
if (!valueType.isAssignableFrom(value.getClass())) {
throw new ClassCastException("Value '" +... | [
"public",
"static",
"<",
"V",
">",
"void",
"validateConfiguredValueType",
"(",
"Class",
"<",
"V",
">",
"valueType",
",",
"V",
"value",
")",
"throws",
"ClassCastException",
"{",
"if",
"(",
"Object",
".",
"class",
"!=",
"valueType",
")",
"{",
"// means that ty... | Validates the value with value type.
@param valueType value class.
@param value value to be validated.
@param <V> the type of value.
@throws ClassCastException if the provided value do not match with valueType. | [
"Validates",
"the",
"value",
"with",
"value",
"type",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheProxyUtil.java#L231-L238 |
15,355 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/concurrent/lock/LockResourceImpl.java | LockResourceImpl.extendLeaseTime | boolean extendLeaseTime(String caller, long threadId, long leaseTime) {
if (!isLockedBy(caller, threadId)) {
return false;
}
this.blockReads = true;
if (expirationTime < Long.MAX_VALUE) {
setExpirationTime(expirationTime - Clock.currentTimeMillis() + leaseTime);
... | java | boolean extendLeaseTime(String caller, long threadId, long leaseTime) {
if (!isLockedBy(caller, threadId)) {
return false;
}
this.blockReads = true;
if (expirationTime < Long.MAX_VALUE) {
setExpirationTime(expirationTime - Clock.currentTimeMillis() + leaseTime);
... | [
"boolean",
"extendLeaseTime",
"(",
"String",
"caller",
",",
"long",
"threadId",
",",
"long",
"leaseTime",
")",
"{",
"if",
"(",
"!",
"isLockedBy",
"(",
"caller",
",",
"threadId",
")",
")",
"{",
"return",
"false",
";",
"}",
"this",
".",
"blockReads",
"=",
... | This method is used to extend the already locked resource in the prepare phase of the transactions.
It also marks the resource true to block reads.
@param caller
@param threadId
@param leaseTime
@return | [
"This",
"method",
"is",
"used",
"to",
"extend",
"the",
"already",
"locked",
"resource",
"in",
"the",
"prepare",
"phase",
"of",
"the",
"transactions",
".",
"It",
"also",
"marks",
"the",
"resource",
"true",
"to",
"block",
"reads",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/concurrent/lock/LockResourceImpl.java#L122-L131 |
15,356 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePathCursor.java | PortablePathCursor.init | void init(String path) {
this.path = checkHasText(path, "path cannot be null or empty");
this.index = 0;
this.offset = 0;
this.nextSplit = StringUtil.indexOf(path, '.', 0);
this.token = null;
if (nextSplit == 0) {
throw new IllegalArgumentException("The path c... | java | void init(String path) {
this.path = checkHasText(path, "path cannot be null or empty");
this.index = 0;
this.offset = 0;
this.nextSplit = StringUtil.indexOf(path, '.', 0);
this.token = null;
if (nextSplit == 0) {
throw new IllegalArgumentException("The path c... | [
"void",
"init",
"(",
"String",
"path",
")",
"{",
"this",
".",
"path",
"=",
"checkHasText",
"(",
"path",
",",
"\"path cannot be null or empty\"",
")",
";",
"this",
".",
"index",
"=",
"0",
";",
"this",
".",
"offset",
"=",
"0",
";",
"this",
".",
"nextSpli... | Inits the cursor with the given path and sets the current position to the first token.
@param path path to initialise the cursor with | [
"Inits",
"the",
"cursor",
"with",
"the",
"given",
"path",
"and",
"sets",
"the",
"current",
"position",
"to",
"the",
"first",
"token",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePathCursor.java#L44-L53 |
15,357 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/topic/impl/TopicProxySupport.java | TopicProxySupport.publishInternal | public void publishInternal(Object message) {
topicStats.incrementPublishes();
topicService.publishMessage(name, message, multithreaded);
} | java | public void publishInternal(Object message) {
topicStats.incrementPublishes();
topicService.publishMessage(name, message, multithreaded);
} | [
"public",
"void",
"publishInternal",
"(",
"Object",
"message",
")",
"{",
"topicStats",
".",
"incrementPublishes",
"(",
")",
";",
"topicService",
".",
"publishMessage",
"(",
"name",
",",
"message",
",",
"multithreaded",
")",
";",
"}"
] | Publishes the message and increases the local statistics
for the number of published messages.
@param message the message to be published | [
"Publishes",
"the",
"message",
"and",
"increases",
"the",
"local",
"statistics",
"for",
"the",
"number",
"of",
"published",
"messages",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/topic/impl/TopicProxySupport.java#L95-L98 |
15,358 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/instance/DefaultNodeExtension.java | DefaultNodeExtension.getClusterOrNodeVersion | private Version getClusterOrNodeVersion() {
if (node.getClusterService() != null && !node.getClusterService().getClusterVersion().isUnknown()) {
return node.getClusterService().getClusterVersion();
} else {
String overriddenClusterVersion = node.getProperties().getString(GroupPro... | java | private Version getClusterOrNodeVersion() {
if (node.getClusterService() != null && !node.getClusterService().getClusterVersion().isUnknown()) {
return node.getClusterService().getClusterVersion();
} else {
String overriddenClusterVersion = node.getProperties().getString(GroupPro... | [
"private",
"Version",
"getClusterOrNodeVersion",
"(",
")",
"{",
"if",
"(",
"node",
".",
"getClusterService",
"(",
")",
"!=",
"null",
"&&",
"!",
"node",
".",
"getClusterService",
"(",
")",
".",
"getClusterVersion",
"(",
")",
".",
"isUnknown",
"(",
")",
")",... | otherwise, if not overridden, use current node's codebase version | [
"otherwise",
"if",
"not",
"overridden",
"use",
"current",
"node",
"s",
"codebase",
"version"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/instance/DefaultNodeExtension.java#L424-L432 |
15,359 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/json/JsonParser.java | JsonParser.parse | public void parse(String string) {
if (string == null) {
throw new NullPointerException("string is null");
}
int bufferSize = Math.max(MIN_BUFFER_SIZE, Math.min(DEFAULT_BUFFER_SIZE, string.length()));
try {
parse(new StringReader(string), bufferSize);
} catch (IOException exception) {
... | java | public void parse(String string) {
if (string == null) {
throw new NullPointerException("string is null");
}
int bufferSize = Math.max(MIN_BUFFER_SIZE, Math.min(DEFAULT_BUFFER_SIZE, string.length()));
try {
parse(new StringReader(string), bufferSize);
} catch (IOException exception) {
... | [
"public",
"void",
"parse",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"string",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"string is null\"",
")",
";",
"}",
"int",
"bufferSize",
"=",
"Math",
".",
"max",
"(",
"MIN_BUFFER_SIZE... | Parses the given input string. The input must contain a valid JSON value, optionally padded
with whitespace.
@param string
the input string, must be valid JSON
@throws ParseException
if the input is not valid JSON | [
"Parses",
"the",
"given",
"input",
"string",
".",
"The",
"input",
"must",
"contain",
"a",
"valid",
"JSON",
"value",
"optionally",
"padded",
"with",
"whitespace",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/json/JsonParser.java#L85-L96 |
15,360 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/crdt/CRDTReplicationTask.java | CRDTReplicationTask.getNonLocalReplicaAddresses | private List<Member> getNonLocalReplicaAddresses() {
final Collection<Member> dataMembers = nodeEngine.getClusterService().getMembers(DATA_MEMBER_SELECTOR);
final ArrayList<Member> nonLocalDataMembers = new ArrayList<Member>(dataMembers);
nonLocalDataMembers.remove(nodeEngine.getLocalMember());
... | java | private List<Member> getNonLocalReplicaAddresses() {
final Collection<Member> dataMembers = nodeEngine.getClusterService().getMembers(DATA_MEMBER_SELECTOR);
final ArrayList<Member> nonLocalDataMembers = new ArrayList<Member>(dataMembers);
nonLocalDataMembers.remove(nodeEngine.getLocalMember());
... | [
"private",
"List",
"<",
"Member",
">",
"getNonLocalReplicaAddresses",
"(",
")",
"{",
"final",
"Collection",
"<",
"Member",
">",
"dataMembers",
"=",
"nodeEngine",
".",
"getClusterService",
"(",
")",
".",
"getMembers",
"(",
"DATA_MEMBER_SELECTOR",
")",
";",
"final... | Return the list of non-local CRDT replicas in the cluster. | [
"Return",
"the",
"list",
"of",
"non",
"-",
"local",
"CRDT",
"replicas",
"in",
"the",
"cluster",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/crdt/CRDTReplicationTask.java#L79-L84 |
15,361 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/monitor/impl/LocalMapStatsImpl.java | LocalMapStatsImpl.setIndexStats | public void setIndexStats(Map<String, LocalIndexStatsImpl> indexStats) {
this.mutableIndexStats.clear();
if (indexStats != null) {
this.mutableIndexStats.putAll(indexStats);
}
} | java | public void setIndexStats(Map<String, LocalIndexStatsImpl> indexStats) {
this.mutableIndexStats.clear();
if (indexStats != null) {
this.mutableIndexStats.putAll(indexStats);
}
} | [
"public",
"void",
"setIndexStats",
"(",
"Map",
"<",
"String",
",",
"LocalIndexStatsImpl",
">",
"indexStats",
")",
"{",
"this",
".",
"mutableIndexStats",
".",
"clear",
"(",
")",
";",
"if",
"(",
"indexStats",
"!=",
"null",
")",
"{",
"this",
".",
"mutableInde... | Sets the per-index stats of this map stats to the given per-index stats.
@param indexStats the per-index stats to set. | [
"Sets",
"the",
"per",
"-",
"index",
"stats",
"of",
"this",
"map",
"stats",
"to",
"the",
"given",
"per",
"-",
"index",
"stats",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/monitor/impl/LocalMapStatsImpl.java#L396-L401 |
15,362 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/matcher/MatchingPointConfigPatternMatcher.java | MatchingPointConfigPatternMatcher.getMatchingPoint | private int getMatchingPoint(String pattern, String itemName) {
int index = pattern.indexOf('*');
if (index == -1) {
return -1;
}
String firstPart = pattern.substring(0, index);
if (!itemName.startsWith(firstPart)) {
return -1;
}
String s... | java | private int getMatchingPoint(String pattern, String itemName) {
int index = pattern.indexOf('*');
if (index == -1) {
return -1;
}
String firstPart = pattern.substring(0, index);
if (!itemName.startsWith(firstPart)) {
return -1;
}
String s... | [
"private",
"int",
"getMatchingPoint",
"(",
"String",
"pattern",
",",
"String",
"itemName",
")",
"{",
"int",
"index",
"=",
"pattern",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"return",
"-",
"1",
";",
"}"... | This method returns the higher value the better the matching is.
@param pattern configuration pattern to match with
@param itemName item name to match
@return -1 if name does not match at all, zero or positive otherwise | [
"This",
"method",
"returns",
"the",
"higher",
"value",
"the",
"better",
"the",
"matching",
"is",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/matcher/MatchingPointConfigPatternMatcher.java#L61-L78 |
15,363 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/matcher/LegacyMatchingPointConfigPatternMatcher.java | LegacyMatchingPointConfigPatternMatcher.getMatchingPoint | private int getMatchingPoint(String pattern, String itemName) {
int index = pattern.indexOf('*');
if (index == -1) {
return -1;
}
String firstPart = pattern.substring(0, index);
int indexFirstPart = itemName.indexOf(firstPart, 0);
if (indexFirstPart == -1) {
... | java | private int getMatchingPoint(String pattern, String itemName) {
int index = pattern.indexOf('*');
if (index == -1) {
return -1;
}
String firstPart = pattern.substring(0, index);
int indexFirstPart = itemName.indexOf(firstPart, 0);
if (indexFirstPart == -1) {
... | [
"private",
"int",
"getMatchingPoint",
"(",
"String",
"pattern",
",",
"String",
"itemName",
")",
"{",
"int",
"index",
"=",
"pattern",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"return",
"-",
"1",
";",
"}"... | This method returns higher values the better the matching is.
@param pattern configuration pattern to match with
@param itemName item name to match
@return -1 if name does not match at all, zero or positive otherwise | [
"This",
"method",
"returns",
"higher",
"values",
"the",
"better",
"the",
"matching",
"is",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/matcher/LegacyMatchingPointConfigPatternMatcher.java#L58-L77 |
15,364 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/query/impl/getters/JsonGetterContextCache.java | JsonGetterContextCache.getContext | public JsonGetterContext getContext(String queryPath) {
JsonGetterContext context = internalCache.get(queryPath);
if (context != null) {
return context;
}
context = new JsonGetterContext(queryPath);
JsonGetterContext previousContextValue = internalCache.putIfAbsent(qu... | java | public JsonGetterContext getContext(String queryPath) {
JsonGetterContext context = internalCache.get(queryPath);
if (context != null) {
return context;
}
context = new JsonGetterContext(queryPath);
JsonGetterContext previousContextValue = internalCache.putIfAbsent(qu... | [
"public",
"JsonGetterContext",
"getContext",
"(",
"String",
"queryPath",
")",
"{",
"JsonGetterContext",
"context",
"=",
"internalCache",
".",
"get",
"(",
"queryPath",
")",
";",
"if",
"(",
"context",
"!=",
"null",
")",
"{",
"return",
"context",
";",
"}",
"con... | Returns an existing or newly created context for given query path.
If maximum cache size is reached, then some entries are evicted.
The newly created entry is not evicted.
@param queryPath
@return | [
"Returns",
"an",
"existing",
"or",
"newly",
"created",
"context",
"for",
"given",
"query",
"path",
".",
"If",
"maximum",
"cache",
"size",
"is",
"reached",
"then",
"some",
"entries",
"are",
"evicted",
".",
"The",
"newly",
"created",
"entry",
"is",
"not",
"e... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/getters/JsonGetterContextCache.java#L42-L55 |
15,365 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java | LocalMapStatsProvider.addStatsOfNoDataIncludedMaps | private void addStatsOfNoDataIncludedMaps(Map statsPerMap) {
ProxyService proxyService = nodeEngine.getProxyService();
Collection<String> mapNames = proxyService.getDistributedObjectNames(SERVICE_NAME);
for (String mapName : mapNames) {
if (!statsPerMap.containsKey(mapName)) {
... | java | private void addStatsOfNoDataIncludedMaps(Map statsPerMap) {
ProxyService proxyService = nodeEngine.getProxyService();
Collection<String> mapNames = proxyService.getDistributedObjectNames(SERVICE_NAME);
for (String mapName : mapNames) {
if (!statsPerMap.containsKey(mapName)) {
... | [
"private",
"void",
"addStatsOfNoDataIncludedMaps",
"(",
"Map",
"statsPerMap",
")",
"{",
"ProxyService",
"proxyService",
"=",
"nodeEngine",
".",
"getProxyService",
"(",
")",
";",
"Collection",
"<",
"String",
">",
"mapNames",
"=",
"proxyService",
".",
"getDistributedO... | Some maps may have a proxy but no data has been put yet. Think of one created a proxy but not put any data in it.
By calling this method we are returning an empty stats object for those maps. This is helpful to monitor those kind
of maps. | [
"Some",
"maps",
"may",
"have",
"a",
"proxy",
"but",
"no",
"data",
"has",
"been",
"put",
"yet",
".",
"Think",
"of",
"one",
"created",
"a",
"proxy",
"but",
"not",
"put",
"any",
"data",
"in",
"it",
".",
"By",
"calling",
"this",
"method",
"we",
"are",
... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java#L150-L158 |
15,366 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java | LocalMapStatsProvider.addReplicaStatsOf | private void addReplicaStatsOf(RecordStore recordStore, LocalMapOnDemandCalculatedStats onDemandStats) {
if (!hasRecords(recordStore)) {
return;
}
long backupEntryCount = 0;
long backupEntryMemoryCost = 0;
int totalBackupCount = recordStore.getMapContainer().getTota... | java | private void addReplicaStatsOf(RecordStore recordStore, LocalMapOnDemandCalculatedStats onDemandStats) {
if (!hasRecords(recordStore)) {
return;
}
long backupEntryCount = 0;
long backupEntryMemoryCost = 0;
int totalBackupCount = recordStore.getMapContainer().getTota... | [
"private",
"void",
"addReplicaStatsOf",
"(",
"RecordStore",
"recordStore",
",",
"LocalMapOnDemandCalculatedStats",
"onDemandStats",
")",
"{",
"if",
"(",
"!",
"hasRecords",
"(",
"recordStore",
")",
")",
"{",
"return",
";",
"}",
"long",
"backupEntryCount",
"=",
"0",... | Calculates and adds replica partition stats. | [
"Calculates",
"and",
"adds",
"replica",
"partition",
"stats",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java#L224-L252 |
15,367 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java | LocalMapStatsProvider.getReplicaAddress | private Address getReplicaAddress(int partitionId, int replicaNumber, int backupCount) {
IPartition partition = partitionService.getPartition(partitionId);
Address replicaAddress = partition.getReplicaAddress(replicaNumber);
if (replicaAddress == null) {
replicaAddress = waitForRepli... | java | private Address getReplicaAddress(int partitionId, int replicaNumber, int backupCount) {
IPartition partition = partitionService.getPartition(partitionId);
Address replicaAddress = partition.getReplicaAddress(replicaNumber);
if (replicaAddress == null) {
replicaAddress = waitForRepli... | [
"private",
"Address",
"getReplicaAddress",
"(",
"int",
"partitionId",
",",
"int",
"replicaNumber",
",",
"int",
"backupCount",
")",
"{",
"IPartition",
"partition",
"=",
"partitionService",
".",
"getPartition",
"(",
"partitionId",
")",
";",
"Address",
"replicaAddress"... | Gets replica address. Waits if necessary.
@see #waitForReplicaAddress | [
"Gets",
"replica",
"address",
".",
"Waits",
"if",
"necessary",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java#L275-L282 |
15,368 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java | LocalMapStatsProvider.waitForReplicaAddress | private Address waitForReplicaAddress(int replica, IPartition partition, int backupCount) {
int tryCount = RETRY_COUNT;
Address replicaAddress = null;
while (replicaAddress == null && partitionService.getMaxAllowedBackupCount() >= backupCount && tryCount-- > 0) {
sleep();
... | java | private Address waitForReplicaAddress(int replica, IPartition partition, int backupCount) {
int tryCount = RETRY_COUNT;
Address replicaAddress = null;
while (replicaAddress == null && partitionService.getMaxAllowedBackupCount() >= backupCount && tryCount-- > 0) {
sleep();
... | [
"private",
"Address",
"waitForReplicaAddress",
"(",
"int",
"replica",
",",
"IPartition",
"partition",
",",
"int",
"backupCount",
")",
"{",
"int",
"tryCount",
"=",
"RETRY_COUNT",
";",
"Address",
"replicaAddress",
"=",
"null",
";",
"while",
"(",
"replicaAddress",
... | Waits partition table update to get replica address if current replica address is null. | [
"Waits",
"partition",
"table",
"update",
"to",
"get",
"replica",
"address",
"if",
"current",
"replica",
"address",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsProvider.java#L287-L295 |
15,369 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyorSingleQueue.java | ConcurrentConveyorSingleQueue.concurrentConveyorSingleQueue | public static <E1> ConcurrentConveyorSingleQueue<E1> concurrentConveyorSingleQueue(
E1 submitterGoneItem, QueuedPipe<E1> queue
) {
return new ConcurrentConveyorSingleQueue<E1>(submitterGoneItem, queue);
} | java | public static <E1> ConcurrentConveyorSingleQueue<E1> concurrentConveyorSingleQueue(
E1 submitterGoneItem, QueuedPipe<E1> queue
) {
return new ConcurrentConveyorSingleQueue<E1>(submitterGoneItem, queue);
} | [
"public",
"static",
"<",
"E1",
">",
"ConcurrentConveyorSingleQueue",
"<",
"E1",
">",
"concurrentConveyorSingleQueue",
"(",
"E1",
"submitterGoneItem",
",",
"QueuedPipe",
"<",
"E1",
">",
"queue",
")",
"{",
"return",
"new",
"ConcurrentConveyorSingleQueue",
"<",
"E1",
... | Creates a new concurrent conveyor with a single queue.
@param submitterGoneItem the object that a submitter thread can use to signal it's done submitting
@param queue the concurrent queue the conveyor will manage | [
"Creates",
"a",
"new",
"concurrent",
"conveyor",
"with",
"a",
"single",
"queue",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyorSingleQueue.java#L37-L41 |
15,370 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/transaction/impl/xa/XAService.java | XAService.prepareReplicationOperation | @Override
public Operation prepareReplicationOperation(PartitionReplicationEvent event) {
if (event.getReplicaIndex() > 1) {
return null;
}
List<XATransactionDTO> migrationData = new ArrayList<XATransactionDTO>();
InternalPartitionService partitionService = nodeEngine.ge... | java | @Override
public Operation prepareReplicationOperation(PartitionReplicationEvent event) {
if (event.getReplicaIndex() > 1) {
return null;
}
List<XATransactionDTO> migrationData = new ArrayList<XATransactionDTO>();
InternalPartitionService partitionService = nodeEngine.ge... | [
"@",
"Override",
"public",
"Operation",
"prepareReplicationOperation",
"(",
"PartitionReplicationEvent",
"event",
")",
"{",
"if",
"(",
"event",
".",
"getReplicaIndex",
"(",
")",
">",
"1",
")",
"{",
"return",
"null",
";",
"}",
"List",
"<",
"XATransactionDTO",
"... | Migration related methods | [
"Migration",
"related",
"methods"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/transaction/impl/xa/XAService.java#L109-L132 |
15,371 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/metrics/metricsets/OperatingSystemMetricSet.java | OperatingSystemMetricSet.getMethod | private static Method getMethod(Object source, String methodName, String name) {
try {
Method method = source.getClass().getMethod(methodName);
method.setAccessible(true);
return method;
} catch (Exception e) {
if (LOGGER.isFinestEnabled()) {
... | java | private static Method getMethod(Object source, String methodName, String name) {
try {
Method method = source.getClass().getMethod(methodName);
method.setAccessible(true);
return method;
} catch (Exception e) {
if (LOGGER.isFinestEnabled()) {
... | [
"private",
"static",
"Method",
"getMethod",
"(",
"Object",
"source",
",",
"String",
"methodName",
",",
"String",
"name",
")",
"{",
"try",
"{",
"Method",
"method",
"=",
"source",
".",
"getClass",
"(",
")",
".",
"getMethod",
"(",
"methodName",
")",
";",
"m... | Returns a method from the given source object.
@param source the source object.
@param methodName the name of the method to retrieve.
@param name the probe name
@return the method | [
"Returns",
"a",
"method",
"from",
"the",
"given",
"source",
"object",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/metrics/metricsets/OperatingSystemMetricSet.java#L109-L121 |
15,372 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/DiscoveryConfig.java | DiscoveryConfig.setDiscoveryStrategyConfigs | public void setDiscoveryStrategyConfigs(List<DiscoveryStrategyConfig> discoveryStrategyConfigs) {
this.discoveryStrategyConfigs = discoveryStrategyConfigs == null
? new ArrayList<DiscoveryStrategyConfig>(1)
: discoveryStrategyConfigs;
} | java | public void setDiscoveryStrategyConfigs(List<DiscoveryStrategyConfig> discoveryStrategyConfigs) {
this.discoveryStrategyConfigs = discoveryStrategyConfigs == null
? new ArrayList<DiscoveryStrategyConfig>(1)
: discoveryStrategyConfigs;
} | [
"public",
"void",
"setDiscoveryStrategyConfigs",
"(",
"List",
"<",
"DiscoveryStrategyConfig",
">",
"discoveryStrategyConfigs",
")",
"{",
"this",
".",
"discoveryStrategyConfigs",
"=",
"discoveryStrategyConfigs",
"==",
"null",
"?",
"new",
"ArrayList",
"<",
"DiscoveryStrateg... | Sets the strategy configurations for this discovery config.
@param discoveryStrategyConfigs the strategy configurations | [
"Sets",
"the",
"strategy",
"configurations",
"for",
"this",
"discovery",
"config",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/DiscoveryConfig.java#L123-L127 |
15,373 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoaderUtil.java | MapKeyLoaderUtil.assignRole | static MapKeyLoader.Role assignRole(boolean isPartitionOwner, boolean isMapNamePartition,
boolean isMapNamePartitionFirstReplica) {
if (isMapNamePartition) {
if (isPartitionOwner) {
// map-name partition owner is the SENDER
retu... | java | static MapKeyLoader.Role assignRole(boolean isPartitionOwner, boolean isMapNamePartition,
boolean isMapNamePartitionFirstReplica) {
if (isMapNamePartition) {
if (isPartitionOwner) {
// map-name partition owner is the SENDER
retu... | [
"static",
"MapKeyLoader",
".",
"Role",
"assignRole",
"(",
"boolean",
"isPartitionOwner",
",",
"boolean",
"isMapNamePartition",
",",
"boolean",
"isMapNamePartitionFirstReplica",
")",
"{",
"if",
"(",
"isMapNamePartition",
")",
"{",
"if",
"(",
"isPartitionOwner",
")",
... | Returns the role for the map key loader based on the passed parameters.
The partition owner of the map name partition is the sender.
The first replica of the map name partition is the sender backup.
Other partition owners are receivers and other partition replicas do
not have a role.
@param isPartitionOwner ... | [
"Returns",
"the",
"role",
"for",
"the",
"map",
"key",
"loader",
"based",
"on",
"the",
"passed",
"parameters",
".",
"The",
"partition",
"owner",
"of",
"the",
"map",
"name",
"partition",
"is",
"the",
"sender",
".",
"The",
"first",
"replica",
"of",
"the",
"... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoaderUtil.java#L55-L74 |
15,374 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/query/impl/predicates/PredicateUtils.java | PredicateUtils.parseOutCompositeIndexComponents | public static String[] parseOutCompositeIndexComponents(String name) {
String[] components = COMMA_PATTERN.split(name, -1);
if (components.length == 1) {
return null;
}
if (components.length > MAX_INDEX_COMPONENTS) {
throw new IllegalArgumentException("Too many ... | java | public static String[] parseOutCompositeIndexComponents(String name) {
String[] components = COMMA_PATTERN.split(name, -1);
if (components.length == 1) {
return null;
}
if (components.length > MAX_INDEX_COMPONENTS) {
throw new IllegalArgumentException("Too many ... | [
"public",
"static",
"String",
"[",
"]",
"parseOutCompositeIndexComponents",
"(",
"String",
"name",
")",
"{",
"String",
"[",
"]",
"components",
"=",
"COMMA_PATTERN",
".",
"split",
"(",
"name",
",",
"-",
"1",
")",
";",
"if",
"(",
"components",
".",
"length",... | Parses the given index name into components.
@param name the index name to parse.
@return the parsed components or {@code null} if the given index name
doesn't describe a composite index components.
@throws IllegalArgumentException if the given index name is empty.
@throws IllegalArgumentException if the given index n... | [
"Parses",
"the",
"given",
"index",
"name",
"into",
"components",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/predicates/PredicateUtils.java#L115-L140 |
15,375 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/diagnostics/Diagnostics.java | Diagnostics.getPlugin | @SuppressWarnings("unchecked")
public <P extends DiagnosticsPlugin> P getPlugin(Class<P> pluginClass) {
return (P) pluginsMap.get(pluginClass);
} | java | @SuppressWarnings("unchecked")
public <P extends DiagnosticsPlugin> P getPlugin(Class<P> pluginClass) {
return (P) pluginsMap.get(pluginClass);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"P",
"extends",
"DiagnosticsPlugin",
">",
"P",
"getPlugin",
"(",
"Class",
"<",
"P",
">",
"pluginClass",
")",
"{",
"return",
"(",
"P",
")",
"pluginsMap",
".",
"get",
"(",
"pluginClass",
")",... | Gets the plugin for a given plugin class. This method should be used if
the plugin instance is required within some data-structure outside of the
Diagnostics.
@param pluginClass the class of the DiagnosticsPlugin
@param <P> type of the plugin
@return the DiagnosticsPlugin found, or {@code null} if not active | [
"Gets",
"the",
"plugin",
"for",
"a",
"given",
"plugin",
"class",
".",
"This",
"method",
"should",
"be",
"used",
"if",
"the",
"plugin",
"instance",
"is",
"required",
"within",
"some",
"data",
"-",
"structure",
"outside",
"of",
"the",
"Diagnostics",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/diagnostics/Diagnostics.java#L178-L181 |
15,376 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/InvocationRegistry.java | InvocationRegistry.register | public boolean register(Invocation invocation) {
final long callId;
boolean force = invocation.op.isUrgent() || invocation.isRetryCandidate();
try {
callId = force ? callIdSequence.forceNext() : callIdSequence.next();
} catch (HazelcastOverloadException e) {
throw... | java | public boolean register(Invocation invocation) {
final long callId;
boolean force = invocation.op.isUrgent() || invocation.isRetryCandidate();
try {
callId = force ? callIdSequence.forceNext() : callIdSequence.next();
} catch (HazelcastOverloadException e) {
throw... | [
"public",
"boolean",
"register",
"(",
"Invocation",
"invocation",
")",
"{",
"final",
"long",
"callId",
";",
"boolean",
"force",
"=",
"invocation",
".",
"op",
".",
"isUrgent",
"(",
")",
"||",
"invocation",
".",
"isRetryCandidate",
"(",
")",
";",
"try",
"{",... | Registers an invocation.
@param invocation The invocation to register.
@return {@code false} when InvocationRegistry is not alive and registration is not successful, {@code true} otherwise | [
"Registers",
"an",
"invocation",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/spi/impl/operationservice/impl/InvocationRegistry.java#L111-L132 |
15,377 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java | ActionConstants.getPermission | public static Permission getPermission(String name, String serviceName, String... actions) {
PermissionFactory permissionFactory = PERMISSION_FACTORY_MAP.get(serviceName);
if (permissionFactory == null) {
throw new IllegalArgumentException("No permissions found for service: " + serviceName);... | java | public static Permission getPermission(String name, String serviceName, String... actions) {
PermissionFactory permissionFactory = PERMISSION_FACTORY_MAP.get(serviceName);
if (permissionFactory == null) {
throw new IllegalArgumentException("No permissions found for service: " + serviceName);... | [
"public",
"static",
"Permission",
"getPermission",
"(",
"String",
"name",
",",
"String",
"serviceName",
",",
"String",
"...",
"actions",
")",
"{",
"PermissionFactory",
"permissionFactory",
"=",
"PERMISSION_FACTORY_MAP",
".",
"get",
"(",
"serviceName",
")",
";",
"i... | Creates a permission
@param name
@param serviceName
@param actions
@return the created Permission
@throws java.lang.IllegalArgumentException if there is no service found with the given serviceName. | [
"Creates",
"a",
"permission"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/security/permission/ActionConstants.java#L260-L267 |
15,378 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/AbstractJoiner.java | AbstractJoiner.sendSplitBrainJoinMessageAndCheckResponse | protected final SplitBrainMergeCheckResult sendSplitBrainJoinMessageAndCheckResponse(Address target,
SplitBrainJoinMessage request) {
SplitBrainJoinMessage response = sendSplitBrainJoinMessage(target, request);
retu... | java | protected final SplitBrainMergeCheckResult sendSplitBrainJoinMessageAndCheckResponse(Address target,
SplitBrainJoinMessage request) {
SplitBrainJoinMessage response = sendSplitBrainJoinMessage(target, request);
retu... | [
"protected",
"final",
"SplitBrainMergeCheckResult",
"sendSplitBrainJoinMessageAndCheckResponse",
"(",
"Address",
"target",
",",
"SplitBrainJoinMessage",
"request",
")",
"{",
"SplitBrainJoinMessage",
"response",
"=",
"sendSplitBrainJoinMessage",
"(",
"target",
",",
"request",
... | Sends a split brain join request to the target address and checks the response to see if this node should merge
to the target address. | [
"Sends",
"a",
"split",
"brain",
"join",
"request",
"to",
"the",
"target",
"address",
"and",
"checks",
"the",
"response",
"to",
"see",
"if",
"this",
"node",
"should",
"merge",
"to",
"the",
"target",
"address",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/AbstractJoiner.java#L227-L231 |
15,379 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/AbstractJoiner.java | AbstractJoiner.sendSplitBrainJoinMessage | private SplitBrainJoinMessage sendSplitBrainJoinMessage(Address target, SplitBrainJoinMessage request) {
if (logger.isFineEnabled()) {
logger.fine("Sending SplitBrainJoinMessage to " + target);
}
Connection conn = node.getEndpointManager(MEMBER).getOrConnect(target, true);
l... | java | private SplitBrainJoinMessage sendSplitBrainJoinMessage(Address target, SplitBrainJoinMessage request) {
if (logger.isFineEnabled()) {
logger.fine("Sending SplitBrainJoinMessage to " + target);
}
Connection conn = node.getEndpointManager(MEMBER).getOrConnect(target, true);
l... | [
"private",
"SplitBrainJoinMessage",
"sendSplitBrainJoinMessage",
"(",
"Address",
"target",
",",
"SplitBrainJoinMessage",
"request",
")",
"{",
"if",
"(",
"logger",
".",
"isFineEnabled",
"(",
")",
")",
"{",
"logger",
".",
"fine",
"(",
"\"Sending SplitBrainJoinMessage to... | Sends a split brain join request to the target address and returns the response. | [
"Sends",
"a",
"split",
"brain",
"join",
"request",
"to",
"the",
"target",
"address",
"and",
"returns",
"the",
"response",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/AbstractJoiner.java#L236-L271 |
15,380 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/ExpirationTimeSetter.java | ExpirationTimeSetter.setExpirationTimes | public static void setExpirationTimes(long operationTTLMillis, long operationMaxIdleMillis, Record record,
MapConfig mapConfig, boolean consultMapConfig) {
long ttlMillis = pickTTLMillis(operationTTLMillis, record.getTtl(), mapConfig, consultMapConfig);
long max... | java | public static void setExpirationTimes(long operationTTLMillis, long operationMaxIdleMillis, Record record,
MapConfig mapConfig, boolean consultMapConfig) {
long ttlMillis = pickTTLMillis(operationTTLMillis, record.getTtl(), mapConfig, consultMapConfig);
long max... | [
"public",
"static",
"void",
"setExpirationTimes",
"(",
"long",
"operationTTLMillis",
",",
"long",
"operationMaxIdleMillis",
",",
"Record",
"record",
",",
"MapConfig",
"mapConfig",
",",
"boolean",
"consultMapConfig",
")",
"{",
"long",
"ttlMillis",
"=",
"pickTTLMillis",... | Updates records TTL and expiration time.
@param operationTTLMillis user provided TTL during operation call like put with TTL
@param record record to be updated
@param mapConfig map config object
@param consultMapConfig give {@code true} if this update should consult map ttl configuration,
otherw... | [
"Updates",
"records",
"TTL",
"and",
"expiration",
"time",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/ExpirationTimeSetter.java#L102-L110 |
15,381 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/ExpirationTimeSetter.java | ExpirationTimeSetter.pickTTLMillis | private static long pickTTLMillis(long operationTTLMillis, long existingTTLMillis, MapConfig mapConfig,
boolean consultMapConfig) {
// if user set operationTTLMillis when calling operation, use it
if (operationTTLMillis > 0) {
return checkedTime(operatio... | java | private static long pickTTLMillis(long operationTTLMillis, long existingTTLMillis, MapConfig mapConfig,
boolean consultMapConfig) {
// if user set operationTTLMillis when calling operation, use it
if (operationTTLMillis > 0) {
return checkedTime(operatio... | [
"private",
"static",
"long",
"pickTTLMillis",
"(",
"long",
"operationTTLMillis",
",",
"long",
"existingTTLMillis",
",",
"MapConfig",
"mapConfig",
",",
"boolean",
"consultMapConfig",
")",
"{",
"// if user set operationTTLMillis when calling operation, use it",
"if",
"(",
"op... | Decides if TTL millis should to be set on record.
@param existingTTLMillis existing TTL on record
@param operationTTLMillis user provided TTL during operation call like put with TTL
@param mapConfig used to get configured TTL
@param consultMapConfig give {@code true} if this update should consult map ttl c... | [
"Decides",
"if",
"TTL",
"millis",
"should",
"to",
"be",
"set",
"on",
"record",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/ExpirationTimeSetter.java#L122-L141 |
15,382 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/ExpirationTimeSetter.java | ExpirationTimeSetter.calculateExpirationWithDelay | public static long calculateExpirationWithDelay(long timeInMillis, long delayMillis, boolean backup) {
checkNotNegative(timeInMillis, "timeInMillis can't be negative");
if (backup) {
long delayedTime = timeInMillis + delayMillis;
// check for a potential long overflow
... | java | public static long calculateExpirationWithDelay(long timeInMillis, long delayMillis, boolean backup) {
checkNotNegative(timeInMillis, "timeInMillis can't be negative");
if (backup) {
long delayedTime = timeInMillis + delayMillis;
// check for a potential long overflow
... | [
"public",
"static",
"long",
"calculateExpirationWithDelay",
"(",
"long",
"timeInMillis",
",",
"long",
"delayMillis",
",",
"boolean",
"backup",
")",
"{",
"checkNotNegative",
"(",
"timeInMillis",
",",
"\"timeInMillis can't be negative\"",
")",
";",
"if",
"(",
"backup",
... | On backup partitions, this method delays key's expiration. | [
"On",
"backup",
"partitions",
"this",
"method",
"delays",
"key",
"s",
"expiration",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/ExpirationTimeSetter.java#L167-L180 |
15,383 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java | RaftLock.acquire | AcquireResult acquire(LockInvocationKey key, boolean wait) {
LockEndpoint endpoint = key.endpoint();
UUID invocationUid = key.invocationUid();
RaftLockOwnershipState memorized = ownerInvocationRefUids.get(Tuple2.of(endpoint, invocationUid));
if (memorized != null) {
AcquireSt... | java | AcquireResult acquire(LockInvocationKey key, boolean wait) {
LockEndpoint endpoint = key.endpoint();
UUID invocationUid = key.invocationUid();
RaftLockOwnershipState memorized = ownerInvocationRefUids.get(Tuple2.of(endpoint, invocationUid));
if (memorized != null) {
AcquireSt... | [
"AcquireResult",
"acquire",
"(",
"LockInvocationKey",
"key",
",",
"boolean",
"wait",
")",
"{",
"LockEndpoint",
"endpoint",
"=",
"key",
".",
"endpoint",
"(",
")",
";",
"UUID",
"invocationUid",
"=",
"key",
".",
"invocationUid",
"(",
")",
";",
"RaftLockOwnershipS... | Assigns the lock to the endpoint, if the lock is not held. Lock count is
incremented if the endpoint already holds the lock. If some other
endpoint holds the lock and the second argument is true, a wait key is
created and added to the wait queue. Lock count is not incremented if
the lock request is a retry of the lock ... | [
"Assigns",
"the",
"lock",
"to",
"the",
"endpoint",
"if",
"the",
"lock",
"is",
"not",
"held",
".",
"Lock",
"count",
"is",
"incremented",
"if",
"the",
"endpoint",
"already",
"holds",
"the",
"lock",
".",
"If",
"some",
"other",
"endpoint",
"holds",
"the",
"l... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java#L95-L129 |
15,384 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java | RaftLock.onSessionClose | @Override
protected void onSessionClose(long sessionId, Map<Long, Object> responses) {
removeInvocationRefUids(sessionId);
if (owner != null && owner.sessionId() == sessionId) {
ReleaseResult result = doRelease(owner.endpoint(), newUnsecureUUID(), lockCount);
for (LockInvoca... | java | @Override
protected void onSessionClose(long sessionId, Map<Long, Object> responses) {
removeInvocationRefUids(sessionId);
if (owner != null && owner.sessionId() == sessionId) {
ReleaseResult result = doRelease(owner.endpoint(), newUnsecureUUID(), lockCount);
for (LockInvoca... | [
"@",
"Override",
"protected",
"void",
"onSessionClose",
"(",
"long",
"sessionId",
",",
"Map",
"<",
"Long",
",",
"Object",
">",
"responses",
")",
"{",
"removeInvocationRefUids",
"(",
"sessionId",
")",
";",
"if",
"(",
"owner",
"!=",
"null",
"&&",
"owner",
".... | Releases the lock if the current lock holder's session is closed. | [
"Releases",
"the",
"lock",
"if",
"the",
"current",
"lock",
"holder",
"s",
"session",
"is",
"closed",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java#L234-L244 |
15,385 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java | RaftLock.getActivelyAttachedSessions | @Override
protected Collection<Long> getActivelyAttachedSessions() {
return owner != null ? Collections.singleton(owner.sessionId()) : Collections.<Long>emptyList();
} | java | @Override
protected Collection<Long> getActivelyAttachedSessions() {
return owner != null ? Collections.singleton(owner.sessionId()) : Collections.<Long>emptyList();
} | [
"@",
"Override",
"protected",
"Collection",
"<",
"Long",
">",
"getActivelyAttachedSessions",
"(",
")",
"{",
"return",
"owner",
"!=",
"null",
"?",
"Collections",
".",
"singleton",
"(",
"owner",
".",
"sessionId",
"(",
")",
")",
":",
"Collections",
".",
"<",
... | Returns session id of the current lock holder or an empty collection if
the lock is not held | [
"Returns",
"session",
"id",
"of",
"the",
"current",
"lock",
"holder",
"or",
"an",
"empty",
"collection",
"if",
"the",
"lock",
"is",
"not",
"held"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/lock/RaftLock.java#L259-L262 |
15,386 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/replicatedmap/impl/record/AbstractReplicatedRecordStore.java | AbstractReplicatedRecordStore.containsKeyAndValue | private boolean containsKeyAndValue(Object key) {
ReplicatedRecord replicatedRecord = getStorage().get(marshall(key));
return replicatedRecord != null && replicatedRecord.getValue() != null;
} | java | private boolean containsKeyAndValue(Object key) {
ReplicatedRecord replicatedRecord = getStorage().get(marshall(key));
return replicatedRecord != null && replicatedRecord.getValue() != null;
} | [
"private",
"boolean",
"containsKeyAndValue",
"(",
"Object",
"key",
")",
"{",
"ReplicatedRecord",
"replicatedRecord",
"=",
"getStorage",
"(",
")",
".",
"get",
"(",
"marshall",
"(",
"key",
")",
")",
";",
"return",
"replicatedRecord",
"!=",
"null",
"&&",
"replica... | IMPORTANT >> Increments hit counter | [
"IMPORTANT",
">>",
"Increments",
"hit",
"counter"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/replicatedmap/impl/record/AbstractReplicatedRecordStore.java#L209-L212 |
15,387 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/client/impl/ClientPartitionListenerService.java | ClientPartitionListenerService.getPartitions | public Collection<Map.Entry<Address, List<Integer>>> getPartitions(PartitionTableView partitionTableView) {
Map<Address, List<Integer>> partitionsMap = new HashMap<Address, List<Integer>>();
int partitionCount = partitionTableView.getLength();
for (int partitionId = 0; partitionId < partitionC... | java | public Collection<Map.Entry<Address, List<Integer>>> getPartitions(PartitionTableView partitionTableView) {
Map<Address, List<Integer>> partitionsMap = new HashMap<Address, List<Integer>>();
int partitionCount = partitionTableView.getLength();
for (int partitionId = 0; partitionId < partitionC... | [
"public",
"Collection",
"<",
"Map",
".",
"Entry",
"<",
"Address",
",",
"List",
"<",
"Integer",
">",
">",
">",
"getPartitions",
"(",
"PartitionTableView",
"partitionTableView",
")",
"{",
"Map",
"<",
"Address",
",",
"List",
"<",
"Integer",
">",
">",
"partiti... | If any partition does not have an owner, this method returns empty collection
@param partitionTableView will be converted to address->partitions mapping
@return address->partitions mapping, where address is the client address of the member | [
"If",
"any",
"partition",
"does",
"not",
"have",
"an",
"owner",
"this",
"method",
"returns",
"empty",
"collection"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/client/impl/ClientPartitionListenerService.java#L89-L113 |
15,388 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java | HashSlotArrayBase.migrateTo | public final void migrateTo(MemoryAllocator newMalloc) {
baseAddress = move(baseAddress, capacity(), malloc, newMalloc);
malloc = newMalloc;
auxMalloc = null;
} | java | public final void migrateTo(MemoryAllocator newMalloc) {
baseAddress = move(baseAddress, capacity(), malloc, newMalloc);
malloc = newMalloc;
auxMalloc = null;
} | [
"public",
"final",
"void",
"migrateTo",
"(",
"MemoryAllocator",
"newMalloc",
")",
"{",
"baseAddress",
"=",
"move",
"(",
"baseAddress",
",",
"capacity",
"(",
")",
",",
"malloc",
",",
"newMalloc",
")",
";",
"malloc",
"=",
"newMalloc",
";",
"auxMalloc",
"=",
... | Migrates the backing memory region to a new allocator, freeing the current region. Memory allocated by the
new allocator must be accessible by the same accessor as the current one. | [
"Migrates",
"the",
"backing",
"memory",
"region",
"to",
"a",
"new",
"allocator",
"freeing",
"the",
"current",
"region",
".",
"Memory",
"allocated",
"by",
"the",
"new",
"allocator",
"must",
"be",
"accessible",
"by",
"the",
"same",
"accessor",
"as",
"the",
"cu... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java#L212-L216 |
15,389 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java | HashSlotArrayBase.ensure0 | protected final SlotAssignmentResult ensure0(long key1, long key2) {
assertValid();
final long size = size();
if (size == expansionThreshold()) {
resizeTo(CapacityUtil.nextCapacity(capacity()));
}
long slot = keyHash(key1, key2) & mask();
while (isSlotAssigned... | java | protected final SlotAssignmentResult ensure0(long key1, long key2) {
assertValid();
final long size = size();
if (size == expansionThreshold()) {
resizeTo(CapacityUtil.nextCapacity(capacity()));
}
long slot = keyHash(key1, key2) & mask();
while (isSlotAssigned... | [
"protected",
"final",
"SlotAssignmentResult",
"ensure0",
"(",
"long",
"key1",
",",
"long",
"key2",
")",
"{",
"assertValid",
"(",
")",
";",
"final",
"long",
"size",
"=",
"size",
"(",
")",
";",
"if",
"(",
"size",
"==",
"expansionThreshold",
"(",
")",
")",
... | These protected final methods will be called from the subclasses | [
"These",
"protected",
"final",
"methods",
"will",
"be",
"called",
"from",
"the",
"subclasses"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java#L221-L241 |
15,390 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java | HashSlotArrayBase.resizeTo | protected void resizeTo(long newCapacity) {
final long oldCapacity = capacity();
final long oldAllocatedSize = HEADER_SIZE + oldCapacity * slotLength;
final MemoryAllocator oldMalloc;
final long oldAddress;
if (auxMalloc != null) {
final long size = size();
... | java | protected void resizeTo(long newCapacity) {
final long oldCapacity = capacity();
final long oldAllocatedSize = HEADER_SIZE + oldCapacity * slotLength;
final MemoryAllocator oldMalloc;
final long oldAddress;
if (auxMalloc != null) {
final long size = size();
... | [
"protected",
"void",
"resizeTo",
"(",
"long",
"newCapacity",
")",
"{",
"final",
"long",
"oldCapacity",
"=",
"capacity",
"(",
")",
";",
"final",
"long",
"oldAllocatedSize",
"=",
"HEADER_SIZE",
"+",
"oldCapacity",
"*",
"slotLength",
";",
"final",
"MemoryAllocator"... | Allocates a new slot array with the requested size and moves all the
assigned slots from the current array into the new one. | [
"Allocates",
"a",
"new",
"slot",
"array",
"with",
"the",
"requested",
"size",
"and",
"moves",
"all",
"the",
"assigned",
"slots",
"from",
"the",
"current",
"array",
"into",
"the",
"new",
"one",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java#L363-L380 |
15,391 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java | HashSlotArrayBase.move | private long move(long fromBaseAddress, long capacity, MemoryAllocator fromMalloc, MemoryAllocator toMalloc) {
final long allocatedSize = HEADER_SIZE + capacity * slotLength;
final long toBaseAddress = toMalloc.allocate(allocatedSize) + HEADER_SIZE;
mem.copyMemory(fromBaseAddress - HEADER_SIZE, ... | java | private long move(long fromBaseAddress, long capacity, MemoryAllocator fromMalloc, MemoryAllocator toMalloc) {
final long allocatedSize = HEADER_SIZE + capacity * slotLength;
final long toBaseAddress = toMalloc.allocate(allocatedSize) + HEADER_SIZE;
mem.copyMemory(fromBaseAddress - HEADER_SIZE, ... | [
"private",
"long",
"move",
"(",
"long",
"fromBaseAddress",
",",
"long",
"capacity",
",",
"MemoryAllocator",
"fromMalloc",
",",
"MemoryAllocator",
"toMalloc",
")",
"{",
"final",
"long",
"allocatedSize",
"=",
"HEADER_SIZE",
"+",
"capacity",
"*",
"slotLength",
";",
... | Copies a block from one allocator to another, then frees the source block. | [
"Copies",
"a",
"block",
"from",
"one",
"allocator",
"to",
"another",
"then",
"frees",
"the",
"source",
"block",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/hashslot/impl/HashSlotArrayBase.java#L473-L479 |
15,392 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheStatisticsImpl.java | CacheStatisticsImpl.addGetTimeNanos | public void addGetTimeNanos(long duration) {
for (;;) {
long nanos = getCacheTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (GET_CACHE_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
return;
}
... | java | public void addGetTimeNanos(long duration) {
for (;;) {
long nanos = getCacheTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (GET_CACHE_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
return;
}
... | [
"public",
"void",
"addGetTimeNanos",
"(",
"long",
"duration",
")",
"{",
"for",
"(",
";",
";",
")",
"{",
"long",
"nanos",
"=",
"getCacheTimeTakenNanos",
";",
"if",
"(",
"nanos",
"<=",
"Long",
".",
"MAX_VALUE",
"-",
"duration",
")",
"{",
"if",
"(",
"GET_... | Increments the getCache time accumulator.
@param duration the time taken in nanoseconds. | [
"Increments",
"the",
"getCache",
"time",
"accumulator",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheStatisticsImpl.java#L368-L383 |
15,393 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheStatisticsImpl.java | CacheStatisticsImpl.addPutTimeNanos | public void addPutTimeNanos(long duration) {
for (;;) {
long nanos = putTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (PUT_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
return;
}
} else {
... | java | public void addPutTimeNanos(long duration) {
for (;;) {
long nanos = putTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (PUT_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
return;
}
} else {
... | [
"public",
"void",
"addPutTimeNanos",
"(",
"long",
"duration",
")",
"{",
"for",
"(",
";",
";",
")",
"{",
"long",
"nanos",
"=",
"putTimeTakenNanos",
";",
"if",
"(",
"nanos",
"<=",
"Long",
".",
"MAX_VALUE",
"-",
"duration",
")",
"{",
"if",
"(",
"PUT_TIME_... | Increments the put time accumulator.
@param duration the time taken in nanoseconds. | [
"Increments",
"the",
"put",
"time",
"accumulator",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheStatisticsImpl.java#L390-L405 |
15,394 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/CacheStatisticsImpl.java | CacheStatisticsImpl.addRemoveTimeNanos | public void addRemoveTimeNanos(long duration) {
for (;;) {
long nanos = removeTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (REMOVE_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
return;
}
} ... | java | public void addRemoveTimeNanos(long duration) {
for (;;) {
long nanos = removeTimeTakenNanos;
if (nanos <= Long.MAX_VALUE - duration) {
if (REMOVE_TIME_TAKEN_NANOS.compareAndSet(this, nanos, nanos + duration)) {
return;
}
} ... | [
"public",
"void",
"addRemoveTimeNanos",
"(",
"long",
"duration",
")",
"{",
"for",
"(",
";",
";",
")",
"{",
"long",
"nanos",
"=",
"removeTimeTakenNanos",
";",
"if",
"(",
"nanos",
"<=",
"Long",
".",
"MAX_VALUE",
"-",
"duration",
")",
"{",
"if",
"(",
"REM... | Increments the remove time accumulator.
@param duration the time taken in nanoseconds. | [
"Increments",
"the",
"remove",
"time",
"accumulator",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/CacheStatisticsImpl.java#L412-L427 |
15,395 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JVMUtil.java | JVMUtil.isObjectLayoutCompressedOopsOrNull | @SuppressFBWarnings("NP_BOOLEAN_RETURN_NULL")
static Boolean isObjectLayoutCompressedOopsOrNull() {
if (!UNSAFE_AVAILABLE) {
return null;
}
Integer referenceSize = ReferenceSizeEstimator.getReferenceSizeOrNull();
if (referenceSize == null) {
return null;
... | java | @SuppressFBWarnings("NP_BOOLEAN_RETURN_NULL")
static Boolean isObjectLayoutCompressedOopsOrNull() {
if (!UNSAFE_AVAILABLE) {
return null;
}
Integer referenceSize = ReferenceSizeEstimator.getReferenceSizeOrNull();
if (referenceSize == null) {
return null;
... | [
"@",
"SuppressFBWarnings",
"(",
"\"NP_BOOLEAN_RETURN_NULL\"",
")",
"static",
"Boolean",
"isObjectLayoutCompressedOopsOrNull",
"(",
")",
"{",
"if",
"(",
"!",
"UNSAFE_AVAILABLE",
")",
"{",
"return",
"null",
";",
"}",
"Integer",
"referenceSize",
"=",
"ReferenceSizeEstima... | Fallback when checking CompressedOopsEnabled. | [
"Fallback",
"when",
"checking",
"CompressedOopsEnabled",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JVMUtil.java#L90-L103 |
15,396 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java | PortablePositionNavigator.navigateToPathTokenWithoutQuantifier | private static PortablePosition navigateToPathTokenWithoutQuantifier(
PortableNavigatorContext ctx, PortablePathCursor path) throws IOException {
if (path.isLastToken()) {
// if it's a token that's on the last position we calculate its direct access position and return it for
... | java | private static PortablePosition navigateToPathTokenWithoutQuantifier(
PortableNavigatorContext ctx, PortablePathCursor path) throws IOException {
if (path.isLastToken()) {
// if it's a token that's on the last position we calculate its direct access position and return it for
... | [
"private",
"static",
"PortablePosition",
"navigateToPathTokenWithoutQuantifier",
"(",
"PortableNavigatorContext",
"ctx",
",",
"PortablePathCursor",
"path",
")",
"throws",
"IOException",
"{",
"if",
"(",
"path",
".",
"isLastToken",
"(",
")",
")",
"{",
"// if it's a token ... | Token without quantifier. It means it's just a simple field, not an array. | [
"Token",
"without",
"quantifier",
".",
"It",
"means",
"it",
"s",
"just",
"a",
"simple",
"field",
"not",
"an",
"array",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java#L170-L187 |
15,397 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java | PortablePositionNavigator.navigateToPathTokenWithAnyQuantifierInPortableArray | private static PortablePosition navigateToPathTokenWithAnyQuantifierInPortableArray(
PortableNavigatorContext ctx, PortablePathCursor path, NavigationFrame frame) throws IOException {
// if no frame, we're pursuing the cell[0] case and populating the frames for cell[1 to length-1]
if (frame ... | java | private static PortablePosition navigateToPathTokenWithAnyQuantifierInPortableArray(
PortableNavigatorContext ctx, PortablePathCursor path, NavigationFrame frame) throws IOException {
// if no frame, we're pursuing the cell[0] case and populating the frames for cell[1 to length-1]
if (frame ... | [
"private",
"static",
"PortablePosition",
"navigateToPathTokenWithAnyQuantifierInPortableArray",
"(",
"PortableNavigatorContext",
"ctx",
",",
"PortablePathCursor",
"path",
",",
"NavigationFrame",
"frame",
")",
"throws",
"IOException",
"{",
"// if no frame, we're pursuing the cell[0]... | navigation in PORTABLE array | [
"navigation",
"in",
"PORTABLE",
"array"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java#L248-L277 |
15,398 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java | PortablePositionNavigator.navigateToPathTokenWithAnyQuantifierInPrimitiveArray | private static PortablePosition navigateToPathTokenWithAnyQuantifierInPrimitiveArray(
PortableNavigatorContext ctx, PortablePathCursor path, NavigationFrame frame) throws IOException {
// if no frame, we're pursuing the cell[0] case and populating the frames for cell[1 to length-1]
if (frame... | java | private static PortablePosition navigateToPathTokenWithAnyQuantifierInPrimitiveArray(
PortableNavigatorContext ctx, PortablePathCursor path, NavigationFrame frame) throws IOException {
// if no frame, we're pursuing the cell[0] case and populating the frames for cell[1 to length-1]
if (frame... | [
"private",
"static",
"PortablePosition",
"navigateToPathTokenWithAnyQuantifierInPrimitiveArray",
"(",
"PortableNavigatorContext",
"ctx",
",",
"PortablePathCursor",
"path",
",",
"NavigationFrame",
"frame",
")",
"throws",
"IOException",
"{",
"// if no frame, we're pursuing the cell[0... | navigation in PRIMITIVE array | [
"navigation",
"in",
"PRIMITIVE",
"array"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java#L301-L327 |
15,399 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java | PortablePositionNavigator.navigateContextToNextPortableTokenFromPortableField | private static boolean navigateContextToNextPortableTokenFromPortableField(PortableNavigatorContext ctx)
throws IOException {
BufferObjectDataInput in = ctx.getIn();
// find the field position that's stored in the fieldDefinition int the context and navigate to it
int pos = getStrea... | java | private static boolean navigateContextToNextPortableTokenFromPortableField(PortableNavigatorContext ctx)
throws IOException {
BufferObjectDataInput in = ctx.getIn();
// find the field position that's stored in the fieldDefinition int the context and navigate to it
int pos = getStrea... | [
"private",
"static",
"boolean",
"navigateContextToNextPortableTokenFromPortableField",
"(",
"PortableNavigatorContext",
"ctx",
")",
"throws",
"IOException",
"{",
"BufferObjectDataInput",
"in",
"=",
"ctx",
".",
"getIn",
"(",
")",
";",
"// find the field position that's stored ... | returns true if managed to advance, false if advance failed due to null field | [
"returns",
"true",
"if",
"managed",
"to",
"advance",
"false",
"if",
"advance",
"failed",
"due",
"to",
"null",
"field"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java#L362-L384 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.