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,400 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java | PortablePositionNavigator.navigateContextToNextPortableTokenFromPortableArrayCell | private static void navigateContextToNextPortableTokenFromPortableArrayCell(
PortableNavigatorContext ctx, PortablePathCursor path, int index) throws IOException {
BufferObjectDataInput in = ctx.getIn();
// find the array field position that's stored in the fieldDefinition int the context a... | java | private static void navigateContextToNextPortableTokenFromPortableArrayCell(
PortableNavigatorContext ctx, PortablePathCursor path, int index) throws IOException {
BufferObjectDataInput in = ctx.getIn();
// find the array field position that's stored in the fieldDefinition int the context a... | [
"private",
"static",
"void",
"navigateContextToNextPortableTokenFromPortableArrayCell",
"(",
"PortableNavigatorContext",
"ctx",
",",
"PortablePathCursor",
"path",
",",
"int",
"index",
")",
"throws",
"IOException",
"{",
"BufferObjectDataInput",
"in",
"=",
"ctx",
".",
"getI... | this navigation always succeeds since the caller validates if the index is inbound | [
"this",
"navigation",
"always",
"succeeds",
"since",
"the",
"caller",
"validates",
"if",
"the",
"index",
"is",
"inbound"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java#L387-L416 |
15,401 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java | PortablePositionNavigator.createPositionForReadAccess | private static PortablePosition createPositionForReadAccess(
PortableNavigatorContext ctx, PortablePathCursor path) throws IOException {
int notArrayCellAccessIndex = -1;
return createPositionForReadAccess(ctx, path, notArrayCellAccessIndex);
} | java | private static PortablePosition createPositionForReadAccess(
PortableNavigatorContext ctx, PortablePathCursor path) throws IOException {
int notArrayCellAccessIndex = -1;
return createPositionForReadAccess(ctx, path, notArrayCellAccessIndex);
} | [
"private",
"static",
"PortablePosition",
"createPositionForReadAccess",
"(",
"PortableNavigatorContext",
"ctx",
",",
"PortablePathCursor",
"path",
")",
"throws",
"IOException",
"{",
"int",
"notArrayCellAccessIndex",
"=",
"-",
"1",
";",
"return",
"createPositionForReadAccess... | Special case of the position creation, where there's no quantifier, so the index does not count. | [
"Special",
"case",
"of",
"the",
"position",
"creation",
"where",
"there",
"s",
"no",
"quantifier",
"so",
"the",
"index",
"does",
"not",
"count",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortablePositionNavigator.java#L488-L492 |
15,402 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/management/ConsoleCommandHandler.java | ConsoleCommandHandler.handleCommand | public String handleCommand(final String command) throws InterruptedException {
if (lock.tryLock(1, TimeUnit.SECONDS)) {
try {
return doHandleCommand(command);
} finally {
lock.unlock();
}
}
return "'" + command + "' execution i... | java | public String handleCommand(final String command) throws InterruptedException {
if (lock.tryLock(1, TimeUnit.SECONDS)) {
try {
return doHandleCommand(command);
} finally {
lock.unlock();
}
}
return "'" + command + "' execution i... | [
"public",
"String",
"handleCommand",
"(",
"final",
"String",
"command",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"lock",
".",
"tryLock",
"(",
"1",
",",
"TimeUnit",
".",
"SECONDS",
")",
")",
"{",
"try",
"{",
"return",
"doHandleCommand",
"(",
"... | Runs a command on the console. Will not run "exit", "quit", "shutdown", their upper-case
or mixed case counterparts.
@param command The command to run.
@return either the command is handled, or a console message is returned if the command is not handled.
@throws java.lang.InterruptedException | [
"Runs",
"a",
"command",
"on",
"the",
"console",
".",
"Will",
"not",
"run",
"exit",
"quit",
"shutdown",
"their",
"upper",
"-",
"case",
"or",
"mixed",
"case",
"counterparts",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/management/ConsoleCommandHandler.java#L50-L59 |
15,403 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/management/ConsoleCommandHandler.java | ConsoleCommandHandler.doHandleCommand | String doHandleCommand(final String command) {
app.handleCommand(command);
final String output = buffer.toString();
buffer.setLength(0);
return output;
} | java | String doHandleCommand(final String command) {
app.handleCommand(command);
final String output = buffer.toString();
buffer.setLength(0);
return output;
} | [
"String",
"doHandleCommand",
"(",
"final",
"String",
"command",
")",
"{",
"app",
".",
"handleCommand",
"(",
"command",
")",
";",
"final",
"String",
"output",
"=",
"buffer",
".",
"toString",
"(",
")",
";",
"buffer",
".",
"setLength",
"(",
"0",
")",
";",
... | Called by handleCommand. | [
"Called",
"by",
"handleCommand",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/management/ConsoleCommandHandler.java#L64-L69 |
15,404 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/WanReplicationConfig.java | WanReplicationConfig.setWanPublisherConfigs | public void setWanPublisherConfigs(List<WanPublisherConfig> wanPublisherConfigs) {
if (wanPublisherConfigs != null && !wanPublisherConfigs.isEmpty()) {
this.wanPublisherConfigs = wanPublisherConfigs;
}
} | java | public void setWanPublisherConfigs(List<WanPublisherConfig> wanPublisherConfigs) {
if (wanPublisherConfigs != null && !wanPublisherConfigs.isEmpty()) {
this.wanPublisherConfigs = wanPublisherConfigs;
}
} | [
"public",
"void",
"setWanPublisherConfigs",
"(",
"List",
"<",
"WanPublisherConfig",
">",
"wanPublisherConfigs",
")",
"{",
"if",
"(",
"wanPublisherConfigs",
"!=",
"null",
"&&",
"!",
"wanPublisherConfigs",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"wanPubli... | Sets the list of configured WAN publisher targets for this WAN replication.
@param wanPublisherConfigs WAN publisher list | [
"Sets",
"the",
"list",
"of",
"configured",
"WAN",
"publisher",
"targets",
"for",
"this",
"WAN",
"replication",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/WanReplicationConfig.java#L106-L110 |
15,405 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/AbstractPartitionPrimaryReplicaAntiEntropyTask.java | AbstractPartitionPrimaryReplicaAntiEntropyTask.retainAndGetNamespaces | final Collection<ServiceNamespace> retainAndGetNamespaces() {
PartitionReplicationEvent event = new PartitionReplicationEvent(partitionId, 0);
Collection<FragmentedMigrationAwareService> services = nodeEngine.getServices(FragmentedMigrationAwareService.class);
Set<ServiceNamespace> namespaces =... | java | final Collection<ServiceNamespace> retainAndGetNamespaces() {
PartitionReplicationEvent event = new PartitionReplicationEvent(partitionId, 0);
Collection<FragmentedMigrationAwareService> services = nodeEngine.getServices(FragmentedMigrationAwareService.class);
Set<ServiceNamespace> namespaces =... | [
"final",
"Collection",
"<",
"ServiceNamespace",
">",
"retainAndGetNamespaces",
"(",
")",
"{",
"PartitionReplicationEvent",
"event",
"=",
"new",
"PartitionReplicationEvent",
"(",
"partitionId",
",",
"0",
")",
";",
"Collection",
"<",
"FragmentedMigrationAwareService",
">"... | works only on primary. backups are retained in PartitionBackupReplicaAntiEntropyTask | [
"works",
"only",
"on",
"primary",
".",
"backups",
"are",
"retained",
"in",
"PartitionBackupReplicaAntiEntropyTask"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/AbstractPartitionPrimaryReplicaAntiEntropyTask.java#L66-L82 |
15,406 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java | PortableNavigatorContext.initFinalPositionAndOffset | private void initFinalPositionAndOffset(BufferObjectDataInput in, ClassDefinition cd) {
int fieldCount;
try {
// final position after portable is read
finalPosition = in.readInt();
fieldCount = in.readInt();
} catch (IOException e) {
throw new Haze... | java | private void initFinalPositionAndOffset(BufferObjectDataInput in, ClassDefinition cd) {
int fieldCount;
try {
// final position after portable is read
finalPosition = in.readInt();
fieldCount = in.readInt();
} catch (IOException e) {
throw new Haze... | [
"private",
"void",
"initFinalPositionAndOffset",
"(",
"BufferObjectDataInput",
"in",
",",
"ClassDefinition",
"cd",
")",
"{",
"int",
"fieldCount",
";",
"try",
"{",
"// final position after portable is read",
"finalPosition",
"=",
"in",
".",
"readInt",
"(",
")",
";",
... | Initialises the finalPosition and offset and validates the fieldCount against the given class definition | [
"Initialises",
"the",
"finalPosition",
"and",
"offset",
"and",
"validates",
"the",
"fieldCount",
"against",
"the",
"given",
"class",
"definition"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java#L72-L85 |
15,407 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java | PortableNavigatorContext.reset | void reset() {
cd = initCd;
serializer = initSerializer;
in.position(initPosition);
finalPosition = initFinalPosition;
offset = initOffset;
} | java | void reset() {
cd = initCd;
serializer = initSerializer;
in.position(initPosition);
finalPosition = initFinalPosition;
offset = initOffset;
} | [
"void",
"reset",
"(",
")",
"{",
"cd",
"=",
"initCd",
";",
"serializer",
"=",
"initSerializer",
";",
"in",
".",
"position",
"(",
"initPosition",
")",
";",
"finalPosition",
"=",
"initFinalPosition",
";",
"offset",
"=",
"initOffset",
";",
"}"
] | Resets the state to the initial state for future reuse. | [
"Resets",
"the",
"state",
"to",
"the",
"initial",
"state",
"for",
"future",
"reuse",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java#L90-L96 |
15,408 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java | PortableNavigatorContext.advanceContextToNextPortableToken | void advanceContextToNextPortableToken(int factoryId, int classId, int version) throws IOException {
cd = serializer.setupPositionAndDefinition(in, factoryId, classId, version);
initFinalPositionAndOffset(in, cd);
} | java | void advanceContextToNextPortableToken(int factoryId, int classId, int version) throws IOException {
cd = serializer.setupPositionAndDefinition(in, factoryId, classId, version);
initFinalPositionAndOffset(in, cd);
} | [
"void",
"advanceContextToNextPortableToken",
"(",
"int",
"factoryId",
",",
"int",
"classId",
",",
"int",
"version",
")",
"throws",
"IOException",
"{",
"cd",
"=",
"serializer",
".",
"setupPositionAndDefinition",
"(",
"in",
",",
"factoryId",
",",
"classId",
",",
"... | When we advance in the token navigation we need to re-initialise the class definition with the coordinates
of the new portable object in the context of which we will be navigating further. | [
"When",
"we",
"advance",
"in",
"the",
"token",
"navigation",
"we",
"need",
"to",
"re",
"-",
"initialise",
"the",
"class",
"definition",
"with",
"the",
"coordinates",
"of",
"the",
"new",
"portable",
"object",
"in",
"the",
"context",
"of",
"which",
"we",
"wi... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java#L138-L141 |
15,409 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java | PortableNavigatorContext.advanceContextToGivenFrame | void advanceContextToGivenFrame(NavigationFrame frame) {
in.position(frame.streamPosition);
offset = frame.streamOffset;
cd = frame.cd;
} | java | void advanceContextToGivenFrame(NavigationFrame frame) {
in.position(frame.streamPosition);
offset = frame.streamOffset;
cd = frame.cd;
} | [
"void",
"advanceContextToGivenFrame",
"(",
"NavigationFrame",
"frame",
")",
"{",
"in",
".",
"position",
"(",
"frame",
".",
"streamPosition",
")",
";",
"offset",
"=",
"frame",
".",
"streamOffset",
";",
"cd",
"=",
"frame",
".",
"cd",
";",
"}"
] | Sets up the stream for the given frame which contains all info required to change to context for a given field. | [
"Sets",
"up",
"the",
"stream",
"for",
"the",
"given",
"frame",
"which",
"contains",
"all",
"info",
"required",
"to",
"change",
"to",
"context",
"for",
"a",
"given",
"field",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/PortableNavigatorContext.java#L146-L150 |
15,410 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractHazelcastCacheManager.java | AbstractHazelcastCacheManager.getOrCreateCache | @SuppressWarnings({"unchecked", "unused"})
public <K, V> ICache<K, V> getOrCreateCache(String cacheName, CacheConfig<K, V> cacheConfig) {
ensureOpen();
String cacheNameWithPrefix = getCacheNameWithPrefix(cacheName);
ICacheInternal<?, ?> cache = caches.get(cacheNameWithPrefix);
if (ca... | java | @SuppressWarnings({"unchecked", "unused"})
public <K, V> ICache<K, V> getOrCreateCache(String cacheName, CacheConfig<K, V> cacheConfig) {
ensureOpen();
String cacheNameWithPrefix = getCacheNameWithPrefix(cacheName);
ICacheInternal<?, ?> cache = caches.get(cacheNameWithPrefix);
if (ca... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
",",
"\"unused\"",
"}",
")",
"public",
"<",
"K",
",",
"V",
">",
"ICache",
"<",
"K",
",",
"V",
">",
"getOrCreateCache",
"(",
"String",
"cacheName",
",",
"CacheConfig",
"<",
"K",
",",
"V",
">",
"cacheCo... | used in EE | [
"used",
"in",
"EE"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractHazelcastCacheManager.java#L194-L203 |
15,411 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractHazelcastCacheManager.java | AbstractHazelcastCacheManager.destroy | @Override
public void destroy() {
if (!isDestroyed.compareAndSet(false, true)) {
return;
}
deregisterLifecycleListener();
for (ICacheInternal cache : caches.values()) {
cache.destroy();
}
caches.clear();
isClosed.set(true);
p... | java | @Override
public void destroy() {
if (!isDestroyed.compareAndSet(false, true)) {
return;
}
deregisterLifecycleListener();
for (ICacheInternal cache : caches.values()) {
cache.destroy();
}
caches.clear();
isClosed.set(true);
p... | [
"@",
"Override",
"public",
"void",
"destroy",
"(",
")",
"{",
"if",
"(",
"!",
"isDestroyed",
".",
"compareAndSet",
"(",
"false",
",",
"true",
")",
")",
"{",
"return",
";",
"}",
"deregisterLifecycleListener",
"(",
")",
";",
"for",
"(",
"ICacheInternal",
"c... | Destroys all managed caches. | [
"Destroys",
"all",
"managed",
"caches",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractHazelcastCacheManager.java#L328-L343 |
15,412 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java | ConfigXmlGenerator.generate | public String generate(Config config) {
isNotNull(config, "Config");
StringBuilder xml = new StringBuilder();
XmlGenerator gen = new XmlGenerator(xml);
xml.append("<hazelcast ")
.append("xmlns=\"http://www.hazelcast.com/schema/config\"\n")
.append("xmlns... | java | public String generate(Config config) {
isNotNull(config, "Config");
StringBuilder xml = new StringBuilder();
XmlGenerator gen = new XmlGenerator(xml);
xml.append("<hazelcast ")
.append("xmlns=\"http://www.hazelcast.com/schema/config\"\n")
.append("xmlns... | [
"public",
"String",
"generate",
"(",
"Config",
"config",
")",
"{",
"isNotNull",
"(",
"config",
",",
"\"Config\"",
")",
";",
"StringBuilder",
"xml",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"XmlGenerator",
"gen",
"=",
"new",
"XmlGenerator",
"(",
"xml",
"... | Generates the XML string based on some Config.
@param config the configuration
@return the XML string | [
"Generates",
"the",
"XML",
"string",
"based",
"on",
"some",
"Config",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java#L111-L172 |
15,413 | hazelcast/hazelcast | hazelcast-client/src/main/java/com/hazelcast/client/proxy/ClientPNCounterProxy.java | ClientPNCounterProxy.toVectorClock | private VectorClock toVectorClock(List<Entry<String, Long>> replicaLogicalTimestamps) {
final VectorClock timestamps = new VectorClock();
for (Entry<String, Long> replicaTimestamp : replicaLogicalTimestamps) {
timestamps.setReplicaTimestamp(replicaTimestamp.getKey(), replicaTimestamp.getValu... | java | private VectorClock toVectorClock(List<Entry<String, Long>> replicaLogicalTimestamps) {
final VectorClock timestamps = new VectorClock();
for (Entry<String, Long> replicaTimestamp : replicaLogicalTimestamps) {
timestamps.setReplicaTimestamp(replicaTimestamp.getKey(), replicaTimestamp.getValu... | [
"private",
"VectorClock",
"toVectorClock",
"(",
"List",
"<",
"Entry",
"<",
"String",
",",
"Long",
">",
">",
"replicaLogicalTimestamps",
")",
"{",
"final",
"VectorClock",
"timestamps",
"=",
"new",
"VectorClock",
"(",
")",
";",
"for",
"(",
"Entry",
"<",
"Strin... | Transforms the list of replica logical timestamps to a vector clock instance.
@param replicaLogicalTimestamps the logical timestamps
@return a vector clock instance | [
"Transforms",
"the",
"list",
"of",
"replica",
"logical",
"timestamps",
"to",
"a",
"vector",
"clock",
"instance",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/proxy/ClientPNCounterProxy.java#L213-L219 |
15,414 | hazelcast/hazelcast | hazelcast-client/src/main/java/com/hazelcast/client/proxy/ClientPNCounterProxy.java | ClientPNCounterProxy.getMaxConfiguredReplicaCount | private int getMaxConfiguredReplicaCount() {
if (maxConfiguredReplicaCount > 0) {
return maxConfiguredReplicaCount;
} else {
final ClientMessage request = PNCounterGetConfiguredReplicaCountCodec.encodeRequest(name);
final ClientMessage response = invoke(request);
... | java | private int getMaxConfiguredReplicaCount() {
if (maxConfiguredReplicaCount > 0) {
return maxConfiguredReplicaCount;
} else {
final ClientMessage request = PNCounterGetConfiguredReplicaCountCodec.encodeRequest(name);
final ClientMessage response = invoke(request);
... | [
"private",
"int",
"getMaxConfiguredReplicaCount",
"(",
")",
"{",
"if",
"(",
"maxConfiguredReplicaCount",
">",
"0",
")",
"{",
"return",
"maxConfiguredReplicaCount",
";",
"}",
"else",
"{",
"final",
"ClientMessage",
"request",
"=",
"PNCounterGetConfiguredReplicaCountCodec"... | Returns the max configured replica count.
When invoked for the first time, this method will fetch the
configuration from a cluster member.
@return the maximum configured replica count | [
"Returns",
"the",
"max",
"configured",
"replica",
"count",
".",
"When",
"invoked",
"for",
"the",
"first",
"time",
"this",
"method",
"will",
"fetch",
"the",
"configuration",
"from",
"a",
"cluster",
"member",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/proxy/ClientPNCounterProxy.java#L392-L403 |
15,415 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/AbstractMapDataStore.java | AbstractMapDataStore.convertToObjectKeys | private List<Object> convertToObjectKeys(Collection keys) {
if (keys == null || keys.isEmpty()) {
return Collections.emptyList();
}
final List<Object> objectKeys = new ArrayList<>(keys.size());
for (Object key : keys) {
objectKeys.add(toObject(key));
}
... | java | private List<Object> convertToObjectKeys(Collection keys) {
if (keys == null || keys.isEmpty()) {
return Collections.emptyList();
}
final List<Object> objectKeys = new ArrayList<>(keys.size());
for (Object key : keys) {
objectKeys.add(toObject(key));
}
... | [
"private",
"List",
"<",
"Object",
">",
"convertToObjectKeys",
"(",
"Collection",
"keys",
")",
"{",
"if",
"(",
"keys",
"==",
"null",
"||",
"keys",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"final"... | Deserialises all of the items in the provided collection if they
are not deserialised already.
@param keys the items to be deserialised
@return the list of deserialised items | [
"Deserialises",
"all",
"of",
"the",
"items",
"in",
"the",
"provided",
"collection",
"if",
"they",
"are",
"not",
"deserialised",
"already",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/AbstractMapDataStore.java#L98-L107 |
15,416 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/AbstractQueryCacheEndToEndConstructor.java | AbstractQueryCacheEndToEndConstructor.createNew | @Override
public final InternalQueryCache createNew(String cacheId) {
try {
QueryCacheConfig queryCacheConfig = initQueryCacheConfig(request, cacheId);
if (queryCacheConfig == null) {
// no matching configuration was found, `null` will
// be returned t... | java | @Override
public final InternalQueryCache createNew(String cacheId) {
try {
QueryCacheConfig queryCacheConfig = initQueryCacheConfig(request, cacheId);
if (queryCacheConfig == null) {
// no matching configuration was found, `null` will
// be returned t... | [
"@",
"Override",
"public",
"final",
"InternalQueryCache",
"createNew",
"(",
"String",
"cacheId",
")",
"{",
"try",
"{",
"QueryCacheConfig",
"queryCacheConfig",
"=",
"initQueryCacheConfig",
"(",
"request",
",",
"cacheId",
")",
";",
"if",
"(",
"queryCacheConfig",
"==... | Here order of method calls should not change. | [
"Here",
"order",
"of",
"method",
"calls",
"should",
"not",
"change",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/AbstractQueryCacheEndToEndConstructor.java#L71-L101 |
15,417 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/AbstractQueryCacheEndToEndConstructor.java | AbstractQueryCacheEndToEndConstructor.createUnderlyingQueryCache | private InternalQueryCache createUnderlyingQueryCache(QueryCacheConfig queryCacheConfig,
QueryCacheRequest request,
String cacheId) {
SubscriberContext subscriberContext = context.getSubscriberCon... | java | private InternalQueryCache createUnderlyingQueryCache(QueryCacheConfig queryCacheConfig,
QueryCacheRequest request,
String cacheId) {
SubscriberContext subscriberContext = context.getSubscriberCon... | [
"private",
"InternalQueryCache",
"createUnderlyingQueryCache",
"(",
"QueryCacheConfig",
"queryCacheConfig",
",",
"QueryCacheRequest",
"request",
",",
"String",
"cacheId",
")",
"{",
"SubscriberContext",
"subscriberContext",
"=",
"context",
".",
"getSubscriberContext",
"(",
"... | This is the cache which we store all key-value pairs. | [
"This",
"is",
"the",
"cache",
"which",
"we",
"store",
"all",
"key",
"-",
"value",
"pairs",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/AbstractQueryCacheEndToEndConstructor.java#L106-L113 |
15,418 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/MapIndexConfig.java | MapIndexConfig.validateIndexAttribute | public static String validateIndexAttribute(String attribute) {
checkHasText(attribute, "Map index attribute must contain text");
String keyPrefix = KEY_ATTRIBUTE_NAME.value();
if (attribute.startsWith(keyPrefix) && attribute.length() > keyPrefix.length()) {
if (attribute.charAt(keyP... | java | public static String validateIndexAttribute(String attribute) {
checkHasText(attribute, "Map index attribute must contain text");
String keyPrefix = KEY_ATTRIBUTE_NAME.value();
if (attribute.startsWith(keyPrefix) && attribute.length() > keyPrefix.length()) {
if (attribute.charAt(keyP... | [
"public",
"static",
"String",
"validateIndexAttribute",
"(",
"String",
"attribute",
")",
"{",
"checkHasText",
"(",
"attribute",
",",
"\"Map index attribute must contain text\"",
")",
";",
"String",
"keyPrefix",
"=",
"KEY_ATTRIBUTE_NAME",
".",
"value",
"(",
")",
";",
... | Validates index attribute content.
@param attribute attribute to validate
@return the attribute for fluent assignment | [
"Validates",
"index",
"attribute",
"content",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/MapIndexConfig.java#L136-L146 |
15,419 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java | PublisherCreateOperation.replayEventsOverResultSet | private void replayEventsOverResultSet(QueryResult queryResult) throws Exception {
Map<Integer, Future<Object>> future = readAccumulators();
for (Map.Entry<Integer, Future<Object>> entry : future.entrySet()) {
int partitionId = entry.getKey();
Object eventsInOneAcc = entry.getVal... | java | private void replayEventsOverResultSet(QueryResult queryResult) throws Exception {
Map<Integer, Future<Object>> future = readAccumulators();
for (Map.Entry<Integer, Future<Object>> entry : future.entrySet()) {
int partitionId = entry.getKey();
Object eventsInOneAcc = entry.getVal... | [
"private",
"void",
"replayEventsOverResultSet",
"(",
"QueryResult",
"queryResult",
")",
"throws",
"Exception",
"{",
"Map",
"<",
"Integer",
",",
"Future",
"<",
"Object",
">",
">",
"future",
"=",
"readAccumulators",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entr... | Replay events over the result set of initial query. These events are
received events during execution of the initial query. | [
"Replay",
"events",
"over",
"the",
"result",
"set",
"of",
"initial",
"query",
".",
"These",
"events",
"are",
"received",
"events",
"during",
"execution",
"of",
"the",
"initial",
"query",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java#L171-L191 |
15,420 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java | PublisherCreateOperation.removePartitionResults | private void removePartitionResults(QueryResult queryResult, int partitionId) {
List<QueryResultRow> rows = queryResult.getRows();
rows.removeIf(resultRow -> getPartitionId(resultRow) == partitionId);
} | java | private void removePartitionResults(QueryResult queryResult, int partitionId) {
List<QueryResultRow> rows = queryResult.getRows();
rows.removeIf(resultRow -> getPartitionId(resultRow) == partitionId);
} | [
"private",
"void",
"removePartitionResults",
"(",
"QueryResult",
"queryResult",
",",
"int",
"partitionId",
")",
"{",
"List",
"<",
"QueryResultRow",
">",
"rows",
"=",
"queryResult",
".",
"getRows",
"(",
")",
";",
"rows",
".",
"removeIf",
"(",
"resultRow",
"->",... | Remove matching entries from given result set with the given
partition ID. | [
"Remove",
"matching",
"entries",
"from",
"given",
"result",
"set",
"with",
"the",
"given",
"partition",
"ID",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java#L197-L200 |
15,421 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java | PublisherCreateOperation.readAndResetAccumulator | private Future<Object> readAndResetAccumulator(String mapName, String cacheId, Integer partitionId) {
Operation operation = new ReadAndResetAccumulatorOperation(mapName, cacheId);
OperationService operationService = getNodeEngine().getOperationService();
return operationService.invokeOnPartition... | java | private Future<Object> readAndResetAccumulator(String mapName, String cacheId, Integer partitionId) {
Operation operation = new ReadAndResetAccumulatorOperation(mapName, cacheId);
OperationService operationService = getNodeEngine().getOperationService();
return operationService.invokeOnPartition... | [
"private",
"Future",
"<",
"Object",
">",
"readAndResetAccumulator",
"(",
"String",
"mapName",
",",
"String",
"cacheId",
",",
"Integer",
"partitionId",
")",
"{",
"Operation",
"operation",
"=",
"new",
"ReadAndResetAccumulatorOperation",
"(",
"mapName",
",",
"cacheId",... | Read and reset the accumulator of query cache inside the given partition. | [
"Read",
"and",
"reset",
"the",
"accumulator",
"of",
"query",
"cache",
"inside",
"the",
"given",
"partition",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/operation/PublisherCreateOperation.java#L229-L233 |
15,422 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/core/DistributedObjectUtil.java | DistributedObjectUtil.getName | public static String getName(DistributedObject distributedObject) {
/*
* The motivation of this behaviour is that some distributed objects (`ICache`) can have prefixed name.
* For example, for the point of view of cache,
* it has pure name and full name which contains prefixes also.
... | java | public static String getName(DistributedObject distributedObject) {
/*
* The motivation of this behaviour is that some distributed objects (`ICache`) can have prefixed name.
* For example, for the point of view of cache,
* it has pure name and full name which contains prefixes also.
... | [
"public",
"static",
"String",
"getName",
"(",
"DistributedObject",
"distributedObject",
")",
"{",
"/*\n * The motivation of this behaviour is that some distributed objects (`ICache`) can have prefixed name.\n * For example, for the point of view of cache,\n * it has pure na... | Gets the name of the given distributed object.
@param distributedObject the {@link DistributedObject} instance whose name is requested
@return name of the given distributed object | [
"Gets",
"the",
"name",
"of",
"the",
"given",
"distributed",
"object",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/core/DistributedObjectUtil.java#L33-L57 |
15,423 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cache/impl/operation/CacheExpireBatchBackupOperation.java | CacheExpireBatchBackupOperation.equalizeEntryCountWithPrimary | private void equalizeEntryCountWithPrimary() {
int diff = recordStore.size() - primaryEntryCount;
if (diff > 0) {
recordStore.sampleAndForceRemoveEntries(diff);
assert recordStore.size() == primaryEntryCount : String.format("Failed"
+ " to remove %d e... | java | private void equalizeEntryCountWithPrimary() {
int diff = recordStore.size() - primaryEntryCount;
if (diff > 0) {
recordStore.sampleAndForceRemoveEntries(diff);
assert recordStore.size() == primaryEntryCount : String.format("Failed"
+ " to remove %d e... | [
"private",
"void",
"equalizeEntryCountWithPrimary",
"(",
")",
"{",
"int",
"diff",
"=",
"recordStore",
".",
"size",
"(",
")",
"-",
"primaryEntryCount",
";",
"if",
"(",
"diff",
">",
"0",
")",
"{",
"recordStore",
".",
"sampleAndForceRemoveEntries",
"(",
"diff",
... | Equalizes backup entry count with primary in order to have identical
memory occupancy. | [
"Equalizes",
"backup",
"entry",
"count",
"with",
"primary",
"in",
"order",
"to",
"have",
"identical",
"memory",
"occupancy",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/operation/CacheExpireBatchBackupOperation.java#L65-L76 |
15,424 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/Invalidator.java | Invalidator.invalidateKey | public final void invalidateKey(Data key, String dataStructureName, String sourceUuid) {
checkNotNull(key, "key cannot be null");
checkNotNull(sourceUuid, "sourceUuid cannot be null");
Invalidation invalidation = newKeyInvalidation(key, dataStructureName, sourceUuid);
invalidateInternal... | java | public final void invalidateKey(Data key, String dataStructureName, String sourceUuid) {
checkNotNull(key, "key cannot be null");
checkNotNull(sourceUuid, "sourceUuid cannot be null");
Invalidation invalidation = newKeyInvalidation(key, dataStructureName, sourceUuid);
invalidateInternal... | [
"public",
"final",
"void",
"invalidateKey",
"(",
"Data",
"key",
",",
"String",
"dataStructureName",
",",
"String",
"sourceUuid",
")",
"{",
"checkNotNull",
"(",
"key",
",",
"\"key cannot be null\"",
")",
";",
"checkNotNull",
"(",
"sourceUuid",
",",
"\"sourceUuid ca... | Invalidates supplied key from Near Caches of supplied data structure name.
@param key key of the entry to be removed from Near Cache
@param dataStructureName name of the data structure to be invalidated | [
"Invalidates",
"supplied",
"key",
"from",
"Near",
"Caches",
"of",
"supplied",
"data",
"structure",
"name",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/Invalidator.java#L67-L73 |
15,425 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/Invalidator.java | Invalidator.invalidateAllKeys | public final void invalidateAllKeys(String dataStructureName, String sourceUuid) {
checkNotNull(sourceUuid, "sourceUuid cannot be null");
int orderKey = getPartitionId(dataStructureName);
Invalidation invalidation = newClearInvalidation(dataStructureName, sourceUuid);
sendImmediately(in... | java | public final void invalidateAllKeys(String dataStructureName, String sourceUuid) {
checkNotNull(sourceUuid, "sourceUuid cannot be null");
int orderKey = getPartitionId(dataStructureName);
Invalidation invalidation = newClearInvalidation(dataStructureName, sourceUuid);
sendImmediately(in... | [
"public",
"final",
"void",
"invalidateAllKeys",
"(",
"String",
"dataStructureName",
",",
"String",
"sourceUuid",
")",
"{",
"checkNotNull",
"(",
"sourceUuid",
",",
"\"sourceUuid cannot be null\"",
")",
";",
"int",
"orderKey",
"=",
"getPartitionId",
"(",
"dataStructureN... | Invalidates all keys from Near Caches of supplied data structure name.
@param dataStructureName name of the data structure to be cleared | [
"Invalidates",
"all",
"keys",
"from",
"Near",
"Caches",
"of",
"supplied",
"data",
"structure",
"name",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/Invalidator.java#L80-L86 |
15,426 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/DefaultRecordStore.java | DefaultRecordStore.flush | private void flush(Collection<Record> recordsToBeFlushed, boolean backup) {
for (Record record : recordsToBeFlushed) {
mapDataStore.flush(record.getKey(), record.getValue(), backup);
}
} | java | private void flush(Collection<Record> recordsToBeFlushed, boolean backup) {
for (Record record : recordsToBeFlushed) {
mapDataStore.flush(record.getKey(), record.getValue(), backup);
}
} | [
"private",
"void",
"flush",
"(",
"Collection",
"<",
"Record",
">",
"recordsToBeFlushed",
",",
"boolean",
"backup",
")",
"{",
"for",
"(",
"Record",
"record",
":",
"recordsToBeFlushed",
")",
"{",
"mapDataStore",
".",
"flush",
"(",
"record",
".",
"getKey",
"(",... | Flushes evicted records to map store.
@param recordsToBeFlushed records to be flushed to map-store.
@param backup <code>true</code> if backup, false otherwise. | [
"Flushes",
"evicted",
"records",
"to",
"map",
"store",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/DefaultRecordStore.java#L146-L150 |
15,427 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/DefaultRecordStore.java | DefaultRecordStore.readBackupData | @Override
public Data readBackupData(Data key) {
Record record = getRecord(key);
if (record == null) {
return null;
} else {
if (partitionService.isPartitionOwner(partitionId)) {
// set last access time to prevent
// premature removal ... | java | @Override
public Data readBackupData(Data key) {
Record record = getRecord(key);
if (record == null) {
return null;
} else {
if (partitionService.isPartitionOwner(partitionId)) {
// set last access time to prevent
// premature removal ... | [
"@",
"Override",
"public",
"Data",
"readBackupData",
"(",
"Data",
"key",
")",
"{",
"Record",
"record",
"=",
"getRecord",
"(",
"key",
")",
";",
"if",
"(",
"record",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"if",
"(",
"partition... | This method is called directly by user threads, in other words
it is called outside of the partition threads. | [
"This",
"method",
"is",
"called",
"directly",
"by",
"user",
"threads",
"in",
"other",
"words",
"it",
"is",
"called",
"outside",
"of",
"the",
"partition",
"threads",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/DefaultRecordStore.java#L528-L547 |
15,428 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/DefaultRecordStore.java | DefaultRecordStore.fullScanLocalDataToClear | private void fullScanLocalDataToClear(Indexes indexes) {
InternalIndex[] indexesSnapshot = indexes.getIndexes();
for (Record record : storage.values()) {
Data key = record.getKey();
Object value = Records.getValueOrCachedValue(record, serializationService);
indexes.re... | java | private void fullScanLocalDataToClear(Indexes indexes) {
InternalIndex[] indexesSnapshot = indexes.getIndexes();
for (Record record : storage.values()) {
Data key = record.getKey();
Object value = Records.getValueOrCachedValue(record, serializationService);
indexes.re... | [
"private",
"void",
"fullScanLocalDataToClear",
"(",
"Indexes",
"indexes",
")",
"{",
"InternalIndex",
"[",
"]",
"indexesSnapshot",
"=",
"indexes",
".",
"getIndexes",
"(",
")",
";",
"for",
"(",
"Record",
"record",
":",
"storage",
".",
"values",
"(",
")",
")",
... | Clears local data of this partition from global index by doing
partition full-scan. | [
"Clears",
"local",
"data",
"of",
"this",
"partition",
"from",
"global",
"index",
"by",
"doing",
"partition",
"full",
"-",
"scan",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/DefaultRecordStore.java#L1340-L1348 |
15,429 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ConfigCheck.java | ConfigCheck.isCompatible | public boolean isCompatible(ConfigCheck found) {
// check group-properties.
if (!equals(groupName, found.groupName)) {
return false;
}
verifyJoiner(found);
verifyPartitionGroup(found);
verifyPartitionCount(found);
verifyApplicationValidationToken(foun... | java | public boolean isCompatible(ConfigCheck found) {
// check group-properties.
if (!equals(groupName, found.groupName)) {
return false;
}
verifyJoiner(found);
verifyPartitionGroup(found);
verifyPartitionCount(found);
verifyApplicationValidationToken(foun... | [
"public",
"boolean",
"isCompatible",
"(",
"ConfigCheck",
"found",
")",
"{",
"// check group-properties.",
"if",
"(",
"!",
"equals",
"(",
"groupName",
",",
"found",
".",
"groupName",
")",
")",
"{",
"return",
"false",
";",
"}",
"verifyJoiner",
"(",
"found",
")... | Checks if two Hazelcast configurations are compatible.
@param found the {@link ConfigCheck} to compare this to
@return true if compatible. False if part of another group.
@throws ConfigMismatchException if the configuration is not compatible.
An exception is thrown so we can pass a nice message. | [
"Checks",
"if",
"two",
"Hazelcast",
"configurations",
"are",
"compatible",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/cluster/impl/ConfigCheck.java#L93-L104 |
15,430 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/nio/tcp/UnifiedProtocolEncoder.java | UnifiedProtocolEncoder.signalProtocolEstablished | void signalProtocolEstablished(String inboundProtocol) {
assert !channel.isClientMode() : "Signal protocol should only be made on channel in serverMode";
this.inboundProtocol = inboundProtocol;
channel.outboundPipeline().wakeup();
} | java | void signalProtocolEstablished(String inboundProtocol) {
assert !channel.isClientMode() : "Signal protocol should only be made on channel in serverMode";
this.inboundProtocol = inboundProtocol;
channel.outboundPipeline().wakeup();
} | [
"void",
"signalProtocolEstablished",
"(",
"String",
"inboundProtocol",
")",
"{",
"assert",
"!",
"channel",
".",
"isClientMode",
"(",
")",
":",
"\"Signal protocol should only be made on channel in serverMode\"",
";",
"this",
".",
"inboundProtocol",
"=",
"inboundProtocol",
... | Signals the ProtocolEncoder that the protocol is known. This call will be
made by the ProtocolDecoder as soon as it knows the inbound protocol.
@param inboundProtocol | [
"Signals",
"the",
"ProtocolEncoder",
"that",
"the",
"protocol",
"is",
"known",
".",
"This",
"call",
"will",
"be",
"made",
"by",
"the",
"ProtocolDecoder",
"as",
"soon",
"as",
"it",
"knows",
"the",
"inbound",
"protocol",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/nio/tcp/UnifiedProtocolEncoder.java#L80-L84 |
15,431 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/eviction/ExpirationManager.java | ExpirationManager.scheduleExpirationTask | public void scheduleExpirationTask() {
if (nodeEngine.getLocalMember().isLiteMember() || scheduled.get()
|| !scheduled.compareAndSet(false, true)) {
return;
}
scheduledExpirationTask =
globalTaskScheduler.scheduleWithRepetition(task, taskPeriodSeconds... | java | public void scheduleExpirationTask() {
if (nodeEngine.getLocalMember().isLiteMember() || scheduled.get()
|| !scheduled.compareAndSet(false, true)) {
return;
}
scheduledExpirationTask =
globalTaskScheduler.scheduleWithRepetition(task, taskPeriodSeconds... | [
"public",
"void",
"scheduleExpirationTask",
"(",
")",
"{",
"if",
"(",
"nodeEngine",
".",
"getLocalMember",
"(",
")",
".",
"isLiteMember",
"(",
")",
"||",
"scheduled",
".",
"get",
"(",
")",
"||",
"!",
"scheduled",
".",
"compareAndSet",
"(",
"false",
",",
... | Starts scheduling of the task that clears expired entries.
Calling this method multiple times has same effect. | [
"Starts",
"scheduling",
"of",
"the",
"task",
"that",
"clears",
"expired",
"entries",
".",
"Calling",
"this",
"method",
"multiple",
"times",
"has",
"same",
"effect",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/eviction/ExpirationManager.java#L85-L96 |
15,432 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/eviction/ExpirationManager.java | ExpirationManager.unscheduleExpirationTask | void unscheduleExpirationTask() {
scheduled.set(false);
ScheduledFuture<?> scheduledFuture = this.scheduledExpirationTask;
if (scheduledFuture != null) {
scheduledFuture.cancel(false);
}
} | java | void unscheduleExpirationTask() {
scheduled.set(false);
ScheduledFuture<?> scheduledFuture = this.scheduledExpirationTask;
if (scheduledFuture != null) {
scheduledFuture.cancel(false);
}
} | [
"void",
"unscheduleExpirationTask",
"(",
")",
"{",
"scheduled",
".",
"set",
"(",
"false",
")",
";",
"ScheduledFuture",
"<",
"?",
">",
"scheduledFuture",
"=",
"this",
".",
"scheduledExpirationTask",
";",
"if",
"(",
"scheduledFuture",
"!=",
"null",
")",
"{",
"... | Ends scheduling of the task that clears expired entries.
Calling this method multiple times has same effect. | [
"Ends",
"scheduling",
"of",
"the",
"task",
"that",
"clears",
"expired",
"entries",
".",
"Calling",
"this",
"method",
"multiple",
"times",
"has",
"same",
"effect",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/eviction/ExpirationManager.java#L102-L108 |
15,433 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsUtil.java | LocalMapStatsUtil.incrementOtherOperationsCount | public static void incrementOtherOperationsCount(MapService service, String mapName) {
MapServiceContext mapServiceContext = service.getMapServiceContext();
MapContainer mapContainer = mapServiceContext.getMapContainer(mapName);
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
... | java | public static void incrementOtherOperationsCount(MapService service, String mapName) {
MapServiceContext mapServiceContext = service.getMapServiceContext();
MapContainer mapContainer = mapServiceContext.getMapContainer(mapName);
if (mapContainer.getMapConfig().isStatisticsEnabled()) {
... | [
"public",
"static",
"void",
"incrementOtherOperationsCount",
"(",
"MapService",
"service",
",",
"String",
"mapName",
")",
"{",
"MapServiceContext",
"mapServiceContext",
"=",
"service",
".",
"getMapServiceContext",
"(",
")",
";",
"MapContainer",
"mapContainer",
"=",
"m... | Increments other operations count statistic in local map statistics.
@param service
@param mapName | [
"Increments",
"other",
"operations",
"count",
"statistic",
"in",
"local",
"map",
"statistics",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/LocalMapStatsUtil.java#L35-L42 |
15,434 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/concurrent/lock/operations/UnlockIfLeaseExpiredOperation.java | UnlockIfLeaseExpiredOperation.shouldBackup | @Override
public boolean shouldBackup() {
NodeEngine nodeEngine = getNodeEngine();
IPartitionService partitionService = nodeEngine.getPartitionService();
Address thisAddress = nodeEngine.getThisAddress();
IPartition partition = partitionService.getPartition(getPartitionId());
... | java | @Override
public boolean shouldBackup() {
NodeEngine nodeEngine = getNodeEngine();
IPartitionService partitionService = nodeEngine.getPartitionService();
Address thisAddress = nodeEngine.getThisAddress();
IPartition partition = partitionService.getPartition(getPartitionId());
... | [
"@",
"Override",
"public",
"boolean",
"shouldBackup",
"(",
")",
"{",
"NodeEngine",
"nodeEngine",
"=",
"getNodeEngine",
"(",
")",
";",
"IPartitionService",
"partitionService",
"=",
"nodeEngine",
".",
"getPartitionService",
"(",
")",
";",
"Address",
"thisAddress",
"... | This operation runs on both primary and backup
If it is running on backup we should not send a backup operation
@return | [
"This",
"operation",
"runs",
"on",
"both",
"primary",
"and",
"backup",
"If",
"it",
"is",
"running",
"on",
"backup",
"we",
"should",
"not",
"send",
"a",
"backup",
"operation"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/concurrent/lock/operations/UnlockIfLeaseExpiredOperation.java#L70-L80 |
15,435 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferExpirationPolicy.java | RingbufferExpirationPolicy.cleanup | @SuppressWarnings("unchecked")
void cleanup(Ringbuffer ringbuffer) {
if (ringbuffer.headSequence() > ringbuffer.tailSequence()) {
return;
}
long now = currentTimeMillis();
while (ringbuffer.headSequence() <= ringbuffer.tailSequence()) {
final long headSequenc... | java | @SuppressWarnings("unchecked")
void cleanup(Ringbuffer ringbuffer) {
if (ringbuffer.headSequence() > ringbuffer.tailSequence()) {
return;
}
long now = currentTimeMillis();
while (ringbuffer.headSequence() <= ringbuffer.tailSequence()) {
final long headSequenc... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"void",
"cleanup",
"(",
"Ringbuffer",
"ringbuffer",
")",
"{",
"if",
"(",
"ringbuffer",
".",
"headSequence",
"(",
")",
">",
"ringbuffer",
".",
"tailSequence",
"(",
")",
")",
"{",
"return",
";",
"}",
"long"... | Cleans up the ringbuffer by deleting all expired items. | [
"Cleans",
"up",
"the",
"ringbuffer",
"by",
"deleting",
"all",
"expired",
"items",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferExpirationPolicy.java#L40-L64 |
15,436 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/crdt/pncounter/operations/AddOperation.java | AddOperation.updateStatistics | private void updateStatistics() {
final PNCounterService service = getService();
final LocalPNCounterStatsImpl stats = service.getLocalPNCounterStats(name);
if (delta > 0) {
stats.incrementIncrementOperationCount();
} else if (delta < 0) {
stats.incrementDecrement... | java | private void updateStatistics() {
final PNCounterService service = getService();
final LocalPNCounterStatsImpl stats = service.getLocalPNCounterStats(name);
if (delta > 0) {
stats.incrementIncrementOperationCount();
} else if (delta < 0) {
stats.incrementDecrement... | [
"private",
"void",
"updateStatistics",
"(",
")",
"{",
"final",
"PNCounterService",
"service",
"=",
"getService",
"(",
")",
";",
"final",
"LocalPNCounterStatsImpl",
"stats",
"=",
"service",
".",
"getLocalPNCounterStats",
"(",
"name",
")",
";",
"if",
"(",
"delta",... | Updates the local PN counter statistics | [
"Updates",
"the",
"local",
"PN",
"counter",
"statistics"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/crdt/pncounter/operations/AddOperation.java#L73-L82 |
15,437 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/preloader/NearCachePreloader.java | NearCachePreloader.storeKeys | public void storeKeys(Iterator<K> iterator) {
long startedNanos = System.nanoTime();
FileOutputStream fos = null;
try {
buf = allocate(BUFFER_SIZE);
lastWrittenBytes = 0;
lastKeyCount = 0;
fos = new FileOutputStream(tmpStoreFile, false);
... | java | public void storeKeys(Iterator<K> iterator) {
long startedNanos = System.nanoTime();
FileOutputStream fos = null;
try {
buf = allocate(BUFFER_SIZE);
lastWrittenBytes = 0;
lastKeyCount = 0;
fos = new FileOutputStream(tmpStoreFile, false);
... | [
"public",
"void",
"storeKeys",
"(",
"Iterator",
"<",
"K",
">",
"iterator",
")",
"{",
"long",
"startedNanos",
"=",
"System",
".",
"nanoTime",
"(",
")",
";",
"FileOutputStream",
"fos",
"=",
"null",
";",
"try",
"{",
"buf",
"=",
"allocate",
"(",
"BUFFER_SIZE... | Stores the Near Cache keys from the supplied iterator.
@param iterator {@link Iterator} over the key set of a {@link com.hazelcast.internal.nearcache.NearCacheRecordStore} | [
"Stores",
"the",
"Near",
"Cache",
"keys",
"from",
"the",
"supplied",
"iterator",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/preloader/NearCachePreloader.java#L169-L204 |
15,438 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/InvocationUtil.java | InvocationUtil.invokeOnStableClusterSerial | public static ICompletableFuture<Object> invokeOnStableClusterSerial(NodeEngine nodeEngine,
Supplier<? extends Operation> operationSupplier,
int maxRetries) {
Cluste... | java | public static ICompletableFuture<Object> invokeOnStableClusterSerial(NodeEngine nodeEngine,
Supplier<? extends Operation> operationSupplier,
int maxRetries) {
Cluste... | [
"public",
"static",
"ICompletableFuture",
"<",
"Object",
">",
"invokeOnStableClusterSerial",
"(",
"NodeEngine",
"nodeEngine",
",",
"Supplier",
"<",
"?",
"extends",
"Operation",
">",
"operationSupplier",
",",
"int",
"maxRetries",
")",
"{",
"ClusterService",
"clusterSer... | Invoke operation on all cluster members.
The invocation is serial: It iterates over all members starting from the oldest member to the youngest one.
If there is a cluster membership change while invoking then it will restart invocations on all members. This
implies the operation should be idempotent.
If there is an e... | [
"Invoke",
"operation",
"on",
"all",
"cluster",
"members",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/InvocationUtil.java#L63-L87 |
15,439 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/SubscriberAccumulator.java | SubscriberAccumulator.isApplicable | private boolean isApplicable(QueryCacheEventData event) {
if (!getInfo().isPublishable()) {
return false;
}
final int partitionId = event.getPartitionId();
if (isEndEvent(event)) {
sequenceProvider.reset(partitionId);
removeFromBrokenSequences(event)... | java | private boolean isApplicable(QueryCacheEventData event) {
if (!getInfo().isPublishable()) {
return false;
}
final int partitionId = event.getPartitionId();
if (isEndEvent(event)) {
sequenceProvider.reset(partitionId);
removeFromBrokenSequences(event)... | [
"private",
"boolean",
"isApplicable",
"(",
"QueryCacheEventData",
"event",
")",
"{",
"if",
"(",
"!",
"getInfo",
"(",
")",
".",
"isPublishable",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"final",
"int",
"partitionId",
"=",
"event",
".",
"getPartition... | Checks whether the event data is applicable to the query cache. | [
"Checks",
"whether",
"the",
"event",
"data",
"is",
"applicable",
"to",
"the",
"query",
"cache",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/SubscriberAccumulator.java#L77-L101 |
15,440 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionStateManager.java | PartitionStateManager.removeUnknownMembers | void removeUnknownMembers() {
ClusterServiceImpl clusterService = node.getClusterService();
for (InternalPartitionImpl partition : partitions) {
for (int i = 0; i < InternalPartition.MAX_REPLICA_COUNT; i++) {
PartitionReplica replica = partition.getReplica(i);
... | java | void removeUnknownMembers() {
ClusterServiceImpl clusterService = node.getClusterService();
for (InternalPartitionImpl partition : partitions) {
for (int i = 0; i < InternalPartition.MAX_REPLICA_COUNT; i++) {
PartitionReplica replica = partition.getReplica(i);
... | [
"void",
"removeUnknownMembers",
"(",
")",
"{",
"ClusterServiceImpl",
"clusterService",
"=",
"node",
".",
"getClusterService",
"(",
")",
";",
"for",
"(",
"InternalPartitionImpl",
"partition",
":",
"partitions",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Checks all replicas for all partitions. If the cluster service does not contain the member for any
address in the partition table, it will remove the address from the partition.
@see ClusterService#getMember(com.hazelcast.nio.Address, String) | [
"Checks",
"all",
"replicas",
"for",
"all",
"partitions",
".",
"If",
"the",
"cluster",
"service",
"does",
"not",
"contain",
"the",
"member",
"for",
"any",
"address",
"in",
"the",
"partition",
"table",
"it",
"will",
"remove",
"the",
"address",
"from",
"the",
... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionStateManager.java#L246-L265 |
15,441 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionStateManager.java | PartitionStateManager.getPartitionsCopy | public InternalPartition[] getPartitionsCopy() {
NopPartitionListener listener = new NopPartitionListener();
InternalPartition[] result = new InternalPartition[partitions.length];
for (int i = 0; i < partitionCount; i++) {
result[i] = partitions[i].copy(listener);
}
r... | java | public InternalPartition[] getPartitionsCopy() {
NopPartitionListener listener = new NopPartitionListener();
InternalPartition[] result = new InternalPartition[partitions.length];
for (int i = 0; i < partitionCount; i++) {
result[i] = partitions[i].copy(listener);
}
r... | [
"public",
"InternalPartition",
"[",
"]",
"getPartitionsCopy",
"(",
")",
"{",
"NopPartitionListener",
"listener",
"=",
"new",
"NopPartitionListener",
"(",
")",
";",
"InternalPartition",
"[",
"]",
"result",
"=",
"new",
"InternalPartition",
"[",
"partitions",
".",
"l... | Returns a copy of the current partition table. | [
"Returns",
"a",
"copy",
"of",
"the",
"current",
"partition",
"table",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/partition/impl/PartitionStateManager.java#L282-L289 |
15,442 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/ExceptionUtil.java | ExceptionUtil.rethrowAllowedTypeFirst | public static <T extends Throwable> RuntimeException rethrowAllowedTypeFirst(final Throwable t,
Class<T> allowedType) throws T {
rethrowIfError(t);
if (allowedType.isAssignableFrom(t.getClass())) {
throw (T) t;
... | java | public static <T extends Throwable> RuntimeException rethrowAllowedTypeFirst(final Throwable t,
Class<T> allowedType) throws T {
rethrowIfError(t);
if (allowedType.isAssignableFrom(t.getClass())) {
throw (T) t;
... | [
"public",
"static",
"<",
"T",
"extends",
"Throwable",
">",
"RuntimeException",
"rethrowAllowedTypeFirst",
"(",
"final",
"Throwable",
"t",
",",
"Class",
"<",
"T",
">",
"allowedType",
")",
"throws",
"T",
"{",
"rethrowIfError",
"(",
"t",
")",
";",
"if",
"(",
... | This rethrow the exception providing an allowed Exception in first priority, even it is a Runtime exception | [
"This",
"rethrow",
"the",
"exception",
"providing",
"an",
"allowed",
"Exception",
"in",
"first",
"priority",
"even",
"it",
"is",
"a",
"Runtime",
"exception"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/ExceptionUtil.java#L145-L153 |
15,443 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/SerializerConfig.java | SerializerConfig.setClass | public SerializerConfig setClass(final Class<? extends Serializer> clazz) {
String className = clazz == null ? null : clazz.getName();
return setClassName(className);
} | java | public SerializerConfig setClass(final Class<? extends Serializer> clazz) {
String className = clazz == null ? null : clazz.getName();
return setClassName(className);
} | [
"public",
"SerializerConfig",
"setClass",
"(",
"final",
"Class",
"<",
"?",
"extends",
"Serializer",
">",
"clazz",
")",
"{",
"String",
"className",
"=",
"clazz",
"==",
"null",
"?",
"null",
":",
"clazz",
".",
"getName",
"(",
")",
";",
"return",
"setClassName... | Sets the class of the serializer implementation.
@param clazz the set class of the serializer implementation
@return SerializerConfig | [
"Sets",
"the",
"class",
"of",
"the",
"serializer",
"implementation",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/SerializerConfig.java#L59-L62 |
15,444 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/CyclicWriteBehindQueue.java | CyclicWriteBehindQueue.contains | @Override
public boolean contains(DelayedEntry entry) {
Data key = (Data) entry.getKey();
return index.containsKey(key);
} | java | @Override
public boolean contains(DelayedEntry entry) {
Data key = (Data) entry.getKey();
return index.containsKey(key);
} | [
"@",
"Override",
"public",
"boolean",
"contains",
"(",
"DelayedEntry",
"entry",
")",
"{",
"Data",
"key",
"=",
"(",
"Data",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"return",
"index",
".",
"containsKey",
"(",
"key",
")",
";",
"}"
] | Checks whether an item exist in queue or not.
@param entry item to be checked
@return <code>true</code> if exists, <code>false</code> otherwise | [
"Checks",
"whether",
"an",
"item",
"exist",
"in",
"queue",
"or",
"not",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/CyclicWriteBehindQueue.java#L109-L113 |
15,445 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/CyclicWriteBehindQueue.java | CyclicWriteBehindQueue.drainTo | @Override
public int drainTo(Collection<DelayedEntry> collection) {
checkNotNull(collection, "collection can not be null");
Iterator<DelayedEntry> iterator = deque.iterator();
while (iterator.hasNext()) {
DelayedEntry e = iterator.next();
collection.add(e);
... | java | @Override
public int drainTo(Collection<DelayedEntry> collection) {
checkNotNull(collection, "collection can not be null");
Iterator<DelayedEntry> iterator = deque.iterator();
while (iterator.hasNext()) {
DelayedEntry e = iterator.next();
collection.add(e);
... | [
"@",
"Override",
"public",
"int",
"drainTo",
"(",
"Collection",
"<",
"DelayedEntry",
">",
"collection",
")",
"{",
"checkNotNull",
"(",
"collection",
",",
"\"collection can not be null\"",
")",
";",
"Iterator",
"<",
"DelayedEntry",
">",
"iterator",
"=",
"deque",
... | Removes all available elements from this queue and adds them
to the given collection.
@param collection all elements to be added to this collection.
@return number of removed items from this queue. | [
"Removes",
"all",
"available",
"elements",
"from",
"this",
"queue",
"and",
"adds",
"them",
"to",
"the",
"given",
"collection",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/CyclicWriteBehindQueue.java#L133-L145 |
15,446 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getInt | public static int getInt(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asInt();
} | java | public static int getInt(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asInt();
} | [
"public",
"static",
"int",
"getInt",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"return",
... | Returns a field in a Json object as an int.
Throws IllegalArgumentException if the field value is null.
@param object the Json Object
@param field the field in the Json object to return
@return the Json field value as an int | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"an",
"int",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L45-L49 |
15,447 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getInt | public static int getInt(JsonObject object, String field, int defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asInt();
}
} | java | public static int getInt(JsonObject object, String field, int defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asInt();
}
} | [
"public",
"static",
"int",
"getInt",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"int",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"null",
"||",
"v... | Returns a field in a Json object as an int.
@param object the Json Object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as an int | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"an",
"int",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L59-L66 |
15,448 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getLong | public static long getLong(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asLong();
} | java | public static long getLong(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asLong();
} | [
"public",
"static",
"long",
"getLong",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"return",
... | Returns a field in a Json object as a long.
Throws IllegalArgumentException if the field value is null.
@param object the Json Object
@param field the field in the Json object to return
@return the Json field value as a long | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"long",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L76-L80 |
15,449 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getLong | public static long getLong(JsonObject object, String field, long defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asLong();
}
} | java | public static long getLong(JsonObject object, String field, long defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asLong();
}
} | [
"public",
"static",
"long",
"getLong",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"long",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"null",
"||",
... | Returns a field in a Json object as a long.
@param object the Json Object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as a long | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"long",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L90-L97 |
15,450 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getDouble | public static double getDouble(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asDouble();
} | java | public static double getDouble(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asDouble();
} | [
"public",
"static",
"double",
"getDouble",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"retur... | Returns a field in a Json object as a double.
Throws IllegalArgumentException if the field value is null.
@param object the Json Object
@param field the field in the Json object to return
@return the Json field value as a double | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"double",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L107-L111 |
15,451 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getDouble | public static double getDouble(JsonObject object, String field, double defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asDouble();
}
} | java | public static double getDouble(JsonObject object, String field, double defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asDouble();
}
} | [
"public",
"static",
"double",
"getDouble",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"double",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"null",
"... | Returns a field in a Json object as a double.
@param object the Json Object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as a double | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"double",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L120-L127 |
15,452 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getFloat | public static float getFloat(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asFloat();
} | java | public static float getFloat(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asFloat();
} | [
"public",
"static",
"float",
"getFloat",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"return"... | Returns a field in a Json object as a float.
Throws IllegalArgumentException if the field value is null.
@param object the Json Object
@param field the field in the Json object to return
@return the Json field value as a float | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"float",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L137-L141 |
15,453 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getFloat | public static float getFloat(JsonObject object, String field, float defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asFloat();
}
} | java | public static float getFloat(JsonObject object, String field, float defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asFloat();
}
} | [
"public",
"static",
"float",
"getFloat",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"float",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"null",
"||"... | Returns a field in a Json object as a float.
@param object the Json Object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as a float | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"float",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L151-L158 |
15,454 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getString | public static String getString(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asString();
} | java | public static String getString(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asString();
} | [
"public",
"static",
"String",
"getString",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"retur... | Returns a field in a Json object as a string.
Throws IllegalArgumentException if the field value is null.
@param object the Json Object
@param field the field in the Json object to return
@return the Json field value as a string | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"string",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L168-L172 |
15,455 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getString | public static String getString(JsonObject object, String field, String defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asString();
}
} | java | public static String getString(JsonObject object, String field, String defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asString();
}
} | [
"public",
"static",
"String",
"getString",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"String",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"null",
"... | Returns a field in a Json object as a string.
@param object the Json Object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as a string | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"string",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L182-L189 |
15,456 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getBoolean | public static boolean getBoolean(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asBoolean();
} | java | public static boolean getBoolean(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asBoolean();
} | [
"public",
"static",
"boolean",
"getBoolean",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"ret... | Returns a field in a Json object as a boolean.
Throws IllegalArgumentException if the field value is null.
@param object the Json Object
@param field the field in the Json object to return
@return the Json field value as a boolean | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"boolean",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L199-L203 |
15,457 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getBoolean | public static boolean getBoolean(JsonObject object, String field, boolean defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asBoolean();
}
} | java | public static boolean getBoolean(JsonObject object, String field, boolean defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asBoolean();
}
} | [
"public",
"static",
"boolean",
"getBoolean",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"boolean",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"null",
... | Returns a field in a Json object as a boolean.
@param object the Json Object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as a boolean | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"a",
"boolean",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L213-L220 |
15,458 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getArray | public static JsonArray getArray(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asArray();
} | java | public static JsonArray getArray(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asArray();
} | [
"public",
"static",
"JsonArray",
"getArray",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"ret... | Returns a field in a Json object as an array.
Throws IllegalArgumentException if the field value is null.
@param object the Json Object
@param field the field in the Json object to return
@return the Json field value as an array | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"an",
"array",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L230-L234 |
15,459 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getArray | public static JsonArray getArray(JsonObject object, String field, JsonArray defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asArray();
}
} | java | public static JsonArray getArray(JsonObject object, String field, JsonArray defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asArray();
}
} | [
"public",
"static",
"JsonArray",
"getArray",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"JsonArray",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"null"... | Returns a field in a Json object as an array.
@param object the Json Object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as a Json array | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"an",
"array",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L244-L251 |
15,460 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getObject | public static JsonObject getObject(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asObject();
} | java | public static JsonObject getObject(JsonObject object, String field) {
final JsonValue value = object.get(field);
throwExceptionIfNull(value, field);
return value.asObject();
} | [
"public",
"static",
"JsonObject",
"getObject",
"(",
"JsonObject",
"object",
",",
"String",
"field",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"throwExceptionIfNull",
"(",
"value",
",",
"field",
")",
";",
"r... | Returns a field in a Json object as an object.
Throws IllegalArgumentException if the field value is null.
@param object the Json object
@param field the field in the Json object to return
@return the Json field value as a Json object | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"an",
"object",
".",
"Throws",
"IllegalArgumentException",
"if",
"the",
"field",
"value",
"is",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L261-L265 |
15,461 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.getObject | public static JsonObject getObject(JsonObject object, String field, JsonObject defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asObject();
}
} | java | public static JsonObject getObject(JsonObject object, String field, JsonObject defaultValue) {
final JsonValue value = object.get(field);
if (value == null || value.isNull()) {
return defaultValue;
} else {
return value.asObject();
}
} | [
"public",
"static",
"JsonObject",
"getObject",
"(",
"JsonObject",
"object",
",",
"String",
"field",
",",
"JsonObject",
"defaultValue",
")",
"{",
"final",
"JsonValue",
"value",
"=",
"object",
".",
"get",
"(",
"field",
")",
";",
"if",
"(",
"value",
"==",
"nu... | Returns a field in a Json object as an object.
@param object the Json object
@param field the field in the Json object to return
@param defaultValue a default value for the field if the field value is null
@return the Json field value as a Json object | [
"Returns",
"a",
"field",
"in",
"a",
"Json",
"object",
"as",
"an",
"object",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L275-L282 |
15,462 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java | JsonUtil.toJsonCollection | private static String toJsonCollection(Collection objects) {
Iterator iterator = objects.iterator();
if (!iterator.hasNext()) {
return "";
}
final Object first = iterator.next();
if (!iterator.hasNext()) {
return toJson(first);
}
final Str... | java | private static String toJsonCollection(Collection objects) {
Iterator iterator = objects.iterator();
if (!iterator.hasNext()) {
return "";
}
final Object first = iterator.next();
if (!iterator.hasNext()) {
return toJson(first);
}
final Str... | [
"private",
"static",
"String",
"toJsonCollection",
"(",
"Collection",
"objects",
")",
"{",
"Iterator",
"iterator",
"=",
"objects",
".",
"iterator",
"(",
")",
";",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"return",
"\"\"",
";",
"}",... | Serializes a collection of objects into its JSON representation.
@param objects collection of items to be serialized into JSON
@return the serialized JSON | [
"Serializes",
"a",
"collection",
"of",
"objects",
"into",
"its",
"JSON",
"representation",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L346-L369 |
15,463 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/spi/blocking/ResourceRegistry.java | ResourceRegistry.getWaitTimeouts | public final Map<Tuple2<String, UUID>, Tuple2<Long, Long>> getWaitTimeouts() {
return unmodifiableMap(waitTimeouts);
} | java | public final Map<Tuple2<String, UUID>, Tuple2<Long, Long>> getWaitTimeouts() {
return unmodifiableMap(waitTimeouts);
} | [
"public",
"final",
"Map",
"<",
"Tuple2",
"<",
"String",
",",
"UUID",
">",
",",
"Tuple2",
"<",
"Long",
",",
"Long",
">",
">",
"getWaitTimeouts",
"(",
")",
"{",
"return",
"unmodifiableMap",
"(",
"waitTimeouts",
")",
";",
"}"
] | queried locally in tests | [
"queried",
"locally",
"in",
"tests"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/datastructures/spi/blocking/ResourceRegistry.java#L203-L205 |
15,464 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java | RingbufferContainer.init | public void init(RingbufferConfig config, NodeEngine nodeEngine) {
this.config = config;
this.serializationService = nodeEngine.getSerializationService();
initRingbufferStore(nodeEngine.getConfigClassLoader());
} | java | public void init(RingbufferConfig config, NodeEngine nodeEngine) {
this.config = config;
this.serializationService = nodeEngine.getSerializationService();
initRingbufferStore(nodeEngine.getConfigClassLoader());
} | [
"public",
"void",
"init",
"(",
"RingbufferConfig",
"config",
",",
"NodeEngine",
"nodeEngine",
")",
"{",
"this",
".",
"config",
"=",
"config",
";",
"this",
".",
"serializationService",
"=",
"nodeEngine",
".",
"getSerializationService",
"(",
")",
";",
"initRingbuf... | Initializes the ring buffer with references to other services, the
ringbuffer store and the config. This is because on a replication
operation the container is only partially constructed. The init method
finishes the configuration of the ring buffer container for further
usage.
@param config the configuration of t... | [
"Initializes",
"the",
"ring",
"buffer",
"with",
"references",
"to",
"other",
"services",
"the",
"ringbuffer",
"store",
"and",
"the",
"config",
".",
"This",
"is",
"because",
"on",
"a",
"replication",
"operation",
"the",
"container",
"is",
"only",
"partially",
"... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L141-L145 |
15,465 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java | RingbufferContainer.addAll | public long addAll(T[] items) {
long firstSequence = ringbuffer.peekNextTailSequence();
long lastSequence = ringbuffer.peekNextTailSequence();
if (store.isEnabled() && items.length != 0) {
try {
store.storeAll(firstSequence, convertToData(items));
} catch... | java | public long addAll(T[] items) {
long firstSequence = ringbuffer.peekNextTailSequence();
long lastSequence = ringbuffer.peekNextTailSequence();
if (store.isEnabled() && items.length != 0) {
try {
store.storeAll(firstSequence, convertToData(items));
} catch... | [
"public",
"long",
"addAll",
"(",
"T",
"[",
"]",
"items",
")",
"{",
"long",
"firstSequence",
"=",
"ringbuffer",
".",
"peekNextTailSequence",
"(",
")",
";",
"long",
"lastSequence",
"=",
"ringbuffer",
".",
"peekNextTailSequence",
"(",
")",
";",
"if",
"(",
"st... | Adds all items to the ringbuffer. Sets the expiration time if TTL is
configured and also attempts to store the items in the data store if one
is configured.
@param items items to be stored in the ring buffer and data store
@return the sequence ID of the last item stored in the ring buffer
@throws HazelcastException ... | [
"Adds",
"all",
"items",
"to",
"the",
"ringbuffer",
".",
"Sets",
"the",
"expiration",
"time",
"if",
"TTL",
"is",
"configured",
"and",
"also",
"attempts",
"to",
"store",
"the",
"items",
"in",
"the",
"data",
"store",
"if",
"one",
"is",
"configured",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L321-L337 |
15,466 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java | RingbufferContainer.set | @SuppressWarnings("unchecked")
public void set(long sequenceId, T item) {
final E rbItem = convertToRingbufferFormat(item);
// first we write the dataItem in the ring.
ringbuffer.set(sequenceId, rbItem);
if (sequenceId > tailSequence()) {
ringbuffer.setTailSequence(sequ... | java | @SuppressWarnings("unchecked")
public void set(long sequenceId, T item) {
final E rbItem = convertToRingbufferFormat(item);
// first we write the dataItem in the ring.
ringbuffer.set(sequenceId, rbItem);
if (sequenceId > tailSequence()) {
ringbuffer.setTailSequence(sequ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"void",
"set",
"(",
"long",
"sequenceId",
",",
"T",
"item",
")",
"{",
"final",
"E",
"rbItem",
"=",
"convertToRingbufferFormat",
"(",
"item",
")",
";",
"// first we write the dataItem in the ring.",
"rin... | Sets the item at the given sequence ID and updates the expiration time
if TTL is configured.
Unlike other methods for adding items into the ring buffer, does not
attempt to store the item in the data store. This method expands the
ring buffer tail and head sequence to accommodate for the sequence.
This means that it wi... | [
"Sets",
"the",
"item",
"at",
"the",
"given",
"sequence",
"ID",
"and",
"updates",
"the",
"expiration",
"time",
"if",
"TTL",
"is",
"configured",
".",
"Unlike",
"other",
"methods",
"for",
"adding",
"items",
"into",
"the",
"ring",
"buffer",
"does",
"not",
"att... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L354-L376 |
15,467 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java | RingbufferContainer.readAsData | public Data readAsData(long sequence) {
checkReadSequence(sequence);
Object rbItem = readOrLoadItem(sequence);
return serializationService.toData(rbItem);
} | java | public Data readAsData(long sequence) {
checkReadSequence(sequence);
Object rbItem = readOrLoadItem(sequence);
return serializationService.toData(rbItem);
} | [
"public",
"Data",
"readAsData",
"(",
"long",
"sequence",
")",
"{",
"checkReadSequence",
"(",
"sequence",
")",
";",
"Object",
"rbItem",
"=",
"readOrLoadItem",
"(",
"sequence",
")",
";",
"return",
"serializationService",
".",
"toData",
"(",
"rbItem",
")",
";",
... | Reads one item from the ring buffer and returns the serialized format.
If the item is not available, it will try and load it from the ringbuffer store.
If the stored format is already serialized, there is no serialization.
@param sequence The sequence of the item to be read
@return The item read
@throws StaleSequenceE... | [
"Reads",
"one",
"item",
"from",
"the",
"ring",
"buffer",
"and",
"returns",
"the",
"serialized",
"format",
".",
"If",
"the",
"item",
"is",
"not",
"available",
"it",
"will",
"try",
"and",
"load",
"it",
"from",
"the",
"ringbuffer",
"store",
".",
"If",
"the"... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L389-L393 |
15,468 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java | RingbufferContainer.checkReadSequence | private void checkReadSequence(long sequence) {
final long tailSequence = ringbuffer.tailSequence();
if (sequence > tailSequence) {
throw new IllegalArgumentException("sequence:" + sequence
+ " is too large. The current tailSequence is:" + tailSequence);
}
... | java | private void checkReadSequence(long sequence) {
final long tailSequence = ringbuffer.tailSequence();
if (sequence > tailSequence) {
throw new IllegalArgumentException("sequence:" + sequence
+ " is too large. The current tailSequence is:" + tailSequence);
}
... | [
"private",
"void",
"checkReadSequence",
"(",
"long",
"sequence",
")",
"{",
"final",
"long",
"tailSequence",
"=",
"ringbuffer",
".",
"tailSequence",
"(",
")",
";",
"if",
"(",
"sequence",
">",
"tailSequence",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | Check if the sequence can be read from the ring buffer.
@param sequence the sequence wanting to be read
@throws StaleSequenceException if the requested sequence is smaller than the head sequence and the data
store is not enabled
@throws IllegalArgumentException if the requested sequence is greater than the tail sequ... | [
"Check",
"if",
"the",
"sequence",
"can",
"be",
"read",
"from",
"the",
"ring",
"buffer",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L472-L484 |
15,469 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java | RingbufferContainer.readOrLoadItem | private Object readOrLoadItem(long sequence) {
Object item;
if (sequence < ringbuffer.headSequence() && store.isEnabled()) {
item = store.load(sequence);
} else {
item = ringbuffer.read(sequence);
}
return item;
} | java | private Object readOrLoadItem(long sequence) {
Object item;
if (sequence < ringbuffer.headSequence() && store.isEnabled()) {
item = store.load(sequence);
} else {
item = ringbuffer.read(sequence);
}
return item;
} | [
"private",
"Object",
"readOrLoadItem",
"(",
"long",
"sequence",
")",
"{",
"Object",
"item",
";",
"if",
"(",
"sequence",
"<",
"ringbuffer",
".",
"headSequence",
"(",
")",
"&&",
"store",
".",
"isEnabled",
"(",
")",
")",
"{",
"item",
"=",
"store",
".",
"l... | Reads the item at the specified sequence or loads it from the ringbuffer
store if one is enabled. The type of the returned object is equal to the
ringbuffer format. | [
"Reads",
"the",
"item",
"at",
"the",
"specified",
"sequence",
"or",
"loads",
"it",
"from",
"the",
"ringbuffer",
"store",
"if",
"one",
"is",
"enabled",
".",
"The",
"type",
"of",
"the",
"returned",
"object",
"is",
"equal",
"to",
"the",
"ringbuffer",
"format"... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L491-L499 |
15,470 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java | RingbufferContainer.convertToData | private Data[] convertToData(T[] items) {
if (items == null || items.length == 0) {
return new Data[0];
}
if (items[0] instanceof Data) {
return (Data[]) items;
}
final Data[] ret = new Data[items.length];
for (int i = 0; i < items.length; i++) {
... | java | private Data[] convertToData(T[] items) {
if (items == null || items.length == 0) {
return new Data[0];
}
if (items[0] instanceof Data) {
return (Data[]) items;
}
final Data[] ret = new Data[items.length];
for (int i = 0; i < items.length; i++) {
... | [
"private",
"Data",
"[",
"]",
"convertToData",
"(",
"T",
"[",
"]",
"items",
")",
"{",
"if",
"(",
"items",
"==",
"null",
"||",
"items",
".",
"length",
"==",
"0",
")",
"{",
"return",
"new",
"Data",
"[",
"0",
"]",
";",
"}",
"if",
"(",
"items",
"[",... | Convert the supplied argument into serialized format.
@throws HazelcastSerializationException when serialization fails. | [
"Convert",
"the",
"supplied",
"argument",
"into",
"serialized",
"format",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/ringbuffer/impl/RingbufferContainer.java#L545-L557 |
15,471 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/AbstractEvictableRecordStore.java | AbstractEvictableRecordStore.getOrNullIfExpired | protected Record getOrNullIfExpired(Record record, long now, boolean backup) {
if (!isRecordStoreExpirable()) {
return record;
}
if (record == null) {
return null;
}
Data key = record.getKey();
if (isLocked(key)) {
return record;
... | java | protected Record getOrNullIfExpired(Record record, long now, boolean backup) {
if (!isRecordStoreExpirable()) {
return record;
}
if (record == null) {
return null;
}
Data key = record.getKey();
if (isLocked(key)) {
return record;
... | [
"protected",
"Record",
"getOrNullIfExpired",
"(",
"Record",
"record",
",",
"long",
"now",
",",
"boolean",
"backup",
")",
"{",
"if",
"(",
"!",
"isRecordStoreExpirable",
"(",
")",
")",
"{",
"return",
"record",
";",
"}",
"if",
"(",
"record",
"==",
"null",
"... | Check if record is reachable according to TTL or idle times.
If not reachable return null.
@param record {@link com.hazelcast.map.impl.record.Record}
@return null if evictable. | [
"Check",
"if",
"record",
"is",
"reachable",
"according",
"to",
"TTL",
"or",
"idle",
"times",
".",
"If",
"not",
"reachable",
"return",
"null",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/recordstore/AbstractEvictableRecordStore.java#L220-L239 |
15,472 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/query/impl/getters/Getter.java | Getter.getValue | Object getValue(Object obj, String attributePath, Object metadata) throws Exception {
return getValue(obj, attributePath);
} | java | Object getValue(Object obj, String attributePath, Object metadata) throws Exception {
return getValue(obj, attributePath);
} | [
"Object",
"getValue",
"(",
"Object",
"obj",
",",
"String",
"attributePath",
",",
"Object",
"metadata",
")",
"throws",
"Exception",
"{",
"return",
"getValue",
"(",
"obj",
",",
"attributePath",
")",
";",
"}"
] | Method for generic getters that can make use of metadata if available. These getters must
gracefully fallback to not using metadata if unavailable. | [
"Method",
"for",
"generic",
"getters",
"that",
"can",
"make",
"use",
"of",
"metadata",
"if",
"available",
".",
"These",
"getters",
"must",
"gracefully",
"fallback",
"to",
"not",
"using",
"metadata",
"if",
"unavailable",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/getters/Getter.java#L47-L49 |
15,473 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/query/impl/IndexHeapMemoryCostUtil.java | IndexHeapMemoryCostUtil.estimateValueCost | @SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:returncount"})
public static long estimateValueCost(Object value) {
if (value == null) {
return 0;
}
Class<?> clazz = value.getClass();
Integer cost = KNOWN_FINAL_CLASSES_COSTS.get(clazz);
if (cost != n... | java | @SuppressWarnings({"checkstyle:npathcomplexity", "checkstyle:returncount"})
public static long estimateValueCost(Object value) {
if (value == null) {
return 0;
}
Class<?> clazz = value.getClass();
Integer cost = KNOWN_FINAL_CLASSES_COSTS.get(clazz);
if (cost != n... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"checkstyle:npathcomplexity\"",
",",
"\"checkstyle:returncount\"",
"}",
")",
"public",
"static",
"long",
"estimateValueCost",
"(",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"0",
";",
... | Estimates the on-heap memory cost of the given value.
@param value the value to estimate the cost of.
@return the estimated value cost. | [
"Estimates",
"the",
"on",
"-",
"heap",
"memory",
"cost",
"of",
"the",
"given",
"value",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/IndexHeapMemoryCostUtil.java#L82-L120 |
15,474 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/query/impl/IndexHeapMemoryCostUtil.java | IndexHeapMemoryCostUtil.estimateMapCost | public static long estimateMapCost(long size, boolean ordered, boolean usesCachedQueryableEntries) {
long mapCost;
if (ordered) {
mapCost = BASE_CONCURRENT_SKIP_LIST_MAP_COST + size * CONCURRENT_SKIP_LIST_MAP_ENTRY_COST;
} else {
mapCost = BASE_CONCURRENT_HASH_MAP_COST + ... | java | public static long estimateMapCost(long size, boolean ordered, boolean usesCachedQueryableEntries) {
long mapCost;
if (ordered) {
mapCost = BASE_CONCURRENT_SKIP_LIST_MAP_COST + size * CONCURRENT_SKIP_LIST_MAP_ENTRY_COST;
} else {
mapCost = BASE_CONCURRENT_HASH_MAP_COST + ... | [
"public",
"static",
"long",
"estimateMapCost",
"(",
"long",
"size",
",",
"boolean",
"ordered",
",",
"boolean",
"usesCachedQueryableEntries",
")",
"{",
"long",
"mapCost",
";",
"if",
"(",
"ordered",
")",
"{",
"mapCost",
"=",
"BASE_CONCURRENT_SKIP_LIST_MAP_COST",
"+"... | Estimates the on-heap memory cost of a map backing an index.
@param size the size of the map to estimate the cost
of.
@param ordered {@code true} if the index managing the
map being estimated is ordered, {@code
false} otherwise.
@param usesCachedQueryableEntries {@code true} if q... | [
"Estimates",
"the",
"on",
"-",
"heap",
"memory",
"cost",
"of",
"a",
"map",
"backing",
"an",
"index",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/IndexHeapMemoryCostUtil.java#L135-L151 |
15,475 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/metrics/impl/ProbeUtils.java | ProbeUtils.getType | static int getType(Class classType) {
Integer type = TYPES.get(classType);
if (type != null) {
return type;
}
List<Class<?>> flattenedClasses = new ArrayList<Class<?>>();
flatten(classType, flattenedClasses);
for (Class<?> clazz : flattenedClasses) {
... | java | static int getType(Class classType) {
Integer type = TYPES.get(classType);
if (type != null) {
return type;
}
List<Class<?>> flattenedClasses = new ArrayList<Class<?>>();
flatten(classType, flattenedClasses);
for (Class<?> clazz : flattenedClasses) {
... | [
"static",
"int",
"getType",
"(",
"Class",
"classType",
")",
"{",
"Integer",
"type",
"=",
"TYPES",
".",
"get",
"(",
"classType",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"return",
"type",
";",
"}",
"List",
"<",
"Class",
"<",
"?",
">",
... | Gets the accessible object probe type for this class object type.
accessible object probe class object
TYPE_PRIMITIVE_LONG = 1 byte, short, int, long
TYPE_LONG_NUMBER = 2 Byte, Short, Integer, Long, AtomicInteger, AtomicLong
TYPE_DOUBLE_PRIMITIVE = 3 double, float
TYPE_DOUBLE_NUMBER = 4 Double, Float
T... | [
"Gets",
"the",
"accessible",
"object",
"probe",
"type",
"for",
"this",
"class",
"object",
"type",
".",
"accessible",
"object",
"probe",
"class",
"object",
"TYPE_PRIMITIVE_LONG",
"=",
"1",
"byte",
"short",
"int",
"long",
"TYPE_LONG_NUMBER",
"=",
"2",
"Byte",
"S... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/metrics/impl/ProbeUtils.java#L101-L119 |
15,476 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/nio/tcp/DefaultChannelInitializerProvider.java | DefaultChannelInitializerProvider.checkSslConfigAvailability | private void checkSslConfigAvailability(Config config) {
if (config.getAdvancedNetworkConfig().isEnabled()) {
return;
}
SSLConfig sslConfig = config.getNetworkConfig().getSSLConfig();
checkSslConfigAvailability(sslConfig);
} | java | private void checkSslConfigAvailability(Config config) {
if (config.getAdvancedNetworkConfig().isEnabled()) {
return;
}
SSLConfig sslConfig = config.getNetworkConfig().getSSLConfig();
checkSslConfigAvailability(sslConfig);
} | [
"private",
"void",
"checkSslConfigAvailability",
"(",
"Config",
"config",
")",
"{",
"if",
"(",
"config",
".",
"getAdvancedNetworkConfig",
"(",
")",
".",
"isEnabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"SSLConfig",
"sslConfig",
"=",
"config",
".",
"getNe... | check SSL config for unisocket member configuration | [
"check",
"SSL",
"config",
"for",
"unisocket",
"member",
"configuration"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/nio/tcp/DefaultChannelInitializerProvider.java#L112-L118 |
15,477 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/nio/tcp/DefaultChannelInitializerProvider.java | DefaultChannelInitializerProvider.checkSslConfigAvailability | private void checkSslConfigAvailability(SSLConfig sslConfig) {
if (sslConfig != null && sslConfig.isEnabled()) {
if (!BuildInfoProvider.getBuildInfo().isEnterprise()) {
throw new IllegalStateException("SSL/TLS requires Hazelcast Enterprise Edition");
}
}
} | java | private void checkSslConfigAvailability(SSLConfig sslConfig) {
if (sslConfig != null && sslConfig.isEnabled()) {
if (!BuildInfoProvider.getBuildInfo().isEnterprise()) {
throw new IllegalStateException("SSL/TLS requires Hazelcast Enterprise Edition");
}
}
} | [
"private",
"void",
"checkSslConfigAvailability",
"(",
"SSLConfig",
"sslConfig",
")",
"{",
"if",
"(",
"sslConfig",
"!=",
"null",
"&&",
"sslConfig",
".",
"isEnabled",
"(",
")",
")",
"{",
"if",
"(",
"!",
"BuildInfoProvider",
".",
"getBuildInfo",
"(",
")",
".",
... | check given SSL config | [
"check",
"given",
"SSL",
"config"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/nio/tcp/DefaultChannelInitializerProvider.java#L121-L127 |
15,478 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/wan/merkletree/MerkleTreeUtil.java | MerkleTreeUtil.getNodeRangeLow | static int getNodeRangeLow(int nodeOrder) {
int level = getLevelOfNode(nodeOrder);
int leftMostLeafOrder = getLeftMostNodeOrderOnLevel(level);
int levelHashStep = (int) getNodeHashRangeOnLevel(level);
int leafOrderOnLevel = nodeOrder - leftMostLeafOrder;
return Integer.MIN_VALUE... | java | static int getNodeRangeLow(int nodeOrder) {
int level = getLevelOfNode(nodeOrder);
int leftMostLeafOrder = getLeftMostNodeOrderOnLevel(level);
int levelHashStep = (int) getNodeHashRangeOnLevel(level);
int leafOrderOnLevel = nodeOrder - leftMostLeafOrder;
return Integer.MIN_VALUE... | [
"static",
"int",
"getNodeRangeLow",
"(",
"int",
"nodeOrder",
")",
"{",
"int",
"level",
"=",
"getLevelOfNode",
"(",
"nodeOrder",
")",
";",
"int",
"leftMostLeafOrder",
"=",
"getLeftMostNodeOrderOnLevel",
"(",
"level",
")",
";",
"int",
"levelHashStep",
"=",
"(",
... | Returns the lower bound of the hash range for a given node
@param nodeOrder The breadth-first order of the node
@return the lower bound of the hash range | [
"Returns",
"the",
"lower",
"bound",
"of",
"the",
"hash",
"range",
"for",
"a",
"given",
"node"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/wan/merkletree/MerkleTreeUtil.java#L74-L81 |
15,479 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/executor/impl/ExecutorServiceProxy.java | ExecutorServiceProxy.checkSync | private boolean checkSync() {
boolean sync = false;
long last = lastSubmitTime;
long now = Clock.currentTimeMillis();
if (last + SYNC_DELAY_MS < now) {
CONSECUTIVE_SUBMITS.set(this, 0);
} else if (CONSECUTIVE_SUBMITS.incrementAndGet(this) % SYNC_FREQUENCY == 0) {
... | java | private boolean checkSync() {
boolean sync = false;
long last = lastSubmitTime;
long now = Clock.currentTimeMillis();
if (last + SYNC_DELAY_MS < now) {
CONSECUTIVE_SUBMITS.set(this, 0);
} else if (CONSECUTIVE_SUBMITS.incrementAndGet(this) % SYNC_FREQUENCY == 0) {
... | [
"private",
"boolean",
"checkSync",
"(",
")",
"{",
"boolean",
"sync",
"=",
"false",
";",
"long",
"last",
"=",
"lastSubmitTime",
";",
"long",
"now",
"=",
"Clock",
".",
"currentTimeMillis",
"(",
")",
";",
"if",
"(",
"last",
"+",
"SYNC_DELAY_MS",
"<",
"now",... | This is a hack to prevent overloading the system with unprocessed tasks. Once backpressure is added, this can
be removed. | [
"This",
"is",
"a",
"hack",
"to",
"prevent",
"overloading",
"the",
"system",
"with",
"unprocessed",
"tasks",
".",
"Once",
"backpressure",
"is",
"added",
"this",
"can",
"be",
"removed",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/executor/impl/ExecutorServiceProxy.java#L274-L285 |
15,480 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java | ConcurrentConveyor.concurrentConveyor | public static <E1> ConcurrentConveyor<E1> concurrentConveyor(
E1 submitterGoneItem, QueuedPipe<E1>... queues
) {
return new ConcurrentConveyor<E1>(submitterGoneItem, queues);
} | java | public static <E1> ConcurrentConveyor<E1> concurrentConveyor(
E1 submitterGoneItem, QueuedPipe<E1>... queues
) {
return new ConcurrentConveyor<E1>(submitterGoneItem, queues);
} | [
"public",
"static",
"<",
"E1",
">",
"ConcurrentConveyor",
"<",
"E1",
">",
"concurrentConveyor",
"(",
"E1",
"submitterGoneItem",
",",
"QueuedPipe",
"<",
"E1",
">",
"...",
"queues",
")",
"{",
"return",
"new",
"ConcurrentConveyor",
"<",
"E1",
">",
"(",
"submitt... | Creates a new concurrent conveyor.
@param submitterGoneItem the object that a submitter thread can use to
signal it's done submitting
@param queues the concurrent queues the conveyor will manage | [
"Creates",
"a",
"new",
"concurrent",
"conveyor",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java#L173-L177 |
15,481 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java | ConcurrentConveyor.offer | public final boolean offer(Queue<E> queue, E item) throws ConcurrentConveyorException {
if (queue.offer(item)) {
return true;
} else {
checkDrainerGone();
unparkDrainer();
return false;
}
} | java | public final boolean offer(Queue<E> queue, E item) throws ConcurrentConveyorException {
if (queue.offer(item)) {
return true;
} else {
checkDrainerGone();
unparkDrainer();
return false;
}
} | [
"public",
"final",
"boolean",
"offer",
"(",
"Queue",
"<",
"E",
">",
"queue",
",",
"E",
"item",
")",
"throws",
"ConcurrentConveyorException",
"{",
"if",
"(",
"queue",
".",
"offer",
"(",
"item",
")",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"... | Offers an item to the given queue. No check is performed that the queue
actually belongs to this conveyor.
@return whether the item was accepted by the queue
@throws ConcurrentConveyorException if the draining thread has already left | [
"Offers",
"an",
"item",
"to",
"the",
"given",
"queue",
".",
"No",
"check",
"is",
"performed",
"that",
"the",
"queue",
"actually",
"belongs",
"to",
"this",
"conveyor",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java#L240-L248 |
15,482 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java | ConcurrentConveyor.drainTo | public final int drainTo(int queueIndex, Collection<? super E> drain) {
return drain(queues[queueIndex], drain, Integer.MAX_VALUE);
} | java | public final int drainTo(int queueIndex, Collection<? super E> drain) {
return drain(queues[queueIndex], drain, Integer.MAX_VALUE);
} | [
"public",
"final",
"int",
"drainTo",
"(",
"int",
"queueIndex",
",",
"Collection",
"<",
"?",
"super",
"E",
">",
"drain",
")",
"{",
"return",
"drain",
"(",
"queues",
"[",
"queueIndex",
"]",
",",
"drain",
",",
"Integer",
".",
"MAX_VALUE",
")",
";",
"}"
] | Drains a batch of items from the queue at the supplied index into the
supplied collection.
@return the number of items drained | [
"Drains",
"a",
"batch",
"of",
"items",
"from",
"the",
"queue",
"at",
"the",
"supplied",
"index",
"into",
"the",
"supplied",
"collection",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java#L287-L289 |
15,483 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java | ConcurrentConveyor.drainerFailed | public final void drainerFailed(Throwable t) {
if (t == null) {
throw new NullPointerException("ConcurrentConveyor.drainerFailed(null)");
}
drainer = null;
drainerDepartureCause = t;
} | java | public final void drainerFailed(Throwable t) {
if (t == null) {
throw new NullPointerException("ConcurrentConveyor.drainerFailed(null)");
}
drainer = null;
drainerDepartureCause = t;
} | [
"public",
"final",
"void",
"drainerFailed",
"(",
"Throwable",
"t",
")",
"{",
"if",
"(",
"t",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"ConcurrentConveyor.drainerFailed(null)\"",
")",
";",
"}",
"drainer",
"=",
"null",
";",
"drainer... | Called by the drainer thread to signal that it has failed and will drain
no more items from the queue.
@param t the drainer's failure | [
"Called",
"by",
"the",
"drainer",
"thread",
"to",
"signal",
"that",
"it",
"has",
"failed",
"and",
"will",
"drain",
"no",
"more",
"items",
"from",
"the",
"queue",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/concurrent/ConcurrentConveyor.java#L337-L343 |
15,484 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/BatchInvalidator.java | BatchInvalidator.registerNodeShutdownListener | private String registerNodeShutdownListener() {
HazelcastInstance node = nodeEngine.getHazelcastInstance();
LifecycleService lifecycleService = node.getLifecycleService();
return lifecycleService.addLifecycleListener(new LifecycleListener() {
@Override
public void stateCh... | java | private String registerNodeShutdownListener() {
HazelcastInstance node = nodeEngine.getHazelcastInstance();
LifecycleService lifecycleService = node.getLifecycleService();
return lifecycleService.addLifecycleListener(new LifecycleListener() {
@Override
public void stateCh... | [
"private",
"String",
"registerNodeShutdownListener",
"(",
")",
"{",
"HazelcastInstance",
"node",
"=",
"nodeEngine",
".",
"getHazelcastInstance",
"(",
")",
";",
"LifecycleService",
"lifecycleService",
"=",
"node",
".",
"getLifecycleService",
"(",
")",
";",
"return",
... | Sends remaining invalidation events in this invalidator's queues to the recipients. | [
"Sends",
"remaining",
"invalidation",
"events",
"in",
"this",
"invalidator",
"s",
"queues",
"to",
"the",
"recipients",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/BatchInvalidator.java#L159-L173 |
15,485 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java | MapDataStores.createWriteBehindStore | public static <K, V> MapDataStore<K, V> createWriteBehindStore(MapStoreContext mapStoreContext, int partitionId,
WriteBehindProcessor writeBehindProcessor) {
MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
N... | java | public static <K, V> MapDataStore<K, V> createWriteBehindStore(MapStoreContext mapStoreContext, int partitionId,
WriteBehindProcessor writeBehindProcessor) {
MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
N... | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"MapDataStore",
"<",
"K",
",",
"V",
">",
"createWriteBehindStore",
"(",
"MapStoreContext",
"mapStoreContext",
",",
"int",
"partitionId",
",",
"WriteBehindProcessor",
"writeBehindProcessor",
")",
"{",
"MapServiceContext",
... | Creates a write behind data store.
@param mapStoreContext context for map store operations
@param partitionId partition ID of partition
@param writeBehindProcessor the {@link WriteBehindProcessor}
@param <K> type of key to store
@param <V> type of value to store
@return ... | [
"Creates",
"a",
"write",
"behind",
"data",
"store",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java#L58-L69 |
15,486 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java | MapDataStores.createWriteThroughStore | public static <K, V> MapDataStore<K, V> createWriteThroughStore(MapStoreContext mapStoreContext) {
final MapStoreWrapper store = mapStoreContext.getMapStoreWrapper();
final MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
final NodeEngine nodeEngine = mapServiceConte... | java | public static <K, V> MapDataStore<K, V> createWriteThroughStore(MapStoreContext mapStoreContext) {
final MapStoreWrapper store = mapStoreContext.getMapStoreWrapper();
final MapServiceContext mapServiceContext = mapStoreContext.getMapServiceContext();
final NodeEngine nodeEngine = mapServiceConte... | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"MapDataStore",
"<",
"K",
",",
"V",
">",
"createWriteThroughStore",
"(",
"MapStoreContext",
"mapStoreContext",
")",
"{",
"final",
"MapStoreWrapper",
"store",
"=",
"mapStoreContext",
".",
"getMapStoreWrapper",
"(",
")"... | Creates a write through data store.
@param mapStoreContext context for map store operations
@param <K> type of key to store
@param <V> type of value to store
@return new write through store manager | [
"Creates",
"a",
"write",
"through",
"data",
"store",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java#L86-L95 |
15,487 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java | MapDataStores.emptyStore | public static <K, V> MapDataStore<K, V> emptyStore() {
return (MapDataStore<K, V>) EMPTY_MAP_DATA_STORE;
} | java | public static <K, V> MapDataStore<K, V> emptyStore() {
return (MapDataStore<K, V>) EMPTY_MAP_DATA_STORE;
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"MapDataStore",
"<",
"K",
",",
"V",
">",
"emptyStore",
"(",
")",
"{",
"return",
"(",
"MapDataStore",
"<",
"K",
",",
"V",
">",
")",
"EMPTY_MAP_DATA_STORE",
";",
"}"
] | Used for providing neutral null behaviour.
@param <K> type of key to store
@param <V> type of value to store
@return empty store manager | [
"Used",
"for",
"providing",
"neutral",
"null",
"behaviour",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/MapDataStores.java#L104-L106 |
15,488 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/query/impl/getters/JsonPathCursor.java | JsonPathCursor.createCursor | public static JsonPathCursor createCursor(String attributePath) {
ArrayList<Triple> triples = new ArrayList<Triple>(DEFAULT_PATH_ELEMENT_COUNT);
int start = 0;
int end;
while (start < attributePath.length()) {
boolean isArray = false;
try {
while (... | java | public static JsonPathCursor createCursor(String attributePath) {
ArrayList<Triple> triples = new ArrayList<Triple>(DEFAULT_PATH_ELEMENT_COUNT);
int start = 0;
int end;
while (start < attributePath.length()) {
boolean isArray = false;
try {
while (... | [
"public",
"static",
"JsonPathCursor",
"createCursor",
"(",
"String",
"attributePath",
")",
"{",
"ArrayList",
"<",
"Triple",
">",
"triples",
"=",
"new",
"ArrayList",
"<",
"Triple",
">",
"(",
"DEFAULT_PATH_ELEMENT_COUNT",
")",
";",
"int",
"start",
"=",
"0",
";",... | Creates a new cursor from given attribute path.
@param attributePath | [
"Creates",
"a",
"new",
"cursor",
"from",
"given",
"attribute",
"path",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/getters/JsonPathCursor.java#L63-L94 |
15,489 | hazelcast/hazelcast | hazelcast-client/src/main/java/com/hazelcast/client/spi/ClientProxy.java | ClientProxy.destroyRemotely | public final void destroyRemotely() {
ClientMessage clientMessage = ClientDestroyProxyCodec.encodeRequest(getDistributedObjectName(), getServiceName());
try {
new ClientInvocation(getClient(), clientMessage, getName()).invoke().get();
} catch (Exception e) {
throw rethrow... | java | public final void destroyRemotely() {
ClientMessage clientMessage = ClientDestroyProxyCodec.encodeRequest(getDistributedObjectName(), getServiceName());
try {
new ClientInvocation(getClient(), clientMessage, getName()).invoke().get();
} catch (Exception e) {
throw rethrow... | [
"public",
"final",
"void",
"destroyRemotely",
"(",
")",
"{",
"ClientMessage",
"clientMessage",
"=",
"ClientDestroyProxyCodec",
".",
"encodeRequest",
"(",
"getDistributedObjectName",
"(",
")",
",",
"getServiceName",
"(",
")",
")",
";",
"try",
"{",
"new",
"ClientInv... | Destroys the remote distributed object counterpart of this proxy by
issuing the destruction request to the cluster. | [
"Destroys",
"the",
"remote",
"distributed",
"object",
"counterpart",
"of",
"this",
"proxy",
"by",
"issuing",
"the",
"destruction",
"request",
"to",
"the",
"cluster",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/spi/ClientProxy.java#L171-L178 |
15,490 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/AbstractWriteBehindProcessor.java | AbstractWriteBehindProcessor.getBatchChunk | protected List<T> getBatchChunk(List<T> list, int batchSize, int chunkNumber) {
if (list == null || list.isEmpty()) {
return null;
}
final int start = chunkNumber * batchSize;
final int end = Math.min(start + batchSize, list.size());
if (start >= end) {
r... | java | protected List<T> getBatchChunk(List<T> list, int batchSize, int chunkNumber) {
if (list == null || list.isEmpty()) {
return null;
}
final int start = chunkNumber * batchSize;
final int end = Math.min(start + batchSize, list.size());
if (start >= end) {
r... | [
"protected",
"List",
"<",
"T",
">",
"getBatchChunk",
"(",
"List",
"<",
"T",
">",
"list",
",",
"int",
"batchSize",
",",
"int",
"chunkNumber",
")",
"{",
"if",
"(",
"list",
"==",
"null",
"||",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"nul... | Used to partition the list to chunks.
@param list to be paged.
@param batchSize batch operation size.
@param chunkNumber batch chunk number.
@return sub-list of list if any or null. | [
"Used",
"to",
"partition",
"the",
"list",
"to",
"chunks",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/mapstore/writebehind/AbstractWriteBehindProcessor.java#L66-L77 |
15,491 | hazelcast/hazelcast | hazelcast-client/src/main/java/com/hazelcast/client/connection/ClientConnectionStrategy.java | ClientConnectionStrategy.init | public void init(ClientContext clientContext) {
this.clientContext = clientContext;
this.clientConnectionStrategyConfig = clientContext.getClientConfig().getConnectionStrategyConfig();
this.logger = clientContext.getLoggingService().getLogger(ClientConnectionStrategy.class);
} | java | public void init(ClientContext clientContext) {
this.clientContext = clientContext;
this.clientConnectionStrategyConfig = clientContext.getClientConfig().getConnectionStrategyConfig();
this.logger = clientContext.getLoggingService().getLogger(ClientConnectionStrategy.class);
} | [
"public",
"void",
"init",
"(",
"ClientContext",
"clientContext",
")",
"{",
"this",
".",
"clientContext",
"=",
"clientContext",
";",
"this",
".",
"clientConnectionStrategyConfig",
"=",
"clientContext",
".",
"getClientConfig",
"(",
")",
".",
"getConnectionStrategyConfig... | Initialize this strategy with client context and config
@param clientContext hazelcast client context to access internal services | [
"Initialize",
"this",
"strategy",
"with",
"client",
"context",
"and",
"config"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast-client/src/main/java/com/hazelcast/client/connection/ClientConnectionStrategy.java#L42-L46 |
15,492 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/config/MerkleTreeConfig.java | MerkleTreeConfig.setMapName | public MerkleTreeConfig setMapName(String mapName) {
if (StringUtil.isNullOrEmpty(mapName)) {
throw new IllegalArgumentException("Merkle tree map name must not be empty.");
}
this.mapName = mapName;
return this;
} | java | public MerkleTreeConfig setMapName(String mapName) {
if (StringUtil.isNullOrEmpty(mapName)) {
throw new IllegalArgumentException("Merkle tree map name must not be empty.");
}
this.mapName = mapName;
return this;
} | [
"public",
"MerkleTreeConfig",
"setMapName",
"(",
"String",
"mapName",
")",
"{",
"if",
"(",
"StringUtil",
".",
"isNullOrEmpty",
"(",
"mapName",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Merkle tree map name must not be empty.\"",
")",
";",
"}... | Sets the map name to which this config applies. Map names
are also matched by pattern and merkle with map name "default"
applies to all maps that do not have more specific merkle tree configs.
@param mapName the map name
@return the merkle tree config
@throws IllegalArgumentException if the {@code mapName} is {@code n... | [
"Sets",
"the",
"map",
"name",
"to",
"which",
"this",
"config",
"applies",
".",
"Map",
"names",
"are",
"also",
"matched",
"by",
"pattern",
"and",
"merkle",
"with",
"map",
"name",
"default",
"applies",
"to",
"all",
"maps",
"that",
"do",
"not",
"have",
"mor... | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/MerkleTreeConfig.java#L171-L177 |
15,493 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/DynamicSecurityConfig.java | DynamicSecurityConfig.setClientPermissionConfigs | @Override
public SecurityConfig setClientPermissionConfigs(Set<PermissionConfig> permissions) {
if (securityService == null) {
throw new UnsupportedOperationException("Unsupported operation");
}
securityService.refreshClientPermissions(permissions);
return this;
} | java | @Override
public SecurityConfig setClientPermissionConfigs(Set<PermissionConfig> permissions) {
if (securityService == null) {
throw new UnsupportedOperationException("Unsupported operation");
}
securityService.refreshClientPermissions(permissions);
return this;
} | [
"@",
"Override",
"public",
"SecurityConfig",
"setClientPermissionConfigs",
"(",
"Set",
"<",
"PermissionConfig",
">",
"permissions",
")",
"{",
"if",
"(",
"securityService",
"==",
"null",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Unsupported ope... | Updates client permission configuration cluster-wide. | [
"Updates",
"client",
"permission",
"configuration",
"cluster",
"-",
"wide",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/DynamicSecurityConfig.java#L144-L151 |
15,494 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/QueryCacheEndToEndProvider.java | QueryCacheEndToEndProvider.tryCreateQueryCache | public InternalQueryCache<K, V> tryCreateQueryCache(String mapName, String cacheName,
ConstructorFunction<String, InternalQueryCache<K, V>> constructor) {
ContextMutexFactory.Mutex mutex = lifecycleMutexFactory.mutexFor(mapName);
try {
... | java | public InternalQueryCache<K, V> tryCreateQueryCache(String mapName, String cacheName,
ConstructorFunction<String, InternalQueryCache<K, V>> constructor) {
ContextMutexFactory.Mutex mutex = lifecycleMutexFactory.mutexFor(mapName);
try {
... | [
"public",
"InternalQueryCache",
"<",
"K",
",",
"V",
">",
"tryCreateQueryCache",
"(",
"String",
"mapName",
",",
"String",
"cacheName",
",",
"ConstructorFunction",
"<",
"String",
",",
"InternalQueryCache",
"<",
"K",
",",
"V",
">",
">",
"constructor",
")",
"{",
... | Idempotent query cache create mechanism. | [
"Idempotent",
"query",
"cache",
"create",
"mechanism",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/QueryCacheEndToEndProvider.java#L73-L100 |
15,495 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/QueryCacheEndToEndProvider.java | QueryCacheEndToEndProvider.getQueryCacheCount | public int getQueryCacheCount(String mapName) {
Map<String, InternalQueryCache<K, V>> queryCacheRegistry = queryCacheRegistryPerMap.get(mapName);
if (queryCacheRegistry == null) {
return 0;
}
return queryCacheRegistry.size();
} | java | public int getQueryCacheCount(String mapName) {
Map<String, InternalQueryCache<K, V>> queryCacheRegistry = queryCacheRegistryPerMap.get(mapName);
if (queryCacheRegistry == null) {
return 0;
}
return queryCacheRegistry.size();
} | [
"public",
"int",
"getQueryCacheCount",
"(",
"String",
"mapName",
")",
"{",
"Map",
"<",
"String",
",",
"InternalQueryCache",
"<",
"K",
",",
"V",
">",
">",
"queryCacheRegistry",
"=",
"queryCacheRegistryPerMap",
".",
"get",
"(",
"mapName",
")",
";",
"if",
"(",
... | only used in tests | [
"only",
"used",
"in",
"tests"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/querycache/subscriber/QueryCacheEndToEndProvider.java#L133-L139 |
15,496 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/mapreduce/impl/task/ReducerTaskScheduler.java | ReducerTaskScheduler.requestExecution | void requestExecution() {
for (;;) {
State currentState = state.get();
switch (currentState) {
case INACTIVE:
if (state.compareAndSet(State.INACTIVE, State.RUNNING)) {
scheduleExecution();
return;
... | java | void requestExecution() {
for (;;) {
State currentState = state.get();
switch (currentState) {
case INACTIVE:
if (state.compareAndSet(State.INACTIVE, State.RUNNING)) {
scheduleExecution();
return;
... | [
"void",
"requestExecution",
"(",
")",
"{",
"for",
"(",
";",
";",
")",
"{",
"State",
"currentState",
"=",
"state",
".",
"get",
"(",
")",
";",
"switch",
"(",
"currentState",
")",
"{",
"case",
"INACTIVE",
":",
"if",
"(",
"state",
".",
"compareAndSet",
"... | Request a new task execution if needed. | [
"Request",
"a",
"new",
"task",
"execution",
"if",
"needed",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/mapreduce/impl/task/ReducerTaskScheduler.java#L59-L79 |
15,497 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/mapreduce/impl/task/ReducerTaskScheduler.java | ReducerTaskScheduler.afterExecution | void afterExecution() {
for (;;) {
State currentState = state.get();
switch (currentState) {
case REQUESTED:
state.set(State.RUNNING);
scheduleExecution();
return;
case RUNNING:
... | java | void afterExecution() {
for (;;) {
State currentState = state.get();
switch (currentState) {
case REQUESTED:
state.set(State.RUNNING);
scheduleExecution();
return;
case RUNNING:
... | [
"void",
"afterExecution",
"(",
")",
"{",
"for",
"(",
";",
";",
")",
"{",
"State",
"currentState",
"=",
"state",
".",
"get",
"(",
")",
";",
"switch",
"(",
"currentState",
")",
"{",
"case",
"REQUESTED",
":",
"state",
".",
"set",
"(",
"State",
".",
"R... | The task has to call this method after its execution. | [
"The",
"task",
"has",
"to",
"call",
"this",
"method",
"after",
"its",
"execution",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/mapreduce/impl/task/ReducerTaskScheduler.java#L85-L102 |
15,498 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java | MapKeyLoader.calculateRole | private Role calculateRole() {
boolean isPartitionOwner = partitionService.isPartitionOwner(partitionId);
boolean isMapNamePartition = partitionId == mapNamePartition;
boolean isMapNamePartitionFirstReplica = false;
if (hasBackup && isMapNamePartition) {
IPartition partition ... | java | private Role calculateRole() {
boolean isPartitionOwner = partitionService.isPartitionOwner(partitionId);
boolean isMapNamePartition = partitionId == mapNamePartition;
boolean isMapNamePartitionFirstReplica = false;
if (hasBackup && isMapNamePartition) {
IPartition partition ... | [
"private",
"Role",
"calculateRole",
"(",
")",
"{",
"boolean",
"isPartitionOwner",
"=",
"partitionService",
".",
"isPartitionOwner",
"(",
"partitionId",
")",
";",
"boolean",
"isMapNamePartition",
"=",
"partitionId",
"==",
"mapNamePartition",
";",
"boolean",
"isMapNameP... | Calculates and returns the role for the map key loader on this partition | [
"Calculates",
"and",
"returns",
"the",
"role",
"for",
"the",
"map",
"key",
"loader",
"on",
"this",
"partition"
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java#L210-L223 |
15,499 | hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java | MapKeyLoader.loadingFinishedCallback | private ExecutionCallback<Boolean> loadingFinishedCallback() {
return new ExecutionCallback<Boolean>() {
@Override
public void onResponse(Boolean loadingFinished) {
if (loadingFinished) {
updateLocalKeyLoadStatus(null);
}
}
... | java | private ExecutionCallback<Boolean> loadingFinishedCallback() {
return new ExecutionCallback<Boolean>() {
@Override
public void onResponse(Boolean loadingFinished) {
if (loadingFinished) {
updateLocalKeyLoadStatus(null);
}
}
... | [
"private",
"ExecutionCallback",
"<",
"Boolean",
">",
"loadingFinishedCallback",
"(",
")",
"{",
"return",
"new",
"ExecutionCallback",
"<",
"Boolean",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onResponse",
"(",
"Boolean",
"loadingFinished",
")",
"{",... | Returns an execution callback to notify the record store for this map
key loader that the key loading has finished. | [
"Returns",
"an",
"execution",
"callback",
"to",
"notify",
"the",
"record",
"store",
"for",
"this",
"map",
"key",
"loader",
"that",
"the",
"key",
"loading",
"has",
"finished",
"."
] | 8c4bc10515dbbfb41a33e0302c0caedf3cda1baf | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/MapKeyLoader.java#L281-L295 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.