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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
29,400 | infinispan/infinispan | core/src/main/java/org/infinispan/statetransfer/InboundTransferTask.java | InboundTransferTask.cancel | public void cancel() {
if (!isCancelled) {
isCancelled = true;
IntSet segmentsCopy = getUnfinishedSegments();
synchronized (segments) {
unfinishedSegments.clear();
}
if (trace) {
log.tracef("Cancelling inbound state transfer from %s with unfini... | java | public void cancel() {
if (!isCancelled) {
isCancelled = true;
IntSet segmentsCopy = getUnfinishedSegments();
synchronized (segments) {
unfinishedSegments.clear();
}
if (trace) {
log.tracef("Cancelling inbound state transfer from %s with unfini... | [
"public",
"void",
"cancel",
"(",
")",
"{",
"if",
"(",
"!",
"isCancelled",
")",
"{",
"isCancelled",
"=",
"true",
";",
"IntSet",
"segmentsCopy",
"=",
"getUnfinishedSegments",
"(",
")",
";",
"synchronized",
"(",
"segments",
")",
"{",
"unfinishedSegments",
".",
... | Cancels all the segments and marks them as finished, sends a cancel command, then completes the task. | [
"Cancels",
"all",
"the",
"segments",
"and",
"marks",
"them",
"as",
"finished",
"sends",
"a",
"cancel",
"command",
"then",
"completes",
"the",
"task",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/statetransfer/InboundTransferTask.java#L201-L217 |
29,401 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/marshall/MarshallableTypeHints.java | MarshallableTypeHints.getBufferSizePredictor | public BufferSizePredictor getBufferSizePredictor(Class<?> type) {
MarshallingType marshallingType = typeHints.get(type);
if (marshallingType == null) {
// Initialise with isMarshallable to null, meaning it's unknown
marshallingType = new MarshallingType(null, new AdaptiveBufferSizePredict... | java | public BufferSizePredictor getBufferSizePredictor(Class<?> type) {
MarshallingType marshallingType = typeHints.get(type);
if (marshallingType == null) {
// Initialise with isMarshallable to null, meaning it's unknown
marshallingType = new MarshallingType(null, new AdaptiveBufferSizePredict... | [
"public",
"BufferSizePredictor",
"getBufferSizePredictor",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"MarshallingType",
"marshallingType",
"=",
"typeHints",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"marshallingType",
"==",
"null",
")",
"{",
"// Initi... | Get the serialized form size predictor for a particular type.
@param type Marshallable type for which serialized form size will be predicted
@return an instance of {@link BufferSizePredictor} | [
"Get",
"the",
"serialized",
"form",
"size",
"predictor",
"for",
"a",
"particular",
"type",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallableTypeHints.java#L36-L52 |
29,402 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/marshall/MarshallableTypeHints.java | MarshallableTypeHints.isKnownMarshallable | public boolean isKnownMarshallable(Class<?> type) {
MarshallingType marshallingType = typeHints.get(type);
return marshallingType != null && marshallingType.isMarshallable != null;
} | java | public boolean isKnownMarshallable(Class<?> type) {
MarshallingType marshallingType = typeHints.get(type);
return marshallingType != null && marshallingType.isMarshallable != null;
} | [
"public",
"boolean",
"isKnownMarshallable",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"MarshallingType",
"marshallingType",
"=",
"typeHints",
".",
"get",
"(",
"type",
")",
";",
"return",
"marshallingType",
"!=",
"null",
"&&",
"marshallingType",
".",
"isMa... | Returns whether the hint on whether a particular type is marshallable or
not is available. This method can be used to avoid attempting to marshall
a type, if the hints for the type have already been calculated.
@param type Marshallable type to check whether an attempt to mark it as
marshallable has been made.
@return ... | [
"Returns",
"whether",
"the",
"hint",
"on",
"whether",
"a",
"particular",
"type",
"is",
"marshallable",
"or",
"not",
"is",
"available",
".",
"This",
"method",
"can",
"be",
"used",
"to",
"avoid",
"attempting",
"to",
"marshall",
"a",
"type",
"if",
"the",
"hin... | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallableTypeHints.java#L70-L73 |
29,403 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/marshall/MarshallableTypeHints.java | MarshallableTypeHints.markMarshallable | public void markMarshallable(Class<?> type, boolean isMarshallable) {
MarshallingType marshallType = typeHints.get(type);
if (marshallableUpdateRequired(isMarshallable, marshallType)) {
boolean replaced = typeHints.replace(type, marshallType, new MarshallingType(
Boolean.valueOf(isMa... | java | public void markMarshallable(Class<?> type, boolean isMarshallable) {
MarshallingType marshallType = typeHints.get(type);
if (marshallableUpdateRequired(isMarshallable, marshallType)) {
boolean replaced = typeHints.replace(type, marshallType, new MarshallingType(
Boolean.valueOf(isMa... | [
"public",
"void",
"markMarshallable",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"boolean",
"isMarshallable",
")",
"{",
"MarshallingType",
"marshallType",
"=",
"typeHints",
".",
"get",
"(",
"type",
")",
";",
"if",
"(",
"marshallableUpdateRequired",
"(",
"isMars... | Marks a particular type as being marshallable or not being not marshallable.
@param type Class to mark as serializable or non-serializable
@param isMarshallable Whether the type can be marshalled or not. | [
"Marks",
"a",
"particular",
"type",
"as",
"being",
"marshallable",
"or",
"not",
"being",
"not",
"marshallable",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallableTypeHints.java#L98-L116 |
29,404 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/GroupsConfigurationBuilder.java | GroupsConfigurationBuilder.withGroupers | public GroupsConfigurationBuilder withGroupers(List<Grouper<?>> groupers) {
attributes.attribute(GROUPERS).set(groupers);
return this;
} | java | public GroupsConfigurationBuilder withGroupers(List<Grouper<?>> groupers) {
attributes.attribute(GROUPERS).set(groupers);
return this;
} | [
"public",
"GroupsConfigurationBuilder",
"withGroupers",
"(",
"List",
"<",
"Grouper",
"<",
"?",
">",
">",
"groupers",
")",
"{",
"attributes",
".",
"attribute",
"(",
"GROUPERS",
")",
".",
"set",
"(",
"groupers",
")",
";",
"return",
"this",
";",
"}"
] | Set the groupers to use | [
"Set",
"the",
"groupers",
"to",
"use"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/GroupsConfigurationBuilder.java#L69-L72 |
29,405 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/GroupsConfigurationBuilder.java | GroupsConfigurationBuilder.clearGroupers | public GroupsConfigurationBuilder clearGroupers() {
List<Grouper<?>> groupers = attributes.attribute(GROUPERS).get();
groupers.clear();
attributes.attribute(GROUPERS).set(groupers);
return this;
} | java | public GroupsConfigurationBuilder clearGroupers() {
List<Grouper<?>> groupers = attributes.attribute(GROUPERS).get();
groupers.clear();
attributes.attribute(GROUPERS).set(groupers);
return this;
} | [
"public",
"GroupsConfigurationBuilder",
"clearGroupers",
"(",
")",
"{",
"List",
"<",
"Grouper",
"<",
"?",
">",
">",
"groupers",
"=",
"attributes",
".",
"attribute",
"(",
"GROUPERS",
")",
".",
"get",
"(",
")",
";",
"groupers",
".",
"clear",
"(",
")",
";",... | Clear the groupers | [
"Clear",
"the",
"groupers"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/GroupsConfigurationBuilder.java#L77-L82 |
29,406 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/GroupsConfigurationBuilder.java | GroupsConfigurationBuilder.addGrouper | public GroupsConfigurationBuilder addGrouper(Grouper<?> grouper) {
List<Grouper<?>> groupers = attributes.attribute(GROUPERS).get();
groupers.add(grouper);
attributes.attribute(GROUPERS).set(groupers);
return this;
} | java | public GroupsConfigurationBuilder addGrouper(Grouper<?> grouper) {
List<Grouper<?>> groupers = attributes.attribute(GROUPERS).get();
groupers.add(grouper);
attributes.attribute(GROUPERS).set(groupers);
return this;
} | [
"public",
"GroupsConfigurationBuilder",
"addGrouper",
"(",
"Grouper",
"<",
"?",
">",
"grouper",
")",
"{",
"List",
"<",
"Grouper",
"<",
"?",
">",
">",
"groupers",
"=",
"attributes",
".",
"attribute",
"(",
"GROUPERS",
")",
".",
"get",
"(",
")",
";",
"group... | Add a grouper | [
"Add",
"a",
"grouper"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/GroupsConfigurationBuilder.java#L87-L92 |
29,407 | infinispan/infinispan | query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryCache.java | QueryCache.getCache | private Cache<QueryCacheKey, Object> getCache() {
final Cache<QueryCacheKey, Object> cache = lazyCache;
//Most likely branch first:
if (cache != null) {
return cache;
}
synchronized (this) {
if (lazyCache == null) {
// define the query cache configuration if ... | java | private Cache<QueryCacheKey, Object> getCache() {
final Cache<QueryCacheKey, Object> cache = lazyCache;
//Most likely branch first:
if (cache != null) {
return cache;
}
synchronized (this) {
if (lazyCache == null) {
// define the query cache configuration if ... | [
"private",
"Cache",
"<",
"QueryCacheKey",
",",
"Object",
">",
"getCache",
"(",
")",
"{",
"final",
"Cache",
"<",
"QueryCacheKey",
",",
"Object",
">",
"cache",
"=",
"lazyCache",
";",
"//Most likely branch first:",
"if",
"(",
"cache",
"!=",
"null",
")",
"{",
... | Obtain the cache. Start it lazily when needed. | [
"Obtain",
"the",
"cache",
".",
"Start",
"it",
"lazily",
"when",
"needed",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryCache.java#L83-L98 |
29,408 | infinispan/infinispan | query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryCache.java | QueryCache.getQueryCacheConfig | private ConfigurationBuilder getQueryCacheConfig() {
ConfigurationBuilder cfgBuilder = new ConfigurationBuilder();
cfgBuilder
.clustering().cacheMode(CacheMode.LOCAL)
.transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL)
.expiration().maxIdle(ENTRY_LIFESPAN, T... | java | private ConfigurationBuilder getQueryCacheConfig() {
ConfigurationBuilder cfgBuilder = new ConfigurationBuilder();
cfgBuilder
.clustering().cacheMode(CacheMode.LOCAL)
.transaction().transactionMode(TransactionMode.NON_TRANSACTIONAL)
.expiration().maxIdle(ENTRY_LIFESPAN, T... | [
"private",
"ConfigurationBuilder",
"getQueryCacheConfig",
"(",
")",
"{",
"ConfigurationBuilder",
"cfgBuilder",
"=",
"new",
"ConfigurationBuilder",
"(",
")",
";",
"cfgBuilder",
".",
"clustering",
"(",
")",
".",
"cacheMode",
"(",
"CacheMode",
".",
"LOCAL",
")",
".",... | Create the configuration of the internal query cache. | [
"Create",
"the",
"configuration",
"of",
"the",
"internal",
"query",
"cache",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryCache.java#L103-L111 |
29,409 | infinispan/infinispan | core/src/main/java/org/infinispan/marshall/core/ClassIdentifiers.java | ClassIdentifiers.getClass | public Class<?> getClass(int id) throws IOException {
if (id < 0 || id > internalIdToClass.length) {
throw new IOException("Unknown class id " + id);
}
Class<?> clazz = internalIdToClass[id];
if (clazz == null) {
throw new IOException("Unknown class id " + id);
}
re... | java | public Class<?> getClass(int id) throws IOException {
if (id < 0 || id > internalIdToClass.length) {
throw new IOException("Unknown class id " + id);
}
Class<?> clazz = internalIdToClass[id];
if (clazz == null) {
throw new IOException("Unknown class id " + id);
}
re... | [
"public",
"Class",
"<",
"?",
">",
"getClass",
"(",
"int",
"id",
")",
"throws",
"IOException",
"{",
"if",
"(",
"id",
"<",
"0",
"||",
"id",
">",
"internalIdToClass",
".",
"length",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Unknown class id \"",
"+",... | This method throws IOException because it is assumed that we got the id from network.
@param id
@return
@throws IOException | [
"This",
"method",
"throws",
"IOException",
"because",
"it",
"is",
"assumed",
"that",
"we",
"got",
"the",
"id",
"from",
"network",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/marshall/core/ClassIdentifiers.java#L44-L53 |
29,410 | infinispan/infinispan | core/src/main/java/org/infinispan/reactive/publisher/impl/ClusterPublisherManagerImpl.java | ClusterPublisherManagerImpl.requiresFinalizer | private <R> boolean requiresFinalizer(boolean parallelPublisher, Set<K> keysToInclude,
DeliveryGuarantee deliveryGuarantee) {
// Parallel publisher has to use the finalizer to consolidate intermediate values on the remote nodes
return parallelPublisher ||
// Using segments with exactly ... | java | private <R> boolean requiresFinalizer(boolean parallelPublisher, Set<K> keysToInclude,
DeliveryGuarantee deliveryGuarantee) {
// Parallel publisher has to use the finalizer to consolidate intermediate values on the remote nodes
return parallelPublisher ||
// Using segments with exactly ... | [
"private",
"<",
"R",
">",
"boolean",
"requiresFinalizer",
"(",
"boolean",
"parallelPublisher",
",",
"Set",
"<",
"K",
">",
"keysToInclude",
",",
"DeliveryGuarantee",
"deliveryGuarantee",
")",
"{",
"// Parallel publisher has to use the finalizer to consolidate intermediate valu... | This method is used to determine if a finalizer is required to be sent remotely. For cases we don't have to
we don't want to serialize it for nothing
@return whether finalizer is required | [
"This",
"method",
"is",
"used",
"to",
"determine",
"if",
"a",
"finalizer",
"is",
"required",
"to",
"be",
"sent",
"remotely",
".",
"For",
"cases",
"we",
"don",
"t",
"have",
"to",
"we",
"don",
"t",
"want",
"to",
"serialize",
"it",
"for",
"nothing"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/reactive/publisher/impl/ClusterPublisherManagerImpl.java#L131-L137 |
29,411 | infinispan/infinispan | core/src/main/java/org/infinispan/container/offheap/OffHeapConcurrentMap.java | OffHeapConcurrentMap.performGet | private long performGet(long bucketHeadAddress, WrappedBytes k) {
long address = bucketHeadAddress;
while (address != 0) {
long nextAddress = offHeapEntryFactory.getNext(address);
if (offHeapEntryFactory.equalsKey(address, k)) {
break;
} else {
address = ne... | java | private long performGet(long bucketHeadAddress, WrappedBytes k) {
long address = bucketHeadAddress;
while (address != 0) {
long nextAddress = offHeapEntryFactory.getNext(address);
if (offHeapEntryFactory.equalsKey(address, k)) {
break;
} else {
address = ne... | [
"private",
"long",
"performGet",
"(",
"long",
"bucketHeadAddress",
",",
"WrappedBytes",
"k",
")",
"{",
"long",
"address",
"=",
"bucketHeadAddress",
";",
"while",
"(",
"address",
"!=",
"0",
")",
"{",
"long",
"nextAddress",
"=",
"offHeapEntryFactory",
".",
"getN... | Gets the actual address for the given key in the given bucket or 0 if it isn't present or expired
@param bucketHeadAddress the starting address of the address hash
@param k the key to retrieve the address for it if matches
@return the address matching the key or 0 | [
"Gets",
"the",
"actual",
"address",
"for",
"the",
"given",
"key",
"in",
"the",
"given",
"bucket",
"or",
"0",
"if",
"it",
"isn",
"t",
"present",
"or",
"expired"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/container/offheap/OffHeapConcurrentMap.java#L291-L302 |
29,412 | infinispan/infinispan | core/src/main/java/org/infinispan/stream/impl/LocalStreamManagerImpl.java | LocalStreamManagerImpl.dataRehashed | @DataRehashed
public void dataRehashed(DataRehashedEvent<K, V> event) {
ConsistentHash startHash = event.getConsistentHashAtStart();
ConsistentHash endHash = event.getConsistentHashAtEnd();
boolean trace = log.isTraceEnabled();
if (startHash != null && endHash != null) {
if (trace) {... | java | @DataRehashed
public void dataRehashed(DataRehashedEvent<K, V> event) {
ConsistentHash startHash = event.getConsistentHashAtStart();
ConsistentHash endHash = event.getConsistentHashAtEnd();
boolean trace = log.isTraceEnabled();
if (startHash != null && endHash != null) {
if (trace) {... | [
"@",
"DataRehashed",
"public",
"void",
"dataRehashed",
"(",
"DataRehashedEvent",
"<",
"K",
",",
"V",
">",
"event",
")",
"{",
"ConsistentHash",
"startHash",
"=",
"event",
".",
"getConsistentHashAtStart",
"(",
")",
";",
"ConsistentHash",
"endHash",
"=",
"event",
... | We need to listen to data rehash events in case if data moves while we are iterating over it.
If a rehash occurs causing this node to lose a segment and there is something iterating over the stream looking
for values of that segment, we can't guarantee that the data has all been seen correctly, so we must therefore
sus... | [
"We",
"need",
"to",
"listen",
"to",
"data",
"rehash",
"events",
"in",
"case",
"if",
"data",
"moves",
"while",
"we",
"are",
"iterating",
"over",
"it",
".",
"If",
"a",
"rehash",
"occurs",
"causing",
"this",
"node",
"to",
"lose",
"a",
"segment",
"and",
"t... | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/stream/impl/LocalStreamManagerImpl.java#L152-L189 |
29,413 | infinispan/infinispan | core/src/main/java/org/infinispan/stream/impl/LocalStreamManagerImpl.java | LocalStreamManagerImpl.handleSuspectSegmentsBeforeStream | private void handleSuspectSegmentsBeforeStream(Object requestId, SegmentListener listener, IntSet segments) {
LocalizedCacheTopology topology = dm.getCacheTopology();
if (trace) {
log.tracef("Topology for supplier is %s for id %s", topology, requestId);
}
ConsistentHash readCH = topolog... | java | private void handleSuspectSegmentsBeforeStream(Object requestId, SegmentListener listener, IntSet segments) {
LocalizedCacheTopology topology = dm.getCacheTopology();
if (trace) {
log.tracef("Topology for supplier is %s for id %s", topology, requestId);
}
ConsistentHash readCH = topolog... | [
"private",
"void",
"handleSuspectSegmentsBeforeStream",
"(",
"Object",
"requestId",
",",
"SegmentListener",
"listener",
",",
"IntSet",
"segments",
")",
"{",
"LocalizedCacheTopology",
"topology",
"=",
"dm",
".",
"getCacheTopology",
"(",
")",
";",
"if",
"(",
"trace",
... | that we allow backup owners to respond even though it was thought to be a primary owner. | [
"that",
"we",
"allow",
"backup",
"owners",
"to",
"respond",
"even",
"though",
"it",
"was",
"thought",
"to",
"be",
"a",
"primary",
"owner",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/stream/impl/LocalStreamManagerImpl.java#L235-L273 |
29,414 | infinispan/infinispan | server/core/src/main/java/org/infinispan/server/core/security/simple/SimpleServerAuthenticationProvider.java | SimpleServerAuthenticationProvider.addUser | public void addUser(String userName, String userRealm, char[] password, String... groups) {
if (userName == null) {
throw new IllegalArgumentException("userName is null");
}
if (userRealm == null) {
throw new IllegalArgumentException("userRealm is null");
}
if (password =... | java | public void addUser(String userName, String userRealm, char[] password, String... groups) {
if (userName == null) {
throw new IllegalArgumentException("userName is null");
}
if (userRealm == null) {
throw new IllegalArgumentException("userRealm is null");
}
if (password =... | [
"public",
"void",
"addUser",
"(",
"String",
"userName",
",",
"String",
"userRealm",
",",
"char",
"[",
"]",
"password",
",",
"String",
"...",
"groups",
")",
"{",
"if",
"(",
"userName",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",... | Add a user to the authentication table.
@param userName
the user name
@param userRealm
the user realm
@param password
the password
@param groups
the groups the user belongs to | [
"Add",
"a",
"user",
"to",
"the",
"authentication",
"table",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/core/src/main/java/org/infinispan/server/core/security/simple/SimpleServerAuthenticationProvider.java#L126-L146 |
29,415 | infinispan/infinispan | core/src/main/java/org/infinispan/interceptors/distribution/BaseDistributionInterceptor.java | BaseDistributionInterceptor.remoteGetSingleKey | protected <C extends FlagAffectedCommand & TopologyAffectedCommand> CompletionStage<Void> remoteGetSingleKey(
InvocationContext ctx, C command, Object key, boolean isWrite) {
LocalizedCacheTopology cacheTopology = checkTopologyId(command);
int topologyId = cacheTopology.getTopologyId();
Dist... | java | protected <C extends FlagAffectedCommand & TopologyAffectedCommand> CompletionStage<Void> remoteGetSingleKey(
InvocationContext ctx, C command, Object key, boolean isWrite) {
LocalizedCacheTopology cacheTopology = checkTopologyId(command);
int topologyId = cacheTopology.getTopologyId();
Dist... | [
"protected",
"<",
"C",
"extends",
"FlagAffectedCommand",
"&",
"TopologyAffectedCommand",
">",
"CompletionStage",
"<",
"Void",
">",
"remoteGetSingleKey",
"(",
"InvocationContext",
"ctx",
",",
"C",
"command",
",",
"Object",
"key",
",",
"boolean",
"isWrite",
")",
"{"... | Fetch a key from its remote owners and store it in the context.
<b>Not thread-safe</b>. The invocation context should not be accessed concurrently from multiple threads,
so this method should only be used for single-key commands. | [
"Fetch",
"a",
"key",
"from",
"its",
"remote",
"owners",
"and",
"store",
"it",
"in",
"the",
"context",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/distribution/BaseDistributionInterceptor.java#L174-L217 |
29,416 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/global/TransportConfigurationBuilder.java | TransportConfigurationBuilder.initialClusterTimeout | public TransportConfigurationBuilder initialClusterTimeout(long initialClusterTimeout, TimeUnit unit) {
attributes.attribute(INITIAL_CLUSTER_TIMEOUT).set(unit.toMillis(initialClusterTimeout));
return this;
} | java | public TransportConfigurationBuilder initialClusterTimeout(long initialClusterTimeout, TimeUnit unit) {
attributes.attribute(INITIAL_CLUSTER_TIMEOUT).set(unit.toMillis(initialClusterTimeout));
return this;
} | [
"public",
"TransportConfigurationBuilder",
"initialClusterTimeout",
"(",
"long",
"initialClusterTimeout",
",",
"TimeUnit",
"unit",
")",
"{",
"attributes",
".",
"attribute",
"(",
"INITIAL_CLUSTER_TIMEOUT",
")",
".",
"set",
"(",
"unit",
".",
"toMillis",
"(",
"initialClu... | Sets the timeout for the initial cluster to form. Defaults to 1 minute | [
"Sets",
"the",
"timeout",
"for",
"the",
"initial",
"cluster",
"to",
"form",
".",
"Defaults",
"to",
"1",
"minute"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/global/TransportConfigurationBuilder.java#L117-L120 |
29,417 | infinispan/infinispan | core/src/main/java/org/infinispan/statetransfer/StateProviderImpl.java | StateProviderImpl.start | @Start(priority = 50)
@Override
public void start() {
timeout = configuration.clustering().stateTransfer().timeout();
chunkSize = configuration.clustering().stateTransfer().chunkSize();
} | java | @Start(priority = 50)
@Override
public void start() {
timeout = configuration.clustering().stateTransfer().timeout();
chunkSize = configuration.clustering().stateTransfer().chunkSize();
} | [
"@",
"Start",
"(",
"priority",
"=",
"50",
")",
"@",
"Override",
"public",
"void",
"start",
"(",
")",
"{",
"timeout",
"=",
"configuration",
".",
"clustering",
"(",
")",
".",
"stateTransfer",
"(",
")",
".",
"timeout",
"(",
")",
";",
"chunkSize",
"=",
"... | Must start before StateTransferManager sends the join request | [
"Must",
"start",
"before",
"StateTransferManager",
"sends",
"the",
"join",
"request"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/statetransfer/StateProviderImpl.java#L119-L124 |
29,418 | infinispan/infinispan | cdi/common/src/main/java/org/infinispan/cdi/common/util/Annotateds.java | Annotateds.createParameterId | public static <X> String createParameterId(Type type, Set<Annotation> annotations) {
StringBuilder builder = new StringBuilder();
if (type instanceof Class<?>) {
Class<?> c = (Class<?>) type;
builder.append(c.getName());
} else {
builder.append(type.toString()... | java | public static <X> String createParameterId(Type type, Set<Annotation> annotations) {
StringBuilder builder = new StringBuilder();
if (type instanceof Class<?>) {
Class<?> c = (Class<?>) type;
builder.append(c.getName());
} else {
builder.append(type.toString()... | [
"public",
"static",
"<",
"X",
">",
"String",
"createParameterId",
"(",
"Type",
"type",
",",
"Set",
"<",
"Annotation",
">",
"annotations",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"type",
"instanceof",
"Cl... | Creates a string representation of a given type and set of annotations. | [
"Creates",
"a",
"string",
"representation",
"of",
"a",
"given",
"type",
"and",
"set",
"of",
"annotations",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cdi/common/src/main/java/org/infinispan/cdi/common/util/Annotateds.java#L288-L298 |
29,419 | infinispan/infinispan | core/src/main/java/org/infinispan/topology/ClusterCacheStatus.java | ClusterCacheStatus.immutableAdd | private <T> List<T> immutableAdd(List<T> list, T element) {
List<T> result = new ArrayList<T>(list);
result.add(element);
return Collections.unmodifiableList(result);
} | java | private <T> List<T> immutableAdd(List<T> list, T element) {
List<T> result = new ArrayList<T>(list);
result.add(element);
return Collections.unmodifiableList(result);
} | [
"private",
"<",
"T",
">",
"List",
"<",
"T",
">",
"immutableAdd",
"(",
"List",
"<",
"T",
">",
"list",
",",
"T",
"element",
")",
"{",
"List",
"<",
"T",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"T",
">",
"(",
"list",
")",
";",
"result",
".",
... | Helpers for working with immutable lists | [
"Helpers",
"for",
"working",
"with",
"immutable",
"lists"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/topology/ClusterCacheStatus.java#L585-L589 |
29,420 | infinispan/infinispan | jcache/embedded/src/main/java/org/infinispan/jcache/annotation/CacheLookupHelper.java | CacheLookupHelper.getCacheName | public static String getCacheName(Method method, String methodCacheName, CacheDefaults cacheDefaultsAnnotation, boolean generate) {
assertNotNull(method, "method parameter must not be null");
assertNotNull(methodCacheName, "methodCacheName parameter must not be null");
String cacheName = methodCacheN... | java | public static String getCacheName(Method method, String methodCacheName, CacheDefaults cacheDefaultsAnnotation, boolean generate) {
assertNotNull(method, "method parameter must not be null");
assertNotNull(methodCacheName, "methodCacheName parameter must not be null");
String cacheName = methodCacheN... | [
"public",
"static",
"String",
"getCacheName",
"(",
"Method",
"method",
",",
"String",
"methodCacheName",
",",
"CacheDefaults",
"cacheDefaultsAnnotation",
",",
"boolean",
"generate",
")",
"{",
"assertNotNull",
"(",
"method",
",",
"\"method parameter must not be null\"",
... | Resolves the cache name of a method annotated with a JCACHE annotation.
@param method the annotated method.
@param methodCacheName the cache name defined on the JCACHE annotation.
@param cacheDefaultsAnnotation the {@link javax.cache.annotation.CacheDefaults} annotation instance.
@param genera... | [
"Resolves",
"the",
"cache",
"name",
"of",
"a",
"method",
"annotated",
"with",
"a",
"JCACHE",
"annotation",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/jcache/embedded/src/main/java/org/infinispan/jcache/annotation/CacheLookupHelper.java#L42-L57 |
29,421 | infinispan/infinispan | jcache/embedded/src/main/java/org/infinispan/jcache/annotation/CacheLookupHelper.java | CacheLookupHelper.getDefaultMethodCacheName | private static String getDefaultMethodCacheName(Method method) {
int i = 0;
int nbParameters = method.getParameterTypes().length;
StringBuilder cacheName = new StringBuilder()
.append(method.getDeclaringClass().getName())
.append(".")
.append(method.getName())
... | java | private static String getDefaultMethodCacheName(Method method) {
int i = 0;
int nbParameters = method.getParameterTypes().length;
StringBuilder cacheName = new StringBuilder()
.append(method.getDeclaringClass().getName())
.append(".")
.append(method.getName())
... | [
"private",
"static",
"String",
"getDefaultMethodCacheName",
"(",
"Method",
"method",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"nbParameters",
"=",
"method",
".",
"getParameterTypes",
"(",
")",
".",
"length",
";",
"StringBuilder",
"cacheName",
"=",
"new",
... | Returns the default cache name associated to the given method according to JSR-107.
@param method the method.
@return the default cache name for the given method. | [
"Returns",
"the",
"default",
"cache",
"name",
"associated",
"to",
"the",
"given",
"method",
"according",
"to",
"JSR",
"-",
"107",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/jcache/embedded/src/main/java/org/infinispan/jcache/annotation/CacheLookupHelper.java#L104-L123 |
29,422 | infinispan/infinispan | cdi/remote/src/main/java/org/infinispan/cdi/remote/RemoteCacheProducer.java | RemoteCacheProducer.getRemoteCache | @Remote
@Produces
public <K, V> RemoteCache<K, V> getRemoteCache(InjectionPoint injectionPoint) {
final Set<Annotation> qualifiers = injectionPoint.getQualifiers();
final RemoteCacheManager cacheManager = getRemoteCacheManager(qualifiers.toArray(new Annotation[0]));
final Remote remote = getRemo... | java | @Remote
@Produces
public <K, V> RemoteCache<K, V> getRemoteCache(InjectionPoint injectionPoint) {
final Set<Annotation> qualifiers = injectionPoint.getQualifiers();
final RemoteCacheManager cacheManager = getRemoteCacheManager(qualifiers.toArray(new Annotation[0]));
final Remote remote = getRemo... | [
"@",
"Remote",
"@",
"Produces",
"public",
"<",
"K",
",",
"V",
">",
"RemoteCache",
"<",
"K",
",",
"V",
">",
"getRemoteCache",
"(",
"InjectionPoint",
"injectionPoint",
")",
"{",
"final",
"Set",
"<",
"Annotation",
">",
"qualifiers",
"=",
"injectionPoint",
"."... | Produces the remote cache.
@param injectionPoint the injection point.
@param <K> the type of the key.
@param <V> the type of the value.
@return the remote cache instance. | [
"Produces",
"the",
"remote",
"cache",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cdi/remote/src/main/java/org/infinispan/cdi/remote/RemoteCacheProducer.java#L42-L53 |
29,423 | infinispan/infinispan | remote-query/remote-query-server/src/main/java/org/infinispan/query/remote/impl/ProtobufObjectReflectionMatcher.java | ProtobufObjectReflectionMatcher.convert | @Override
protected Object convert(Object instance) {
try {
return ProtobufUtil.toWrappedByteArray(serializationContext, instance);
} catch (IOException e) {
throw new CacheException(e);
}
} | java | @Override
protected Object convert(Object instance) {
try {
return ProtobufUtil.toWrappedByteArray(serializationContext, instance);
} catch (IOException e) {
throw new CacheException(e);
}
} | [
"@",
"Override",
"protected",
"Object",
"convert",
"(",
"Object",
"instance",
")",
"{",
"try",
"{",
"return",
"ProtobufUtil",
".",
"toWrappedByteArray",
"(",
"serializationContext",
",",
"instance",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
... | Marshals the instance using Protobuf.
@param instance never null
@return the converted/decorated instance | [
"Marshals",
"the",
"instance",
"using",
"Protobuf",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/remote-query/remote-query-server/src/main/java/org/infinispan/query/remote/impl/ProtobufObjectReflectionMatcher.java#L47-L54 |
29,424 | infinispan/infinispan | cdi/common/src/main/java/org/infinispan/cdi/common/util/annotatedtypebuilder/AnnotatedTypeBuilder.java | AnnotatedTypeBuilder.addToMethodParameter | public AnnotatedTypeBuilder<X> addToMethodParameter(Method method, int position, Annotation annotation) {
if (!methods.containsKey(method)) {
methods.put(method, new AnnotationBuilder());
}
if (methodParameters.get(method) == null) {
methodParameters.put(method, new HashMap<In... | java | public AnnotatedTypeBuilder<X> addToMethodParameter(Method method, int position, Annotation annotation) {
if (!methods.containsKey(method)) {
methods.put(method, new AnnotationBuilder());
}
if (methodParameters.get(method) == null) {
methodParameters.put(method, new HashMap<In... | [
"public",
"AnnotatedTypeBuilder",
"<",
"X",
">",
"addToMethodParameter",
"(",
"Method",
"method",
",",
"int",
"position",
",",
"Annotation",
"annotation",
")",
"{",
"if",
"(",
"!",
"methods",
".",
"containsKey",
"(",
"method",
")",
")",
"{",
"methods",
".",
... | Add an annotation to the specified method parameter. If the method is not
already present, it will be added. If the method parameter is not already
present, it will be added.
@param method the method to add the annotation to
@param position the position of the parameter to add
@param annotation the annotation to... | [
"Add",
"an",
"annotation",
"to",
"the",
"specified",
"method",
"parameter",
".",
"If",
"the",
"method",
"is",
"not",
"already",
"present",
"it",
"will",
"be",
"added",
".",
"If",
"the",
"method",
"parameter",
"is",
"not",
"already",
"present",
"it",
"will"... | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cdi/common/src/main/java/org/infinispan/cdi/common/util/annotatedtypebuilder/AnnotatedTypeBuilder.java#L394-L406 |
29,425 | infinispan/infinispan | cdi/common/src/main/java/org/infinispan/cdi/common/util/annotatedtypebuilder/AnnotatedTypeBuilder.java | AnnotatedTypeBuilder.removeFromMethodParameter | public AnnotatedTypeBuilder<X> removeFromMethodParameter(Method method, int position, Class<? extends Annotation> annotationType) {
if (methods.get(method) == null) {
throw new IllegalArgumentException("Method not present " + method + " on " + javaClass);
} else {
if (methodParamete... | java | public AnnotatedTypeBuilder<X> removeFromMethodParameter(Method method, int position, Class<? extends Annotation> annotationType) {
if (methods.get(method) == null) {
throw new IllegalArgumentException("Method not present " + method + " on " + javaClass);
} else {
if (methodParamete... | [
"public",
"AnnotatedTypeBuilder",
"<",
"X",
">",
"removeFromMethodParameter",
"(",
"Method",
"method",
",",
"int",
"position",
",",
"Class",
"<",
"?",
"extends",
"Annotation",
">",
"annotationType",
")",
"{",
"if",
"(",
"methods",
".",
"get",
"(",
"method",
... | Remove an annotation from the specified method parameter.
@param method the method to remove the annotation from
@param position the position of the parameter to remove
@param annotationType the annotation type to remove
@throws IllegalArgumentException if the annotationType is null, if the
method is not... | [
"Remove",
"an",
"annotation",
"from",
"the",
"specified",
"method",
"parameter",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cdi/common/src/main/java/org/infinispan/cdi/common/util/annotatedtypebuilder/AnnotatedTypeBuilder.java#L418-L429 |
29,426 | infinispan/infinispan | spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java | AbstractInfinispanSessionRepository.getSession | public MapSession getSession(String id, boolean updateTTL) {
return Optional.ofNullable(cache.get(id))
.map(v -> (MapSession) v.get())
.map(v -> updateTTL(v, updateTTL))
.orElse(null);
} | java | public MapSession getSession(String id, boolean updateTTL) {
return Optional.ofNullable(cache.get(id))
.map(v -> (MapSession) v.get())
.map(v -> updateTTL(v, updateTTL))
.orElse(null);
} | [
"public",
"MapSession",
"getSession",
"(",
"String",
"id",
",",
"boolean",
"updateTTL",
")",
"{",
"return",
"Optional",
".",
"ofNullable",
"(",
"cache",
".",
"get",
"(",
"id",
")",
")",
".",
"map",
"(",
"v",
"->",
"(",
"MapSession",
")",
"v",
".",
"g... | Returns session with optional parameter whether or not update time accessed.
@param id Session ID.
@param updateTTL <code>true</code> if time accessed needs to be updated.
@return Session or <code>null</code> if it doesn't exist. | [
"Returns",
"session",
"with",
"optional",
"parameter",
"whether",
"or",
"not",
"update",
"time",
"accessed",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java#L92-L97 |
29,427 | infinispan/infinispan | core/src/main/java/org/infinispan/interceptors/impl/CacheMgmtInterceptor.java | CacheMgmtInterceptor.getElapsedTime | @ManagedAttribute(
description = "Number of seconds since cache started",
displayName = "Seconds since cache started",
units = Units.SECONDS,
measurementType = MeasurementType.TRENDSUP,
displayType = DisplayType.SUMMARY
)
@Deprecated
public long getElapsedTime() {
... | java | @ManagedAttribute(
description = "Number of seconds since cache started",
displayName = "Seconds since cache started",
units = Units.SECONDS,
measurementType = MeasurementType.TRENDSUP,
displayType = DisplayType.SUMMARY
)
@Deprecated
public long getElapsedTime() {
... | [
"@",
"ManagedAttribute",
"(",
"description",
"=",
"\"Number of seconds since cache started\"",
",",
"displayName",
"=",
"\"Seconds since cache started\"",
",",
"units",
"=",
"Units",
".",
"SECONDS",
",",
"measurementType",
"=",
"MeasurementType",
".",
"TRENDSUP",
",",
"... | Returns number of seconds since cache started
@deprecated use {@link #getTimeSinceStart()} instead.
@return number of seconds since cache started | [
"Returns",
"number",
"of",
"seconds",
"since",
"cache",
"started"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/impl/CacheMgmtInterceptor.java#L731-L742 |
29,428 | infinispan/infinispan | query-dsl/src/main/java/org/infinispan/query/dsl/impl/QueryStringCreator.java | QueryStringCreator.parentIsNotOfClass | private boolean parentIsNotOfClass(BaseCondition condition, Class<? extends BooleanCondition> expectedParentClass) {
BaseCondition parent = condition.getParent();
return parent != null && parent.getClass() != expectedParentClass;
} | java | private boolean parentIsNotOfClass(BaseCondition condition, Class<? extends BooleanCondition> expectedParentClass) {
BaseCondition parent = condition.getParent();
return parent != null && parent.getClass() != expectedParentClass;
} | [
"private",
"boolean",
"parentIsNotOfClass",
"(",
"BaseCondition",
"condition",
",",
"Class",
"<",
"?",
"extends",
"BooleanCondition",
">",
"expectedParentClass",
")",
"{",
"BaseCondition",
"parent",
"=",
"condition",
".",
"getParent",
"(",
")",
";",
"return",
"par... | We check if the parent if of the expected class, hoping that if it is then we can avoid wrapping this condition in
parentheses and still maintain the same logic.
@return {@code true} if wrapping is needed, {@code false} otherwise | [
"We",
"check",
"if",
"the",
"parent",
"if",
"of",
"the",
"expected",
"class",
"hoping",
"that",
"if",
"it",
"is",
"then",
"we",
"can",
"avoid",
"wrapping",
"this",
"condition",
"in",
"parentheses",
"and",
"still",
"maintain",
"the",
"same",
"logic",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query-dsl/src/main/java/org/infinispan/query/dsl/impl/QueryStringCreator.java#L264-L267 |
29,429 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/HashConfigurationBuilder.java | HashConfigurationBuilder.consistentHashFactory | public HashConfigurationBuilder consistentHashFactory(ConsistentHashFactory<? extends ConsistentHash> consistentHashFactory) {
attributes.attribute(CONSISTENT_HASH_FACTORY).set(consistentHashFactory);
return this;
} | java | public HashConfigurationBuilder consistentHashFactory(ConsistentHashFactory<? extends ConsistentHash> consistentHashFactory) {
attributes.attribute(CONSISTENT_HASH_FACTORY).set(consistentHashFactory);
return this;
} | [
"public",
"HashConfigurationBuilder",
"consistentHashFactory",
"(",
"ConsistentHashFactory",
"<",
"?",
"extends",
"ConsistentHash",
">",
"consistentHashFactory",
")",
"{",
"attributes",
".",
"attribute",
"(",
"CONSISTENT_HASH_FACTORY",
")",
".",
"set",
"(",
"consistentHas... | The consistent hash factory in use. | [
"The",
"consistent",
"hash",
"factory",
"in",
"use",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/HashConfigurationBuilder.java#L62-L65 |
29,430 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/HashConfigurationBuilder.java | HashConfigurationBuilder.numOwners | public HashConfigurationBuilder numOwners(int numOwners) {
if (numOwners < 1) throw new IllegalArgumentException("numOwners cannot be less than 1");
attributes.attribute(NUM_OWNERS).set(numOwners);
return this;
} | java | public HashConfigurationBuilder numOwners(int numOwners) {
if (numOwners < 1) throw new IllegalArgumentException("numOwners cannot be less than 1");
attributes.attribute(NUM_OWNERS).set(numOwners);
return this;
} | [
"public",
"HashConfigurationBuilder",
"numOwners",
"(",
"int",
"numOwners",
")",
"{",
"if",
"(",
"numOwners",
"<",
"1",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"numOwners cannot be less than 1\"",
")",
";",
"attributes",
".",
"attribute",
"(",
"NUM_O... | Number of cluster-wide replicas for each cache entry. | [
"Number",
"of",
"cluster",
"-",
"wide",
"replicas",
"for",
"each",
"cache",
"entry",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/HashConfigurationBuilder.java#L70-L74 |
29,431 | infinispan/infinispan | core/src/main/java/org/infinispan/statetransfer/StateTransferInterceptor.java | StateTransferInterceptor.handleTxCommand | private Object handleTxCommand(TxInvocationContext ctx, TransactionBoundaryCommand command) {
if (trace) log.tracef("handleTxCommand for command %s, origin %s", command, getOrigin(ctx));
updateTopologyId(command);
return invokeNextAndHandle(ctx, command, handleTxReturn);
} | java | private Object handleTxCommand(TxInvocationContext ctx, TransactionBoundaryCommand command) {
if (trace) log.tracef("handleTxCommand for command %s, origin %s", command, getOrigin(ctx));
updateTopologyId(command);
return invokeNextAndHandle(ctx, command, handleTxReturn);
} | [
"private",
"Object",
"handleTxCommand",
"(",
"TxInvocationContext",
"ctx",
",",
"TransactionBoundaryCommand",
"command",
")",
"{",
"if",
"(",
"trace",
")",
"log",
".",
"tracef",
"(",
"\"handleTxCommand for command %s, origin %s\"",
",",
"command",
",",
"getOrigin",
"(... | Special processing required for transaction commands. | [
"Special",
"processing",
"required",
"for",
"transaction",
"commands",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/statetransfer/StateTransferInterceptor.java#L199-L204 |
29,432 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/DataContainerConfigurationBuilder.java | DataContainerConfigurationBuilder.dataContainer | @Deprecated
public DataContainerConfigurationBuilder dataContainer(DataContainer dataContainer) {
attributes.attribute(DATA_CONTAINER).set(dataContainer);
return this;
} | java | @Deprecated
public DataContainerConfigurationBuilder dataContainer(DataContainer dataContainer) {
attributes.attribute(DATA_CONTAINER).set(dataContainer);
return this;
} | [
"@",
"Deprecated",
"public",
"DataContainerConfigurationBuilder",
"dataContainer",
"(",
"DataContainer",
"dataContainer",
")",
"{",
"attributes",
".",
"attribute",
"(",
"DATA_CONTAINER",
")",
".",
"set",
"(",
"dataContainer",
")",
";",
"return",
"this",
";",
"}"
] | Specify the data container in use
@param dataContainer
@return
@deprecated data container is no longer to exposed via configuration at a later point | [
"Specify",
"the",
"data",
"container",
"in",
"use"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/DataContainerConfigurationBuilder.java#L39-L43 |
29,433 | infinispan/infinispan | core/src/main/java/org/infinispan/stream/impl/IteratorHandler.java | IteratorHandler.start | public <Original, E> OnCloseIterator<E> start(Address origin, Supplier<Stream<Original>> streamSupplier,
Iterable<IntermediateOperation> intOps, Object requestId) {
if (trace) {
log.tracef("Iterator requested from %s using requestId %s", origin, requestId);
}
BaseStream stream = stre... | java | public <Original, E> OnCloseIterator<E> start(Address origin, Supplier<Stream<Original>> streamSupplier,
Iterable<IntermediateOperation> intOps, Object requestId) {
if (trace) {
log.tracef("Iterator requested from %s using requestId %s", origin, requestId);
}
BaseStream stream = stre... | [
"public",
"<",
"Original",
",",
"E",
">",
"OnCloseIterator",
"<",
"E",
">",
"start",
"(",
"Address",
"origin",
",",
"Supplier",
"<",
"Stream",
"<",
"Original",
">",
">",
"streamSupplier",
",",
"Iterable",
"<",
"IntermediateOperation",
">",
"intOps",
",",
"... | Starts an iteration process from the given stream that converts the stream to a subsequent stream using the given
intermediate operations and then creates a managed iterator for the caller to subsequently retrieve.
@param streamSupplier the supplied stream
@param intOps the intermediate operations to perform on the str... | [
"Starts",
"an",
"iteration",
"process",
"from",
"the",
"given",
"stream",
"that",
"converts",
"the",
"stream",
"to",
"a",
"subsequent",
"stream",
"using",
"the",
"given",
"intermediate",
"operations",
"and",
"then",
"creates",
"a",
"managed",
"iterator",
"for",
... | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/stream/impl/IteratorHandler.java#L100-L120 |
29,434 | infinispan/infinispan | core/src/main/java/org/infinispan/container/offheap/OffHeapEntryFactoryImpl.java | OffHeapEntryFactoryImpl.equalsKey | @Override
public boolean equalsKey(long address, WrappedBytes wrappedBytes) {
// 16 bytes for eviction if needed (optional)
// 8 bytes for linked pointer
int headerOffset = evictionEnabled ? 24 : 8;
byte type = MEMORY.getByte(address, headerOffset);
headerOffset++;
// First if has... | java | @Override
public boolean equalsKey(long address, WrappedBytes wrappedBytes) {
// 16 bytes for eviction if needed (optional)
// 8 bytes for linked pointer
int headerOffset = evictionEnabled ? 24 : 8;
byte type = MEMORY.getByte(address, headerOffset);
headerOffset++;
// First if has... | [
"@",
"Override",
"public",
"boolean",
"equalsKey",
"(",
"long",
"address",
",",
"WrappedBytes",
"wrappedBytes",
")",
"{",
"// 16 bytes for eviction if needed (optional)",
"// 8 bytes for linked pointer",
"int",
"headerOffset",
"=",
"evictionEnabled",
"?",
"24",
":",
"8",
... | Assumes the address points to the entry excluding the pointer reference at the beginning
@param address the address of an entry to read
@param wrappedBytes the key to check if it equals
@return whether the key and address are equal | [
"Assumes",
"the",
"address",
"points",
"to",
"the",
"entry",
"excluding",
"the",
"pointer",
"reference",
"at",
"the",
"beginning"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/container/offheap/OffHeapEntryFactoryImpl.java#L367-L399 |
29,435 | infinispan/infinispan | core/src/main/java/org/infinispan/container/offheap/OffHeapEntryFactoryImpl.java | OffHeapEntryFactoryImpl.isExpired | @Override
public boolean isExpired(long address) {
// 16 bytes for eviction if needed (optional)
// 8 bytes for linked pointer
int offset = evictionEnabled ? 24 : 8;
byte metadataType = MEMORY.getByte(address, offset);
if ((metadataType & IMMORTAL) != 0) {
return false;
... | java | @Override
public boolean isExpired(long address) {
// 16 bytes for eviction if needed (optional)
// 8 bytes for linked pointer
int offset = evictionEnabled ? 24 : 8;
byte metadataType = MEMORY.getByte(address, offset);
if ((metadataType & IMMORTAL) != 0) {
return false;
... | [
"@",
"Override",
"public",
"boolean",
"isExpired",
"(",
"long",
"address",
")",
"{",
"// 16 bytes for eviction if needed (optional)",
"// 8 bytes for linked pointer",
"int",
"offset",
"=",
"evictionEnabled",
"?",
"24",
":",
"8",
";",
"byte",
"metadataType",
"=",
"MEMO... | Returns whether entry is expired.
@param address the address of the entry to check
@return {@code true} if the entry is expired, {@code false} otherwise | [
"Returns",
"whether",
"entry",
"is",
"expired",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/container/offheap/OffHeapEntryFactoryImpl.java#L406-L476 |
29,436 | infinispan/infinispan | core/src/main/java/org/infinispan/transaction/xa/recovery/RecoveryAwareTransactionTable.java | RecoveryAwareTransactionTable.cleanupLeaverTransactions | @Override
public void cleanupLeaverTransactions(List<Address> members) {
Iterator<RemoteTransaction> it = getRemoteTransactions().iterator();
while (it.hasNext()) {
RecoveryAwareRemoteTransaction recTx = (RecoveryAwareRemoteTransaction) it.next();
recTx.computeOrphan(members);
... | java | @Override
public void cleanupLeaverTransactions(List<Address> members) {
Iterator<RemoteTransaction> it = getRemoteTransactions().iterator();
while (it.hasNext()) {
RecoveryAwareRemoteTransaction recTx = (RecoveryAwareRemoteTransaction) it.next();
recTx.computeOrphan(members);
... | [
"@",
"Override",
"public",
"void",
"cleanupLeaverTransactions",
"(",
"List",
"<",
"Address",
">",
"members",
")",
"{",
"Iterator",
"<",
"RemoteTransaction",
">",
"it",
"=",
"getRemoteTransactions",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"it"... | First moves the prepared transactions originated on the leavers into the recovery cache and then cleans up the
transactions that are not yet prepared.
@param members The list of cluster members | [
"First",
"moves",
"the",
"prepared",
"transactions",
"originated",
"on",
"the",
"leavers",
"into",
"the",
"recovery",
"cache",
"and",
"then",
"cleans",
"up",
"the",
"transactions",
"that",
"are",
"not",
"yet",
"prepared",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/xa/recovery/RecoveryAwareTransactionTable.java#L62-L75 |
29,437 | infinispan/infinispan | core/src/main/java/org/infinispan/transaction/xa/recovery/RecoveryAwareTransactionTable.java | RecoveryAwareTransactionTable.getRemoteTransactionXid | public Xid getRemoteTransactionXid(Long internalId) {
for (RemoteTransaction rTx : getRemoteTransactions()) {
RecoverableTransactionIdentifier gtx = (RecoverableTransactionIdentifier) rTx.getGlobalTransaction();
if (gtx.getInternalId() == internalId) {
if (trace) log.tracef("Found xi... | java | public Xid getRemoteTransactionXid(Long internalId) {
for (RemoteTransaction rTx : getRemoteTransactions()) {
RecoverableTransactionIdentifier gtx = (RecoverableTransactionIdentifier) rTx.getGlobalTransaction();
if (gtx.getInternalId() == internalId) {
if (trace) log.tracef("Found xi... | [
"public",
"Xid",
"getRemoteTransactionXid",
"(",
"Long",
"internalId",
")",
"{",
"for",
"(",
"RemoteTransaction",
"rTx",
":",
"getRemoteTransactions",
"(",
")",
")",
"{",
"RecoverableTransactionIdentifier",
"gtx",
"=",
"(",
"RecoverableTransactionIdentifier",
")",
"rT... | Iterates over the remote transactions and returns the XID of the one that has an internal id equal with the
supplied internal Id. | [
"Iterates",
"over",
"the",
"remote",
"transactions",
"and",
"returns",
"the",
"XID",
"of",
"the",
"one",
"that",
"has",
"an",
"internal",
"id",
"equal",
"with",
"the",
"supplied",
"internal",
"Id",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/xa/recovery/RecoveryAwareTransactionTable.java#L140-L150 |
29,438 | infinispan/infinispan | core/src/main/java/org/infinispan/jmx/CacheJmxRegistration.java | CacheJmxRegistration.start | @Start(priority = 14)
public void start() {
initMBeanServer(globalConfig);
if (mBeanServer != null) {
Collection<ComponentRef<?>> components = basicComponentRegistry.getRegisteredComponents();
Collection<ResourceDMBean> resourceDMBeans = getResourceDMBeansFromComponents(components);
... | java | @Start(priority = 14)
public void start() {
initMBeanServer(globalConfig);
if (mBeanServer != null) {
Collection<ComponentRef<?>> components = basicComponentRegistry.getRegisteredComponents();
Collection<ResourceDMBean> resourceDMBeans = getResourceDMBeansFromComponents(components);
... | [
"@",
"Start",
"(",
"priority",
"=",
"14",
")",
"public",
"void",
"start",
"(",
")",
"{",
"initMBeanServer",
"(",
"globalConfig",
")",
";",
"if",
"(",
"mBeanServer",
"!=",
"null",
")",
"{",
"Collection",
"<",
"ComponentRef",
"<",
"?",
">",
">",
"compone... | Here is where the registration is being performed. | [
"Here",
"is",
"where",
"the",
"registration",
"is",
"being",
"performed",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/jmx/CacheJmxRegistration.java#L49-L62 |
29,439 | infinispan/infinispan | core/src/main/java/org/infinispan/jmx/CacheJmxRegistration.java | CacheJmxRegistration.stop | @Stop
public void stop() {
if (needToUnregister) {
// Only unregister the non cache MBean so that it can be restarted
try {
unregisterMBeans(nonCacheDMBeans);
needToUnregister = false;
} catch (Exception e) {
log.problemsUnregisteringMBeans(e);
... | java | @Stop
public void stop() {
if (needToUnregister) {
// Only unregister the non cache MBean so that it can be restarted
try {
unregisterMBeans(nonCacheDMBeans);
needToUnregister = false;
} catch (Exception e) {
log.problemsUnregisteringMBeans(e);
... | [
"@",
"Stop",
"public",
"void",
"stop",
"(",
")",
"{",
"if",
"(",
"needToUnregister",
")",
"{",
"// Only unregister the non cache MBean so that it can be restarted",
"try",
"{",
"unregisterMBeans",
"(",
"nonCacheDMBeans",
")",
";",
"needToUnregister",
"=",
"false",
";"... | Unregister when the cache is being stopped. | [
"Unregister",
"when",
"the",
"cache",
"is",
"being",
"stopped",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/jmx/CacheJmxRegistration.java#L67-L85 |
29,440 | infinispan/infinispan | client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transaction/entry/Modification.java | Modification.estimateSize | public int estimateSize(Codec codec) {
int size = key.length + 1; //key + control
if (!ControlByte.NON_EXISTING.hasFlag(control) && !ControlByte.NOT_READ.hasFlag(control)) {
size += 8; //long
}
if (!ControlByte.REMOVE_OP.hasFlag(control)) {
size += value.length;
size +... | java | public int estimateSize(Codec codec) {
int size = key.length + 1; //key + control
if (!ControlByte.NON_EXISTING.hasFlag(control) && !ControlByte.NOT_READ.hasFlag(control)) {
size += 8; //long
}
if (!ControlByte.REMOVE_OP.hasFlag(control)) {
size += value.length;
size +... | [
"public",
"int",
"estimateSize",
"(",
"Codec",
"codec",
")",
"{",
"int",
"size",
"=",
"key",
".",
"length",
"+",
"1",
";",
"//key + control",
"if",
"(",
"!",
"ControlByte",
".",
"NON_EXISTING",
".",
"hasFlag",
"(",
"control",
")",
"&&",
"!",
"ControlByte... | The estimated size.
@param codec the {@link Codec} to use for the size estimation.
@return the estimated size. | [
"The",
"estimated",
"size",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/transaction/entry/Modification.java#L67-L77 |
29,441 | infinispan/infinispan | server/core/src/main/java/org/infinispan/server/core/transport/ExtendedByteBuf.java | ExtendedByteBuf.readString | public static String readString(ByteBuf bf) {
byte[] bytes = readRangedBytes(bf);
return bytes.length > 0 ? new String(bytes, CharsetUtil.UTF_8) : "";
} | java | public static String readString(ByteBuf bf) {
byte[] bytes = readRangedBytes(bf);
return bytes.length > 0 ? new String(bytes, CharsetUtil.UTF_8) : "";
} | [
"public",
"static",
"String",
"readString",
"(",
"ByteBuf",
"bf",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"readRangedBytes",
"(",
"bf",
")",
";",
"return",
"bytes",
".",
"length",
">",
"0",
"?",
"new",
"String",
"(",
"bytes",
",",
"CharsetUtil",
".",... | Reads length of String and then returns an UTF-8 formatted String of such length.
If the length is 0, an empty String is returned. | [
"Reads",
"length",
"of",
"String",
"and",
"then",
"returns",
"an",
"UTF",
"-",
"8",
"formatted",
"String",
"of",
"such",
"length",
".",
"If",
"the",
"length",
"is",
"0",
"an",
"empty",
"String",
"is",
"returned",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/core/src/main/java/org/infinispan/server/core/transport/ExtendedByteBuf.java#L58-L61 |
29,442 | infinispan/infinispan | counter/src/main/java/org/infinispan/counter/impl/manager/CounterConfigurationManager.java | CounterConfigurationManager.getConfiguration | CompletableFuture<CounterConfiguration> getConfiguration(String name) {
return stateCache.getAsync(stateKey(name)).thenCompose(existingConfiguration -> {
if (existingConfiguration == null) {
return checkGlobalConfiguration(name);
} else {
return CompletableFuture.complete... | java | CompletableFuture<CounterConfiguration> getConfiguration(String name) {
return stateCache.getAsync(stateKey(name)).thenCompose(existingConfiguration -> {
if (existingConfiguration == null) {
return checkGlobalConfiguration(name);
} else {
return CompletableFuture.complete... | [
"CompletableFuture",
"<",
"CounterConfiguration",
">",
"getConfiguration",
"(",
"String",
"name",
")",
"{",
"return",
"stateCache",
".",
"getAsync",
"(",
"stateKey",
"(",
"name",
")",
")",
".",
"thenCompose",
"(",
"existingConfiguration",
"->",
"{",
"if",
"(",
... | Returns the counter's configuration.
@param name the counter's name.
@return the counter's {@link CounterConfiguration} or {@code null} if not defined. | [
"Returns",
"the",
"counter",
"s",
"configuration",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/impl/manager/CounterConfigurationManager.java#L160-L168 |
29,443 | infinispan/infinispan | counter/src/main/java/org/infinispan/counter/impl/manager/CounterConfigurationManager.java | CounterConfigurationManager.checkGlobalConfiguration | private CompletableFuture<CounterConfiguration> checkGlobalConfiguration(String name) {
for (AbstractCounterConfiguration config : configuredCounters) {
if (config.name().equals(name)) {
CounterConfiguration cConfig = parsedConfigToConfig(config);
return stateCache.putIfAbsentAsyn... | java | private CompletableFuture<CounterConfiguration> checkGlobalConfiguration(String name) {
for (AbstractCounterConfiguration config : configuredCounters) {
if (config.name().equals(name)) {
CounterConfiguration cConfig = parsedConfigToConfig(config);
return stateCache.putIfAbsentAsyn... | [
"private",
"CompletableFuture",
"<",
"CounterConfiguration",
">",
"checkGlobalConfiguration",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"AbstractCounterConfiguration",
"config",
":",
"configuredCounters",
")",
"{",
"if",
"(",
"config",
".",
"name",
"(",
")",
".... | Checks if the counter is defined in the Infinispan's configuration file.
@param name the counter's name.
@return {@code null} if the counter isn't defined yet. {@link CounterConfiguration} if it is defined. | [
"Checks",
"if",
"the",
"counter",
"is",
"defined",
"in",
"the",
"Infinispan",
"s",
"configuration",
"file",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/impl/manager/CounterConfigurationManager.java#L176-L191 |
29,444 | infinispan/infinispan | counter/src/main/java/org/infinispan/counter/impl/manager/CounterConfigurationManager.java | CounterConfigurationManager.validateConfiguration | private void validateConfiguration(CounterConfiguration configuration) {
storage.validatePersistence(configuration);
switch (configuration.type()) {
case BOUNDED_STRONG:
validateStrongCounterBounds(configuration.lowerBound(), configuration.initialValue(),
configuration... | java | private void validateConfiguration(CounterConfiguration configuration) {
storage.validatePersistence(configuration);
switch (configuration.type()) {
case BOUNDED_STRONG:
validateStrongCounterBounds(configuration.lowerBound(), configuration.initialValue(),
configuration... | [
"private",
"void",
"validateConfiguration",
"(",
"CounterConfiguration",
"configuration",
")",
"{",
"storage",
".",
"validatePersistence",
"(",
"configuration",
")",
";",
"switch",
"(",
"configuration",
".",
"type",
"(",
")",
")",
"{",
"case",
"BOUNDED_STRONG",
":... | Validates the counter's configuration.
@param configuration the {@link CounterConfiguration} to be validated. | [
"Validates",
"the",
"counter",
"s",
"configuration",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/impl/manager/CounterConfigurationManager.java#L207-L220 |
29,445 | infinispan/infinispan | query/src/main/java/org/infinispan/query/clustered/ClusteredQueryInvoker.java | ClusteredQueryInvoker.unicast | QueryResponse unicast(Address address, ClusteredQueryCommand clusteredQueryCommand) {
if (address.equals(myAddress)) {
Future<QueryResponse> localResponse = localInvoke(clusteredQueryCommand);
try {
return localResponse.get();
} catch (InterruptedException e) {
t... | java | QueryResponse unicast(Address address, ClusteredQueryCommand clusteredQueryCommand) {
if (address.equals(myAddress)) {
Future<QueryResponse> localResponse = localInvoke(clusteredQueryCommand);
try {
return localResponse.get();
} catch (InterruptedException e) {
t... | [
"QueryResponse",
"unicast",
"(",
"Address",
"address",
",",
"ClusteredQueryCommand",
"clusteredQueryCommand",
")",
"{",
"if",
"(",
"address",
".",
"equals",
"(",
"myAddress",
")",
")",
"{",
"Future",
"<",
"QueryResponse",
">",
"localResponse",
"=",
"localInvoke",
... | Send this ClusteredQueryCommand to a node.
@param address Address of the destination node
@param clusteredQueryCommand
@return the response | [
"Send",
"this",
"ClusteredQueryCommand",
"to",
"a",
"node",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/clustered/ClusteredQueryInvoker.java#L51-L66 |
29,446 | infinispan/infinispan | query/src/main/java/org/infinispan/query/clustered/ClusteredQueryInvoker.java | ClusteredQueryInvoker.broadcast | List<QueryResponse> broadcast(ClusteredQueryCommand clusteredQueryCommand) {
// invoke on own node
Future<QueryResponse> localResponse = localInvoke(clusteredQueryCommand);
Map<Address, Response> responses = rpcManager.invokeRemotely(null, clusteredQueryCommand, rpcOptions);
List<QueryResponse> ... | java | List<QueryResponse> broadcast(ClusteredQueryCommand clusteredQueryCommand) {
// invoke on own node
Future<QueryResponse> localResponse = localInvoke(clusteredQueryCommand);
Map<Address, Response> responses = rpcManager.invokeRemotely(null, clusteredQueryCommand, rpcOptions);
List<QueryResponse> ... | [
"List",
"<",
"QueryResponse",
">",
"broadcast",
"(",
"ClusteredQueryCommand",
"clusteredQueryCommand",
")",
"{",
"// invoke on own node",
"Future",
"<",
"QueryResponse",
">",
"localResponse",
"=",
"localInvoke",
"(",
"clusteredQueryCommand",
")",
";",
"Map",
"<",
"Add... | Broadcast this ClusteredQueryCommand to all cluster nodes. The command will be also invoked on local node.
@param clusteredQueryCommand
@return the responses | [
"Broadcast",
"this",
"ClusteredQueryCommand",
"to",
"all",
"cluster",
"nodes",
".",
"The",
"command",
"will",
"be",
"also",
"invoked",
"on",
"local",
"node",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/clustered/ClusteredQueryInvoker.java#L74-L87 |
29,447 | infinispan/infinispan | core/src/main/java/org/infinispan/interceptors/distribution/L1WriteSynchronizer.java | L1WriteSynchronizer.runL1UpdateIfPossible | public void runL1UpdateIfPossible(InternalCacheEntry ice) {
try {
if (ice != null) {
Object key;
if (sync.attemptUpdateToRunning() && !dc.containsKey((key = ice.getKey()))) {
// Acquire the transfer lock to ensure that we don't have a rehash and change to become an ... | java | public void runL1UpdateIfPossible(InternalCacheEntry ice) {
try {
if (ice != null) {
Object key;
if (sync.attemptUpdateToRunning() && !dc.containsKey((key = ice.getKey()))) {
// Acquire the transfer lock to ensure that we don't have a rehash and change to become an ... | [
"public",
"void",
"runL1UpdateIfPossible",
"(",
"InternalCacheEntry",
"ice",
")",
"{",
"try",
"{",
"if",
"(",
"ice",
"!=",
"null",
")",
"{",
"Object",
"key",
";",
"if",
"(",
"sync",
".",
"attemptUpdateToRunning",
"(",
")",
"&&",
"!",
"dc",
".",
"contains... | Attempts to the L1 update and set the value. If the L1 update was marked as being skipped this will instead
just set the value to release blockers.
A null value can be provided which will not run the L1 update but will just alert other waiters that a null
was given. | [
"Attempts",
"to",
"the",
"L1",
"update",
"and",
"set",
"the",
"value",
".",
"If",
"the",
"L1",
"update",
"was",
"marked",
"as",
"being",
"skipped",
"this",
"will",
"instead",
"just",
"set",
"the",
"value",
"to",
"release",
"blockers",
".",
"A",
"null",
... | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/distribution/L1WriteSynchronizer.java#L169-L201 |
29,448 | infinispan/infinispan | client/hotrod-client/src/main/java/org/infinispan/client/hotrod/configuration/ConnectionPoolConfigurationBuilder.java | ConnectionPoolConfigurationBuilder.withPoolProperties | public ConnectionPoolConfigurationBuilder withPoolProperties(Properties properties) {
TypedProperties typed = TypedProperties.toTypedProperties(properties);
exhaustedAction(typed.getEnumProperty(ConfigurationProperties.CONNECTION_POOL_EXHAUSTED_ACTION, ExhaustedAction.class,
ExhaustedAction.values(... | java | public ConnectionPoolConfigurationBuilder withPoolProperties(Properties properties) {
TypedProperties typed = TypedProperties.toTypedProperties(properties);
exhaustedAction(typed.getEnumProperty(ConfigurationProperties.CONNECTION_POOL_EXHAUSTED_ACTION, ExhaustedAction.class,
ExhaustedAction.values(... | [
"public",
"ConnectionPoolConfigurationBuilder",
"withPoolProperties",
"(",
"Properties",
"properties",
")",
"{",
"TypedProperties",
"typed",
"=",
"TypedProperties",
".",
"toTypedProperties",
"(",
"properties",
")",
";",
"exhaustedAction",
"(",
"typed",
".",
"getEnumProper... | Configures the connection pool parameter according to properties | [
"Configures",
"the",
"connection",
"pool",
"parameter",
"according",
"to",
"properties"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/configuration/ConnectionPoolConfigurationBuilder.java#L213-L244 |
29,449 | infinispan/infinispan | core/src/main/java/org/infinispan/expiration/impl/ClusterExpirationManager.java | ClusterExpirationManager.handleLifespanExpireEntry | CompletableFuture<Void> handleLifespanExpireEntry(K key, V value, long lifespan, boolean skipLocking) {
// The most used case will be a miss so no extra read before
if (expiring.putIfAbsent(key, key) == null) {
if (trace) {
log.tracef("Submitting expiration removal for key %s which had ... | java | CompletableFuture<Void> handleLifespanExpireEntry(K key, V value, long lifespan, boolean skipLocking) {
// The most used case will be a miss so no extra read before
if (expiring.putIfAbsent(key, key) == null) {
if (trace) {
log.tracef("Submitting expiration removal for key %s which had ... | [
"CompletableFuture",
"<",
"Void",
">",
"handleLifespanExpireEntry",
"(",
"K",
"key",
",",
"V",
"value",
",",
"long",
"lifespan",
",",
"boolean",
"skipLocking",
")",
"{",
"// The most used case will be a miss so no extra read before",
"if",
"(",
"expiring",
".",
"putIf... | holds the lock until this CompletableFuture completes. Without lock skipping this would deadlock. | [
"holds",
"the",
"lock",
"until",
"this",
"CompletableFuture",
"completes",
".",
"Without",
"lock",
"skipping",
"this",
"would",
"deadlock",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/expiration/impl/ClusterExpirationManager.java#L137-L148 |
29,450 | infinispan/infinispan | core/src/main/java/org/infinispan/expiration/impl/ClusterExpirationManager.java | ClusterExpirationManager.handleMaxIdleExpireEntry | CompletableFuture<Boolean> handleMaxIdleExpireEntry(K key, V value, long maxIdle, boolean skipLocking) {
return actualRemoveMaxIdleExpireEntry(key, value, maxIdle, skipLocking);
} | java | CompletableFuture<Boolean> handleMaxIdleExpireEntry(K key, V value, long maxIdle, boolean skipLocking) {
return actualRemoveMaxIdleExpireEntry(key, value, maxIdle, skipLocking);
} | [
"CompletableFuture",
"<",
"Boolean",
">",
"handleMaxIdleExpireEntry",
"(",
"K",
"key",
",",
"V",
"value",
",",
"long",
"maxIdle",
",",
"boolean",
"skipLocking",
")",
"{",
"return",
"actualRemoveMaxIdleExpireEntry",
"(",
"key",
",",
"value",
",",
"maxIdle",
",",
... | Method invoked when an entry is found to be expired via get | [
"Method",
"invoked",
"when",
"an",
"entry",
"is",
"found",
"to",
"be",
"expired",
"via",
"get"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/expiration/impl/ClusterExpirationManager.java#L151-L153 |
29,451 | infinispan/infinispan | core/src/main/java/org/infinispan/expiration/impl/ClusterExpirationManager.java | ClusterExpirationManager.actualRemoveMaxIdleExpireEntry | CompletableFuture<Boolean> actualRemoveMaxIdleExpireEntry(K key, V value, long maxIdle, boolean skipLocking) {
CompletableFuture<Boolean> completableFuture = new CompletableFuture<>();
Object expiringObject = expiring.putIfAbsent(key, completableFuture);
if (expiringObject == null) {
if (trac... | java | CompletableFuture<Boolean> actualRemoveMaxIdleExpireEntry(K key, V value, long maxIdle, boolean skipLocking) {
CompletableFuture<Boolean> completableFuture = new CompletableFuture<>();
Object expiringObject = expiring.putIfAbsent(key, completableFuture);
if (expiringObject == null) {
if (trac... | [
"CompletableFuture",
"<",
"Boolean",
">",
"actualRemoveMaxIdleExpireEntry",
"(",
"K",
"key",
",",
"V",
"value",
",",
"long",
"maxIdle",
",",
"boolean",
"skipLocking",
")",
"{",
"CompletableFuture",
"<",
"Boolean",
">",
"completableFuture",
"=",
"new",
"Completable... | Method invoked when entry should be attempted to be removed via max idle | [
"Method",
"invoked",
"when",
"entry",
"should",
"be",
"attempted",
"to",
"be",
"removed",
"via",
"max",
"idle"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/expiration/impl/ClusterExpirationManager.java#L156-L186 |
29,452 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/AbstractStoreConfigurationBuilder.java | AbstractStoreConfigurationBuilder.purgeOnStartup | @Override
public S purgeOnStartup(boolean b) {
attributes.attribute(PURGE_ON_STARTUP).set(b);
purgeOnStartup = b;
return self();
} | java | @Override
public S purgeOnStartup(boolean b) {
attributes.attribute(PURGE_ON_STARTUP).set(b);
purgeOnStartup = b;
return self();
} | [
"@",
"Override",
"public",
"S",
"purgeOnStartup",
"(",
"boolean",
"b",
")",
"{",
"attributes",
".",
"attribute",
"(",
"PURGE_ON_STARTUP",
")",
".",
"set",
"(",
"b",
")",
";",
"purgeOnStartup",
"=",
"b",
";",
"return",
"self",
"(",
")",
";",
"}"
] | If true, purges this cache store when it starts up. | [
"If",
"true",
"purges",
"this",
"cache",
"store",
"when",
"it",
"starts",
"up",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/AbstractStoreConfigurationBuilder.java#L134-L139 |
29,453 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/cache/PersistenceConfigurationBuilder.java | PersistenceConfigurationBuilder.addStore | public <T extends StoreConfigurationBuilder<?, ?>> T addStore(Class<T> klass) {
try {
Constructor<T> constructor = klass.getDeclaredConstructor(PersistenceConfigurationBuilder.class);
T builder = constructor.newInstance(this);
this.stores.add(builder);
return builder;
} c... | java | public <T extends StoreConfigurationBuilder<?, ?>> T addStore(Class<T> klass) {
try {
Constructor<T> constructor = klass.getDeclaredConstructor(PersistenceConfigurationBuilder.class);
T builder = constructor.newInstance(this);
this.stores.add(builder);
return builder;
} c... | [
"public",
"<",
"T",
"extends",
"StoreConfigurationBuilder",
"<",
"?",
",",
"?",
">",
">",
"T",
"addStore",
"(",
"Class",
"<",
"T",
">",
"klass",
")",
"{",
"try",
"{",
"Constructor",
"<",
"T",
">",
"constructor",
"=",
"klass",
".",
"getDeclaredConstructor... | Adds a cache loader that uses the specified builder class to build its configuration. | [
"Adds",
"a",
"cache",
"loader",
"that",
"uses",
"the",
"specified",
"builder",
"class",
"to",
"build",
"its",
"configuration",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/PersistenceConfigurationBuilder.java#L148-L158 |
29,454 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/util/SmallIntSet.java | SmallIntSet.from | public static SmallIntSet from(Set<Integer> set) {
if (set instanceof SmallIntSet) {
return (SmallIntSet) set;
} else {
return new SmallIntSet(set);
}
} | java | public static SmallIntSet from(Set<Integer> set) {
if (set instanceof SmallIntSet) {
return (SmallIntSet) set;
} else {
return new SmallIntSet(set);
}
} | [
"public",
"static",
"SmallIntSet",
"from",
"(",
"Set",
"<",
"Integer",
">",
"set",
")",
"{",
"if",
"(",
"set",
"instanceof",
"SmallIntSet",
")",
"{",
"return",
"(",
"SmallIntSet",
")",
"set",
";",
"}",
"else",
"{",
"return",
"new",
"SmallIntSet",
"(",
... | Either converts the given set to an IntSet if it is one or creates a new IntSet and copies the contents
@param set
@return | [
"Either",
"converts",
"the",
"given",
"set",
"to",
"an",
"IntSet",
"if",
"it",
"is",
"one",
"or",
"creates",
"a",
"new",
"IntSet",
"and",
"copies",
"the",
"contents"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/SmallIntSet.java#L74-L80 |
29,455 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/util/SmallIntSet.java | SmallIntSet.add | public boolean add(int i) {
boolean wasSet = bitSet.get(i);
if (!wasSet) {
bitSet.set(i);
return true;
}
return false;
} | java | public boolean add(int i) {
boolean wasSet = bitSet.get(i);
if (!wasSet) {
bitSet.set(i);
return true;
}
return false;
} | [
"public",
"boolean",
"add",
"(",
"int",
"i",
")",
"{",
"boolean",
"wasSet",
"=",
"bitSet",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"!",
"wasSet",
")",
"{",
"bitSet",
".",
"set",
"(",
"i",
")",
";",
"return",
"true",
";",
"}",
"return",
"fals... | Add an integer to the set without boxing the parameter. | [
"Add",
"an",
"integer",
"to",
"the",
"set",
"without",
"boxing",
"the",
"parameter",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/SmallIntSet.java#L229-L236 |
29,456 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/util/SmallIntSet.java | SmallIntSet.remove | public boolean remove(int i) {
boolean wasSet = bitSet.get(i);
if (wasSet) {
bitSet.clear(i);
return true;
}
return false;
} | java | public boolean remove(int i) {
boolean wasSet = bitSet.get(i);
if (wasSet) {
bitSet.clear(i);
return true;
}
return false;
} | [
"public",
"boolean",
"remove",
"(",
"int",
"i",
")",
"{",
"boolean",
"wasSet",
"=",
"bitSet",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"wasSet",
")",
"{",
"bitSet",
".",
"clear",
"(",
"i",
")",
";",
"return",
"true",
";",
"}",
"return",
"false"... | Remove an integer from the set without boxing. | [
"Remove",
"an",
"integer",
"from",
"the",
"set",
"without",
"boxing",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/SmallIntSet.java#L263-L270 |
29,457 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/dataconversion/EncodingUtils.java | EncodingUtils.fromStorage | public static Object fromStorage(Object stored, Encoder encoder, Wrapper wrapper) {
if (encoder == null || wrapper == null) {
throw new IllegalArgumentException("Both Encoder and Wrapper must be provided!");
}
if (stored == null) return null;
return encoder.fromStorage(wrapper.unwrap(st... | java | public static Object fromStorage(Object stored, Encoder encoder, Wrapper wrapper) {
if (encoder == null || wrapper == null) {
throw new IllegalArgumentException("Both Encoder and Wrapper must be provided!");
}
if (stored == null) return null;
return encoder.fromStorage(wrapper.unwrap(st... | [
"public",
"static",
"Object",
"fromStorage",
"(",
"Object",
"stored",
",",
"Encoder",
"encoder",
",",
"Wrapper",
"wrapper",
")",
"{",
"if",
"(",
"encoder",
"==",
"null",
"||",
"wrapper",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"("... | Decode object from storage format.
@param stored Object in the storage format.
@param encoder the {@link Encoder} used for data conversion.
@param wrapper the {@link Wrapper} used to decorate the converted data.
@return Object decoded and unwrapped. | [
"Decode",
"object",
"from",
"storage",
"format",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/dataconversion/EncodingUtils.java#L22-L28 |
29,458 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/dataconversion/EncodingUtils.java | EncodingUtils.toStorage | public static Object toStorage(Object toStore, Encoder encoder, Wrapper wrapper) {
if (encoder == null || wrapper == null) {
throw new IllegalArgumentException("Both Encoder and Wrapper must be provided!");
}
if (toStore == null) return null;
return wrapper.wrap(encoder.toStorage(toStor... | java | public static Object toStorage(Object toStore, Encoder encoder, Wrapper wrapper) {
if (encoder == null || wrapper == null) {
throw new IllegalArgumentException("Both Encoder and Wrapper must be provided!");
}
if (toStore == null) return null;
return wrapper.wrap(encoder.toStorage(toStor... | [
"public",
"static",
"Object",
"toStorage",
"(",
"Object",
"toStore",
",",
"Encoder",
"encoder",
",",
"Wrapper",
"wrapper",
")",
"{",
"if",
"(",
"encoder",
"==",
"null",
"||",
"wrapper",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",... | Encode object to storage format.
@param toStore Object to be encoded.
@param encoder the {@link Encoder} used for data conversion.
@param wrapper the {@link Wrapper} used to decorate the converted data.
@return Object decoded and unwrapped. | [
"Encode",
"object",
"to",
"storage",
"format",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/dataconversion/EncodingUtils.java#L38-L44 |
29,459 | infinispan/infinispan | core/src/main/java/org/infinispan/configuration/parsing/ParseUtils.java | ParseUtils.requireSingleAttribute | public static String requireSingleAttribute(final XMLStreamReader reader, final String attributeName)
throws XMLStreamException {
final int count = reader.getAttributeCount();
if (count == 0) {
throw missingRequired(reader, Collections.singleton(attributeName));
}
... | java | public static String requireSingleAttribute(final XMLStreamReader reader, final String attributeName)
throws XMLStreamException {
final int count = reader.getAttributeCount();
if (count == 0) {
throw missingRequired(reader, Collections.singleton(attributeName));
}
... | [
"public",
"static",
"String",
"requireSingleAttribute",
"(",
"final",
"XMLStreamReader",
"reader",
",",
"final",
"String",
"attributeName",
")",
"throws",
"XMLStreamException",
"{",
"final",
"int",
"count",
"=",
"reader",
".",
"getAttributeCount",
"(",
")",
";",
"... | Require that the current element have only a single attribute with the
given name.
@param reader the reader
@param attributeName the attribute name
@throws javax.xml.stream.XMLStreamException if an error occurs | [
"Require",
"that",
"the",
"current",
"element",
"have",
"only",
"a",
"single",
"attribute",
"with",
"the",
"given",
"name",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/parsing/ParseUtils.java#L210-L224 |
29,460 | infinispan/infinispan | core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java | CacheNotifierImpl.configureEvent | private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
EventImpl<K, V> e, K key, V value, Metadata metadata, boolean pre, InvocationContext ctx,
FlagAffectedCommand command, V previousValue, Metadata previousMetadata) {
key = conv... | java | private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
EventImpl<K, V> e, K key, V value, Metadata metadata, boolean pre, InvocationContext ctx,
FlagAffectedCommand command, V previousValue, Metadata previousMetadata) {
key = conv... | [
"private",
"void",
"configureEvent",
"(",
"CacheEntryListenerInvocation",
"listenerInvocation",
",",
"EventImpl",
"<",
"K",
",",
"V",
">",
"e",
",",
"K",
"key",
",",
"V",
"value",
",",
"Metadata",
"metadata",
",",
"boolean",
"pre",
",",
"InvocationContext",
"c... | Configure event data. Currently used for 'created', 'modified', 'removed', 'invalidated' events. | [
"Configure",
"event",
"data",
".",
"Currently",
"used",
"for",
"created",
"modified",
"removed",
"invalidated",
"events",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java#L509-L527 |
29,461 | infinispan/infinispan | core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java | CacheNotifierImpl.configureEvent | private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
EventImpl<K, V> e, K key, V value, boolean pre, InvocationContext ctx) {
e.setPre(pre);
e.setKey(convertKey(listenerInvocation, key));
e.setValue(convertValue(listenerInvocation, value));
... | java | private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
EventImpl<K, V> e, K key, V value, boolean pre, InvocationContext ctx) {
e.setPre(pre);
e.setKey(convertKey(listenerInvocation, key));
e.setValue(convertValue(listenerInvocation, value));
... | [
"private",
"void",
"configureEvent",
"(",
"CacheEntryListenerInvocation",
"listenerInvocation",
",",
"EventImpl",
"<",
"K",
",",
"V",
">",
"e",
",",
"K",
"key",
",",
"V",
"value",
",",
"boolean",
"pre",
",",
"InvocationContext",
"ctx",
")",
"{",
"e",
".",
... | Configure event data. Currently used for 'activated', 'loaded', 'visited' events. | [
"Configure",
"event",
"data",
".",
"Currently",
"used",
"for",
"activated",
"loaded",
"visited",
"events",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java#L532-L539 |
29,462 | infinispan/infinispan | core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java | CacheNotifierImpl.configureEvent | private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
EventImpl<K, V> e, K key, V value, Metadata metadata) {
e.setKey(convertKey(listenerInvocation, key));
e.setValue(convertValue(listenerInvocation, value));
e.setMetadata(metadata);
e.setOr... | java | private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
EventImpl<K, V> e, K key, V value, Metadata metadata) {
e.setKey(convertKey(listenerInvocation, key));
e.setValue(convertValue(listenerInvocation, value));
e.setMetadata(metadata);
e.setOr... | [
"private",
"void",
"configureEvent",
"(",
"CacheEntryListenerInvocation",
"listenerInvocation",
",",
"EventImpl",
"<",
"K",
",",
"V",
">",
"e",
",",
"K",
"key",
",",
"V",
"value",
",",
"Metadata",
"metadata",
")",
"{",
"e",
".",
"setKey",
"(",
"convertKey",
... | Configure event data. Currently used for 'expired' events. | [
"Configure",
"event",
"data",
".",
"Currently",
"used",
"for",
"expired",
"events",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java#L544-L551 |
29,463 | infinispan/infinispan | core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java | CacheNotifierImpl.findIndexingServiceProvider | private FilterIndexingServiceProvider findIndexingServiceProvider(IndexedFilter indexedFilter) {
if (filterIndexingServiceProviders != null) {
for (FilterIndexingServiceProvider provider : filterIndexingServiceProviders) {
if (provider.supportsFilter(indexedFilter)) {
return pr... | java | private FilterIndexingServiceProvider findIndexingServiceProvider(IndexedFilter indexedFilter) {
if (filterIndexingServiceProviders != null) {
for (FilterIndexingServiceProvider provider : filterIndexingServiceProviders) {
if (provider.supportsFilter(indexedFilter)) {
return pr... | [
"private",
"FilterIndexingServiceProvider",
"findIndexingServiceProvider",
"(",
"IndexedFilter",
"indexedFilter",
")",
"{",
"if",
"(",
"filterIndexingServiceProviders",
"!=",
"null",
")",
"{",
"for",
"(",
"FilterIndexingServiceProvider",
"provider",
":",
"filterIndexingServic... | Gets a suitable indexing provider for the given indexed filter.
@param indexedFilter the filter
@return the FilterIndexingServiceProvider that supports the given IndexedFilter or {@code null} if none was found | [
"Gets",
"a",
"suitable",
"indexing",
"provider",
"for",
"the",
"given",
"indexed",
"filter",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/notifications/cachelistener/CacheNotifierImpl.java#L1195-L1205 |
29,464 | infinispan/infinispan | core/src/main/java/org/infinispan/executors/LimitedExecutor.java | LimitedExecutor.shutdownNow | public void shutdownNow() {
log.tracef("Stopping limited executor %s", name);
running = false;
lock.lock();
try {
queue.clear();
for (Thread t : threads.keySet()) {
t.interrupt();
}
} finally {
lock.unlock();
}
} | java | public void shutdownNow() {
log.tracef("Stopping limited executor %s", name);
running = false;
lock.lock();
try {
queue.clear();
for (Thread t : threads.keySet()) {
t.interrupt();
}
} finally {
lock.unlock();
}
} | [
"public",
"void",
"shutdownNow",
"(",
")",
"{",
"log",
".",
"tracef",
"(",
"\"Stopping limited executor %s\"",
",",
"name",
")",
";",
"running",
"=",
"false",
";",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"queue",
".",
"clear",
"(",
")",
";",
... | Stops the executor and cancels any queued tasks.
Stop and interrupt any tasks that have already been handed to the underlying executor. | [
"Stops",
"the",
"executor",
"and",
"cancels",
"any",
"queued",
"tasks",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/executors/LimitedExecutor.java#L68-L81 |
29,465 | infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java | BaseCompleteTransactionOperation.notifyCacheCollected | void notifyCacheCollected() {
int result = expectedCaches.decrementAndGet();
if (isTraceEnabled()) {
log().tracef("[%s] Cache collected. Missing=%s.", xid, result);
}
if (result == 0) {
onCachesCollected();
}
} | java | void notifyCacheCollected() {
int result = expectedCaches.decrementAndGet();
if (isTraceEnabled()) {
log().tracef("[%s] Cache collected. Missing=%s.", xid, result);
}
if (result == 0) {
onCachesCollected();
}
} | [
"void",
"notifyCacheCollected",
"(",
")",
"{",
"int",
"result",
"=",
"expectedCaches",
".",
"decrementAndGet",
"(",
")",
";",
"if",
"(",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
"(",
")",
".",
"tracef",
"(",
"\"[%s] Cache collected. Missing=%s.\"",
",",
... | Invoked every time a cache is found to be involved in a transaction. | [
"Invoked",
"every",
"time",
"a",
"cache",
"is",
"found",
"to",
"be",
"involved",
"in",
"a",
"transaction",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java#L138-L146 |
29,466 | infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java | BaseCompleteTransactionOperation.onCachesCollected | private void onCachesCollected() {
if (isTraceEnabled()) {
log().tracef("[%s] All caches collected: %s", xid, cacheNames);
}
int size = cacheNames.size();
if (size == 0) {
//it can happen if all caches either commit or thrown an exception
sendReply();
return;
... | java | private void onCachesCollected() {
if (isTraceEnabled()) {
log().tracef("[%s] All caches collected: %s", xid, cacheNames);
}
int size = cacheNames.size();
if (size == 0) {
//it can happen if all caches either commit or thrown an exception
sendReply();
return;
... | [
"private",
"void",
"onCachesCollected",
"(",
")",
"{",
"if",
"(",
"isTraceEnabled",
"(",
")",
")",
"{",
"log",
"(",
")",
".",
"tracef",
"(",
"\"[%s] All caches collected: %s\"",
",",
"xid",
",",
"cacheNames",
")",
";",
"}",
"int",
"size",
"=",
"cacheNames"... | Invoked when all caches are ready to complete the transaction. | [
"Invoked",
"when",
"all",
"caches",
"are",
"ready",
"to",
"complete",
"the",
"transaction",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java#L151-L171 |
29,467 | infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java | BaseCompleteTransactionOperation.completeCache | private CompletableFuture<Void> completeCache(ByteString cacheName) throws Throwable {
TxState state = globalTxTable.getState(new CacheXid(cacheName, xid));
HotRodServer.CacheInfo cacheInfo =
server.getCacheInfo(cacheName.toString(), header.getVersion(), header.getMessageId(), true);
Advanced... | java | private CompletableFuture<Void> completeCache(ByteString cacheName) throws Throwable {
TxState state = globalTxTable.getState(new CacheXid(cacheName, xid));
HotRodServer.CacheInfo cacheInfo =
server.getCacheInfo(cacheName.toString(), header.getVersion(), header.getMessageId(), true);
Advanced... | [
"private",
"CompletableFuture",
"<",
"Void",
">",
"completeCache",
"(",
"ByteString",
"cacheName",
")",
"throws",
"Throwable",
"{",
"TxState",
"state",
"=",
"globalTxTable",
".",
"getState",
"(",
"new",
"CacheXid",
"(",
"cacheName",
",",
"xid",
")",
")",
";",
... | Completes the transaction for a specific cache. | [
"Completes",
"the",
"transaction",
"for",
"a",
"specific",
"cache",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java#L176-L198 |
29,468 | infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java | BaseCompleteTransactionOperation.completeWithRemoteCommand | private CompletableFuture<Void> completeWithRemoteCommand(AdvancedCache<?, ?> cache, RpcManager rpcManager,
TxState state)
throws Throwable {
CommandsFactory commandsFactory = cache.getComponentRegistry().getCommandsFactory();
CacheRpcCommand command = buildRemoteCommand(cache.getCacheConf... | java | private CompletableFuture<Void> completeWithRemoteCommand(AdvancedCache<?, ?> cache, RpcManager rpcManager,
TxState state)
throws Throwable {
CommandsFactory commandsFactory = cache.getComponentRegistry().getCommandsFactory();
CacheRpcCommand command = buildRemoteCommand(cache.getCacheConf... | [
"private",
"CompletableFuture",
"<",
"Void",
">",
"completeWithRemoteCommand",
"(",
"AdvancedCache",
"<",
"?",
",",
"?",
">",
"cache",
",",
"RpcManager",
"rpcManager",
",",
"TxState",
"state",
")",
"throws",
"Throwable",
"{",
"CommandsFactory",
"commandsFactory",
... | Completes the transaction in the cache when the originator no longer belongs to the cache topology. | [
"Completes",
"the",
"transaction",
"in",
"the",
"cache",
"when",
"the",
"originator",
"no",
"longer",
"belongs",
"to",
"the",
"cache",
"topology",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java#L203-L215 |
29,469 | infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java | BaseCompleteTransactionOperation.forwardCompleteCommand | private CompletableFuture<Void> forwardCompleteCommand(ByteString cacheName, RpcManager rpcManager,
TxState state) {
//TODO what if the originator crashes in the meanwhile?
//actually, the reaper would rollback the transaction later...
Address originator = state.getOriginator();
CacheRp... | java | private CompletableFuture<Void> forwardCompleteCommand(ByteString cacheName, RpcManager rpcManager,
TxState state) {
//TODO what if the originator crashes in the meanwhile?
//actually, the reaper would rollback the transaction later...
Address originator = state.getOriginator();
CacheRp... | [
"private",
"CompletableFuture",
"<",
"Void",
">",
"forwardCompleteCommand",
"(",
"ByteString",
"cacheName",
",",
"RpcManager",
"rpcManager",
",",
"TxState",
"state",
")",
"{",
"//TODO what if the originator crashes in the meanwhile?",
"//actually, the reaper would rollback the tr... | Completes the transaction in the cache when the originator is still in the cache topology. | [
"Completes",
"the",
"transaction",
"in",
"the",
"cache",
"when",
"the",
"originator",
"is",
"still",
"in",
"the",
"cache",
"topology",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/tx/operation/BaseCompleteTransactionOperation.java#L220-L229 |
29,470 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java | TransactionStatistics.addValue | public final void addValue(ExtendedStatistic stat, double value) {
container.addValue(stat, value);
if (trace) {
log.tracef("Add %s to %s", value, stat);
}
} | java | public final void addValue(ExtendedStatistic stat, double value) {
container.addValue(stat, value);
if (trace) {
log.tracef("Add %s to %s", value, stat);
}
} | [
"public",
"final",
"void",
"addValue",
"(",
"ExtendedStatistic",
"stat",
",",
"double",
"value",
")",
"{",
"container",
".",
"addValue",
"(",
"stat",
",",
"value",
")",
";",
"if",
"(",
"trace",
")",
"{",
"log",
".",
"tracef",
"(",
"\"Add %s to %s\"",
","... | Adds a value to a statistic collected for this transaction. | [
"Adds",
"a",
"value",
"to",
"a",
"statistic",
"collected",
"for",
"this",
"transaction",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java#L88-L93 |
29,471 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java | TransactionStatistics.terminateTransaction | public final void terminateTransaction() {
if (trace) {
log.tracef("Terminating transaction. Is read only? %s. Is commit? %s", readOnly, committed);
}
long execTime = timeService.timeDuration(initTime, NANOSECONDS);
if (readOnly) {
if (committed) {
incrementValue(NU... | java | public final void terminateTransaction() {
if (trace) {
log.tracef("Terminating transaction. Is read only? %s. Is commit? %s", readOnly, committed);
}
long execTime = timeService.timeDuration(initTime, NANOSECONDS);
if (readOnly) {
if (committed) {
incrementValue(NU... | [
"public",
"final",
"void",
"terminateTransaction",
"(",
")",
"{",
"if",
"(",
"trace",
")",
"{",
"log",
".",
"tracef",
"(",
"\"Terminating transaction. Is read only? %s. Is commit? %s\"",
",",
"readOnly",
",",
"committed",
")",
";",
"}",
"long",
"execTime",
"=",
... | Signals this transaction as completed and updates the statistics to the final values ready to be merged in the
cache statistics. | [
"Signals",
"this",
"transaction",
"as",
"completed",
"and",
"updates",
"the",
"statistics",
"to",
"the",
"final",
"values",
"ready",
"to",
"be",
"merged",
"in",
"the",
"cache",
"statistics",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java#L119-L143 |
29,472 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java | TransactionStatistics.flushTo | public final void flushTo(ConcurrentGlobalContainer globalContainer) {
if (trace) {
log.tracef("Flush this [%s] to %s", this, globalContainer);
}
container.mergeTo(globalContainer);
} | java | public final void flushTo(ConcurrentGlobalContainer globalContainer) {
if (trace) {
log.tracef("Flush this [%s] to %s", this, globalContainer);
}
container.mergeTo(globalContainer);
} | [
"public",
"final",
"void",
"flushTo",
"(",
"ConcurrentGlobalContainer",
"globalContainer",
")",
"{",
"if",
"(",
"trace",
")",
"{",
"log",
".",
"tracef",
"(",
"\"Flush this [%s] to %s\"",
",",
"this",
",",
"globalContainer",
")",
";",
"}",
"container",
".",
"me... | Merges this statistics in the global container. | [
"Merges",
"this",
"statistics",
"in",
"the",
"global",
"container",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java#L148-L153 |
29,473 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java | TransactionStatistics.copyValue | protected final void copyValue(ExtendedStatistic from, ExtendedStatistic to) {
try {
double value = container.getValue(from);
container.addValue(to, value);
if (log.isDebugEnabled()) {
log.debugf("Copy value [%s] from [%s] to [%s]", value, from, to);
}
} catch... | java | protected final void copyValue(ExtendedStatistic from, ExtendedStatistic to) {
try {
double value = container.getValue(from);
container.addValue(to, value);
if (log.isDebugEnabled()) {
log.debugf("Copy value [%s] from [%s] to [%s]", value, from, to);
}
} catch... | [
"protected",
"final",
"void",
"copyValue",
"(",
"ExtendedStatistic",
"from",
",",
"ExtendedStatistic",
"to",
")",
"{",
"try",
"{",
"double",
"value",
"=",
"container",
".",
"getValue",
"(",
"from",
")",
";",
"container",
".",
"addValue",
"(",
"to",
",",
"v... | Copies a statistic value and adds it to another statistic. | [
"Copies",
"a",
"statistic",
"value",
"and",
"adds",
"it",
"to",
"another",
"statistic",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/TransactionStatistics.java#L182-L192 |
29,474 | infinispan/infinispan | core/src/main/java/org/infinispan/persistence/async/BufferLock.java | BufferLock.writeLock | void writeLock(int count) {
if (count > 0 && counter != null)
counter.acquireShared(count);
sync.acquireShared(1);
} | java | void writeLock(int count) {
if (count > 0 && counter != null)
counter.acquireShared(count);
sync.acquireShared(1);
} | [
"void",
"writeLock",
"(",
"int",
"count",
")",
"{",
"if",
"(",
"count",
">",
"0",
"&&",
"counter",
"!=",
"null",
")",
"counter",
".",
"acquireShared",
"(",
"count",
")",
";",
"sync",
".",
"acquireShared",
"(",
"1",
")",
";",
"}"
] | Acquires the write lock and consumes the specified amount of buffer space. Blocks if the
object is currently locked for reading, or if the buffer is full and count is greater than 0.
@param count
number of items the caller intends to write | [
"Acquires",
"the",
"write",
"lock",
"and",
"consumes",
"the",
"specified",
"amount",
"of",
"buffer",
"space",
".",
"Blocks",
"if",
"the",
"object",
"is",
"currently",
"locked",
"for",
"reading",
"or",
"if",
"the",
"buffer",
"is",
"full",
"and",
"count",
"i... | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/persistence/async/BufferLock.java#L140-L144 |
29,475 | infinispan/infinispan | core/src/main/java/org/infinispan/persistence/async/BufferLock.java | BufferLock.reset | void reset(int count) {
if (counter != null)
counter.releaseShared(count);
available.releaseShared(count);
} | java | void reset(int count) {
if (counter != null)
counter.releaseShared(count);
available.releaseShared(count);
} | [
"void",
"reset",
"(",
"int",
"count",
")",
"{",
"if",
"(",
"counter",
"!=",
"null",
")",
"counter",
".",
"releaseShared",
"(",
"count",
")",
";",
"available",
".",
"releaseShared",
"(",
"count",
")",
";",
"}"
] | Resets the buffer counter to the specified number.
@param count
number of available items in the buffer | [
"Resets",
"the",
"buffer",
"counter",
"to",
"the",
"specified",
"number",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/persistence/async/BufferLock.java#L176-L180 |
29,476 | infinispan/infinispan | lucene/lucene-directory/src/main/java/org/infinispan/lucene/impl/DirectoryLucene.java | DirectoryLucene.forceUnlock | @Override
public void forceUnlock(String lockName) {
Cache<Object, Integer> lockCache = getDistLockCache().getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE, Flag.SKIP_CACHE_LOAD);
FileCacheKey fileCacheKey = new FileCacheKey(indexName, lockName, affinitySegmentId);
Object previousValue = lockCach... | java | @Override
public void forceUnlock(String lockName) {
Cache<Object, Integer> lockCache = getDistLockCache().getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE, Flag.SKIP_CACHE_LOAD);
FileCacheKey fileCacheKey = new FileCacheKey(indexName, lockName, affinitySegmentId);
Object previousValue = lockCach... | [
"@",
"Override",
"public",
"void",
"forceUnlock",
"(",
"String",
"lockName",
")",
"{",
"Cache",
"<",
"Object",
",",
"Integer",
">",
"lockCache",
"=",
"getDistLockCache",
"(",
")",
".",
"getAdvancedCache",
"(",
")",
".",
"withFlags",
"(",
"Flag",
".",
"SKIP... | Force release of the lock in this directory. Make sure to understand the
consequences | [
"Force",
"release",
"of",
"the",
"lock",
"in",
"this",
"directory",
".",
"Make",
"sure",
"to",
"understand",
"the",
"consequences"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/lucene-directory/src/main/java/org/infinispan/lucene/impl/DirectoryLucene.java#L174-L182 |
29,477 | infinispan/infinispan | query/src/main/java/org/infinispan/query/Search.java | Search.makeFilter | public static <K, V> CacheEventFilterConverter<K, V, ObjectFilter.FilterResult> makeFilter(Query query) {
return makeFilter(query.getQueryString(), query.getParameters());
} | java | public static <K, V> CacheEventFilterConverter<K, V, ObjectFilter.FilterResult> makeFilter(Query query) {
return makeFilter(query.getQueryString(), query.getParameters());
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"CacheEventFilterConverter",
"<",
"K",
",",
"V",
",",
"ObjectFilter",
".",
"FilterResult",
">",
"makeFilter",
"(",
"Query",
"query",
")",
"{",
"return",
"makeFilter",
"(",
"query",
".",
"getQueryString",
"(",
")... | Create an event filter out of an Ickle query. | [
"Create",
"an",
"event",
"filter",
"out",
"of",
"an",
"Ickle",
"query",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/Search.java#L59-L61 |
29,478 | infinispan/infinispan | query/src/main/java/org/infinispan/query/Search.java | Search.getQueryFactory | public static QueryFactory getQueryFactory(Cache<?, ?> cache) {
if (cache == null || cache.getAdvancedCache() == null) {
throw new IllegalArgumentException("cache parameter shall not be null");
}
AdvancedCache<?, ?> advancedCache = cache.getAdvancedCache();
ensureAccessPermissions(advan... | java | public static QueryFactory getQueryFactory(Cache<?, ?> cache) {
if (cache == null || cache.getAdvancedCache() == null) {
throw new IllegalArgumentException("cache parameter shall not be null");
}
AdvancedCache<?, ?> advancedCache = cache.getAdvancedCache();
ensureAccessPermissions(advan... | [
"public",
"static",
"QueryFactory",
"getQueryFactory",
"(",
"Cache",
"<",
"?",
",",
"?",
">",
"cache",
")",
"{",
"if",
"(",
"cache",
"==",
"null",
"||",
"cache",
".",
"getAdvancedCache",
"(",
")",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentE... | Obtain the query factory for building DSL based Ickle queries. | [
"Obtain",
"the",
"query",
"factory",
"for",
"building",
"DSL",
"based",
"Ickle",
"queries",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/Search.java#L66-L77 |
29,479 | infinispan/infinispan | core/src/main/java/org/infinispan/container/offheap/MemoryAddressHash.java | MemoryAddressHash.toStream | public LongStream toStream() {
return LongStream.iterate(memory, l -> l + 8)
.limit(pointerCount)
.map(UNSAFE::getLong)
.filter(l -> l != 0);
} | java | public LongStream toStream() {
return LongStream.iterate(memory, l -> l + 8)
.limit(pointerCount)
.map(UNSAFE::getLong)
.filter(l -> l != 0);
} | [
"public",
"LongStream",
"toStream",
"(",
")",
"{",
"return",
"LongStream",
".",
"iterate",
"(",
"memory",
",",
"l",
"->",
"l",
"+",
"8",
")",
".",
"limit",
"(",
"pointerCount",
")",
".",
"map",
"(",
"UNSAFE",
"::",
"getLong",
")",
".",
"filter",
"(",... | Returns a stream of longs that are all of the various memory locations
@return stream of the various memory locations | [
"Returns",
"a",
"stream",
"of",
"longs",
"that",
"are",
"all",
"of",
"the",
"various",
"memory",
"locations"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/container/offheap/MemoryAddressHash.java#L61-L66 |
29,480 | infinispan/infinispan | core/src/main/java/org/infinispan/jmx/CacheManagerJmxRegistration.java | CacheManagerJmxRegistration.start | public void start() {
initMBeanServer(globalConfig);
if (mBeanServer != null) {
Collection<ComponentRef<?>> components = basicComponentRegistry.getRegisteredComponents();
resourceDMBeans = Collections.synchronizedCollection(getResourceDMBeansFromComponents(components));
registra... | java | public void start() {
initMBeanServer(globalConfig);
if (mBeanServer != null) {
Collection<ComponentRef<?>> components = basicComponentRegistry.getRegisteredComponents();
resourceDMBeans = Collections.synchronizedCollection(getResourceDMBeansFromComponents(components));
registra... | [
"public",
"void",
"start",
"(",
")",
"{",
"initMBeanServer",
"(",
"globalConfig",
")",
";",
"if",
"(",
"mBeanServer",
"!=",
"null",
")",
"{",
"Collection",
"<",
"ComponentRef",
"<",
"?",
">",
">",
"components",
"=",
"basicComponentRegistry",
".",
"getRegiste... | On start, the mbeans are registered. | [
"On",
"start",
"the",
"mbeans",
"are",
"registered",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/jmx/CacheManagerJmxRegistration.java#L41-L52 |
29,481 | infinispan/infinispan | core/src/main/java/org/infinispan/jmx/CacheManagerJmxRegistration.java | CacheManagerJmxRegistration.stop | public void stop() {
// This method might get called several times.
if (stopped) return;
if (needToUnregister) {
try {
unregisterMBeans(resourceDMBeans);
needToUnregister = false;
} catch (Exception e) {
log.problemsUnregisteringMBeans(e);
... | java | public void stop() {
// This method might get called several times.
if (stopped) return;
if (needToUnregister) {
try {
unregisterMBeans(resourceDMBeans);
needToUnregister = false;
} catch (Exception e) {
log.problemsUnregisteringMBeans(e);
... | [
"public",
"void",
"stop",
"(",
")",
"{",
"// This method might get called several times.",
"if",
"(",
"stopped",
")",
"return",
";",
"if",
"(",
"needToUnregister",
")",
"{",
"try",
"{",
"unregisterMBeans",
"(",
"resourceDMBeans",
")",
";",
"needToUnregister",
"=",... | On stop, the mbeans are unregistered. | [
"On",
"stop",
"the",
"mbeans",
"are",
"unregistered",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/jmx/CacheManagerJmxRegistration.java#L57-L69 |
29,482 | infinispan/infinispan | persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/configuration/AbstractJdbcStoreConfigurationBuilder.java | AbstractJdbcStoreConfigurationBuilder.connectionFactory | @Override
public <C extends ConnectionFactoryConfigurationBuilder<?>> C connectionFactory(Class<C> klass) {
if (connectionFactory != null) {
throw new IllegalStateException("A ConnectionFactory has already been configured for this store");
}
try {
Constructor<C> constructor = klas... | java | @Override
public <C extends ConnectionFactoryConfigurationBuilder<?>> C connectionFactory(Class<C> klass) {
if (connectionFactory != null) {
throw new IllegalStateException("A ConnectionFactory has already been configured for this store");
}
try {
Constructor<C> constructor = klas... | [
"@",
"Override",
"public",
"<",
"C",
"extends",
"ConnectionFactoryConfigurationBuilder",
"<",
"?",
">",
">",
"C",
"connectionFactory",
"(",
"Class",
"<",
"C",
">",
"klass",
")",
"{",
"if",
"(",
"connectionFactory",
"!=",
"null",
")",
"{",
"throw",
"new",
"... | Use the specified ConnectionFactory to handle connection to the database | [
"Use",
"the",
"specified",
"ConnectionFactory",
"to",
"handle",
"connection",
"to",
"the",
"database"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/configuration/AbstractJdbcStoreConfigurationBuilder.java#L50-L63 |
29,483 | infinispan/infinispan | core/src/main/java/org/infinispan/interceptors/impl/InvocationContextInterceptor.java | InvocationContextInterceptor.stoppingAndNotAllowed | private boolean stoppingAndNotAllowed(ComponentStatus status, InvocationContext ctx) throws Exception {
return status.isStopping() && (!ctx.isInTxScope() || !isOngoingTransaction(ctx));
} | java | private boolean stoppingAndNotAllowed(ComponentStatus status, InvocationContext ctx) throws Exception {
return status.isStopping() && (!ctx.isInTxScope() || !isOngoingTransaction(ctx));
} | [
"private",
"boolean",
"stoppingAndNotAllowed",
"(",
"ComponentStatus",
"status",
",",
"InvocationContext",
"ctx",
")",
"throws",
"Exception",
"{",
"return",
"status",
".",
"isStopping",
"(",
")",
"&&",
"(",
"!",
"ctx",
".",
"isInTxScope",
"(",
")",
"||",
"!",
... | If the cache is STOPPING, non-transaction invocations, or transactional invocations for transaction others than
the ongoing ones, are no allowed. This method returns true if under this circumstances meet. Otherwise, it returns
false. | [
"If",
"the",
"cache",
"is",
"STOPPING",
"non",
"-",
"transaction",
"invocations",
"or",
"transactional",
"invocations",
"for",
"transaction",
"others",
"than",
"the",
"ongoing",
"ones",
"are",
"no",
"allowed",
".",
"This",
"method",
"returns",
"true",
"if",
"u... | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/impl/InvocationContextInterceptor.java#L164-L166 |
29,484 | infinispan/infinispan | core/src/main/java/org/infinispan/util/concurrent/locks/impl/DefaultPendingLockManager.java | DefaultPendingLockManager.waitForTransactionsToComplete | private KeyValuePair<CacheTransaction, Object> waitForTransactionsToComplete(Collection<PendingTransaction> transactionsToCheck,
long expectedEndTime) throws InterruptedException {
if (transactionsToCheck.isEmpty()) {
return null;
}
... | java | private KeyValuePair<CacheTransaction, Object> waitForTransactionsToComplete(Collection<PendingTransaction> transactionsToCheck,
long expectedEndTime) throws InterruptedException {
if (transactionsToCheck.isEmpty()) {
return null;
}
... | [
"private",
"KeyValuePair",
"<",
"CacheTransaction",
",",
"Object",
">",
"waitForTransactionsToComplete",
"(",
"Collection",
"<",
"PendingTransaction",
">",
"transactionsToCheck",
",",
"long",
"expectedEndTime",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"tra... | cache-tx and key if it timed out, otherwise null | [
"cache",
"-",
"tx",
"and",
"key",
"if",
"it",
"timed",
"out",
"otherwise",
"null"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/util/concurrent/locks/impl/DefaultPendingLockManager.java#L258-L273 |
29,485 | infinispan/infinispan | object-filter/src/main/java/org/infinispan/objectfilter/impl/util/IntervalTree.java | IntervalTree.compareIntervals | private int compareIntervals(Interval<K> i1, Interval<K> i2) {
int res1 = compare(i1.up, i2.low);
if (res1 < 0 || res1 <= 0 && (!i1.includeUpper || !i2.includeLower)) {
return -1;
}
int res2 = compare(i2.up, i1.low);
if (res2 < 0 || res2 <= 0 && (!i2.includeUpper || !i1.includeLow... | java | private int compareIntervals(Interval<K> i1, Interval<K> i2) {
int res1 = compare(i1.up, i2.low);
if (res1 < 0 || res1 <= 0 && (!i1.includeUpper || !i2.includeLower)) {
return -1;
}
int res2 = compare(i2.up, i1.low);
if (res2 < 0 || res2 <= 0 && (!i2.includeUpper || !i1.includeLow... | [
"private",
"int",
"compareIntervals",
"(",
"Interval",
"<",
"K",
">",
"i1",
",",
"Interval",
"<",
"K",
">",
"i2",
")",
"{",
"int",
"res1",
"=",
"compare",
"(",
"i1",
".",
"up",
",",
"i2",
".",
"low",
")",
";",
"if",
"(",
"res1",
"<",
"0",
"||",... | Compare two Intervals.
@return a negative integer, zero, or a positive integer depending if Interval i1 is to the left of i2, overlaps
with it, or is to the right of i2. | [
"Compare",
"two",
"Intervals",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/object-filter/src/main/java/org/infinispan/objectfilter/impl/util/IntervalTree.java#L102-L112 |
29,486 | infinispan/infinispan | object-filter/src/main/java/org/infinispan/objectfilter/impl/util/IntervalTree.java | IntervalTree.remove | public boolean remove(Interval<K> i) {
checkValidInterval(i);
return remove(root.left, i);
} | java | public boolean remove(Interval<K> i) {
checkValidInterval(i);
return remove(root.left, i);
} | [
"public",
"boolean",
"remove",
"(",
"Interval",
"<",
"K",
">",
"i",
")",
"{",
"checkValidInterval",
"(",
"i",
")",
";",
"return",
"remove",
"(",
"root",
".",
"left",
",",
"i",
")",
";",
"}"
] | Removes the Interval.
@param i the interval to remove | [
"Removes",
"the",
"Interval",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/object-filter/src/main/java/org/infinispan/objectfilter/impl/util/IntervalTree.java#L259-L262 |
29,487 | infinispan/infinispan | object-filter/src/main/java/org/infinispan/objectfilter/impl/util/IntervalTree.java | IntervalTree.stab | public List<Node<K, V>> stab(K k) {
Interval<K> i = new Interval<K>(k, true, k, true);
final List<Node<K, V>> nodes = new ArrayList<Node<K, V>>();
findOverlap(root.left, i, new NodeCallback<K, V>() {
@Override
public void handle(Node<K, V> node) {
nodes.add(node);
... | java | public List<Node<K, V>> stab(K k) {
Interval<K> i = new Interval<K>(k, true, k, true);
final List<Node<K, V>> nodes = new ArrayList<Node<K, V>>();
findOverlap(root.left, i, new NodeCallback<K, V>() {
@Override
public void handle(Node<K, V> node) {
nodes.add(node);
... | [
"public",
"List",
"<",
"Node",
"<",
"K",
",",
"V",
">",
">",
"stab",
"(",
"K",
"k",
")",
"{",
"Interval",
"<",
"K",
">",
"i",
"=",
"new",
"Interval",
"<",
"K",
">",
"(",
"k",
",",
"true",
",",
"k",
",",
"true",
")",
";",
"final",
"List",
... | Find all Intervals that contain a given value.
@param k the value to search for
@return a non-null List of intervals that contain the value | [
"Find",
"all",
"Intervals",
"that",
"contain",
"a",
"given",
"value",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/object-filter/src/main/java/org/infinispan/objectfilter/impl/util/IntervalTree.java#L426-L436 |
29,488 | infinispan/infinispan | core/src/main/java/org/infinispan/interceptors/impl/QueueAsyncInvocationStage.java | QueueAsyncInvocationStage.queuePoll | InvocationCallback queuePoll() {
InvocationCallback element;
synchronized (this) {
if (tail != head) {
element = elements[head & mask];
head++;
} else {
element = null;
frozen = true;
}
}
return element;
} | java | InvocationCallback queuePoll() {
InvocationCallback element;
synchronized (this) {
if (tail != head) {
element = elements[head & mask];
head++;
} else {
element = null;
frozen = true;
}
}
return element;
} | [
"InvocationCallback",
"queuePoll",
"(",
")",
"{",
"InvocationCallback",
"element",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"tail",
"!=",
"head",
")",
"{",
"element",
"=",
"elements",
"[",
"head",
"&",
"mask",
"]",
";",
"head",
"++",
";",
... | Remove one handler from the deque, or freeze the deque if there are no more elements.
@return The next handler, or {@code null} if the deque is empty. | [
"Remove",
"one",
"handler",
"from",
"the",
"deque",
"or",
"freeze",
"the",
"deque",
"if",
"there",
"are",
"no",
"more",
"elements",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/impl/QueueAsyncInvocationStage.java#L183-L195 |
29,489 | infinispan/infinispan | cdi/common/src/main/java/org/infinispan/cdi/common/util/BeanManagerProvider.java | BeanManagerProvider.getBeanManagerInfo | private BeanManagerInfo getBeanManagerInfo(ClassLoader cl)
{
BeanManagerInfo bmi = bmpSingleton.bmInfos.get(cl);
if (bmi == null)
{
synchronized (this)
{
bmi = bmpSingleton.bmInfos.get(cl);
if (bmi == null)
{
... | java | private BeanManagerInfo getBeanManagerInfo(ClassLoader cl)
{
BeanManagerInfo bmi = bmpSingleton.bmInfos.get(cl);
if (bmi == null)
{
synchronized (this)
{
bmi = bmpSingleton.bmInfos.get(cl);
if (bmi == null)
{
... | [
"private",
"BeanManagerInfo",
"getBeanManagerInfo",
"(",
"ClassLoader",
"cl",
")",
"{",
"BeanManagerInfo",
"bmi",
"=",
"bmpSingleton",
".",
"bmInfos",
".",
"get",
"(",
"cl",
")",
";",
"if",
"(",
"bmi",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
"... | Get or create the BeanManagerInfo for the given ClassLoader | [
"Get",
"or",
"create",
"the",
"BeanManagerInfo",
"for",
"the",
"given",
"ClassLoader"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cdi/common/src/main/java/org/infinispan/cdi/common/util/BeanManagerProvider.java#L316-L334 |
29,490 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java | StreamSummaryContainer.addGet | public void addGet(Object key, boolean remote) {
if (!isEnabled()) {
return;
}
syncOffer(remote ? Stat.REMOTE_GET : Stat.LOCAL_GET, key);
} | java | public void addGet(Object key, boolean remote) {
if (!isEnabled()) {
return;
}
syncOffer(remote ? Stat.REMOTE_GET : Stat.LOCAL_GET, key);
} | [
"public",
"void",
"addGet",
"(",
"Object",
"key",
",",
"boolean",
"remote",
")",
"{",
"if",
"(",
"!",
"isEnabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"syncOffer",
"(",
"remote",
"?",
"Stat",
".",
"REMOTE_GET",
":",
"Stat",
".",
"LOCAL_GET",
",",... | Adds the key to the read top-key.
@param remote {@code true} if the key is remote, {@code false} otherwise. | [
"Adds",
"the",
"key",
"to",
"the",
"read",
"top",
"-",
"key",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java#L102-L107 |
29,491 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java | StreamSummaryContainer.addPut | public void addPut(Object key, boolean remote) {
if (!isEnabled()) {
return;
}
syncOffer(remote ? Stat.REMOTE_PUT : Stat.LOCAL_PUT, key);
} | java | public void addPut(Object key, boolean remote) {
if (!isEnabled()) {
return;
}
syncOffer(remote ? Stat.REMOTE_PUT : Stat.LOCAL_PUT, key);
} | [
"public",
"void",
"addPut",
"(",
"Object",
"key",
",",
"boolean",
"remote",
")",
"{",
"if",
"(",
"!",
"isEnabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"syncOffer",
"(",
"remote",
"?",
"Stat",
".",
"REMOTE_PUT",
":",
"Stat",
".",
"LOCAL_PUT",
",",... | Adds the key to the put top-key.
@param remote {@code true} if the key is remote, {@code false} otherwise. | [
"Adds",
"the",
"key",
"to",
"the",
"put",
"top",
"-",
"key",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java#L114-L120 |
29,492 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java | StreamSummaryContainer.addLockInformation | public void addLockInformation(Object key, boolean contention, boolean failLock) {
if (!isEnabled()) {
return;
}
syncOffer(Stat.MOST_LOCKED_KEYS, key);
if (contention) {
syncOffer(Stat.MOST_CONTENDED_KEYS, key);
}
if (failLock) {
syncOffer(Stat.MOST_FAILE... | java | public void addLockInformation(Object key, boolean contention, boolean failLock) {
if (!isEnabled()) {
return;
}
syncOffer(Stat.MOST_LOCKED_KEYS, key);
if (contention) {
syncOffer(Stat.MOST_CONTENDED_KEYS, key);
}
if (failLock) {
syncOffer(Stat.MOST_FAILE... | [
"public",
"void",
"addLockInformation",
"(",
"Object",
"key",
",",
"boolean",
"contention",
",",
"boolean",
"failLock",
")",
"{",
"if",
"(",
"!",
"isEnabled",
"(",
")",
")",
"{",
"return",
";",
"}",
"syncOffer",
"(",
"Stat",
".",
"MOST_LOCKED_KEYS",
",",
... | Adds the lock information about the key, namely if the key suffer some contention and if the keys was locked or
not.
@param contention {@code true} if the key was contented.
@param failLock {@code true} if the key was not locked. | [
"Adds",
"the",
"lock",
"information",
"about",
"the",
"key",
"namely",
"if",
"the",
"key",
"suffer",
"some",
"contention",
"and",
"if",
"the",
"keys",
"was",
"locked",
"or",
"not",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java#L129-L142 |
29,493 | infinispan/infinispan | extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java | StreamSummaryContainer.tryFlushAll | public final void tryFlushAll() {
if (flushing.compareAndSet(false, true)) {
if (reset) {
for (Stat stat : Stat.values()) {
topKeyWrapper.get(stat).reset(this, capacity);
}
reset = false;
} else {
for (Stat stat : Stat.values()) {
... | java | public final void tryFlushAll() {
if (flushing.compareAndSet(false, true)) {
if (reset) {
for (Stat stat : Stat.values()) {
topKeyWrapper.get(stat).reset(this, capacity);
}
reset = false;
} else {
for (Stat stat : Stat.values()) {
... | [
"public",
"final",
"void",
"tryFlushAll",
"(",
")",
"{",
"if",
"(",
"flushing",
".",
"compareAndSet",
"(",
"false",
",",
"true",
")",
")",
"{",
"if",
"(",
"reset",
")",
"{",
"for",
"(",
"Stat",
"stat",
":",
"Stat",
".",
"values",
"(",
")",
")",
"... | Tries to flush all the enqueue offers to be visible globally. | [
"Tries",
"to",
"flush",
"all",
"the",
"enqueue",
"offers",
"to",
"be",
"visible",
"globally",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/topK/StreamSummaryContainer.java#L197-L211 |
29,494 | infinispan/infinispan | server/hotrod/src/main/java/org/infinispan/server/hotrod/BaseDecoder.java | BaseDecoder.allocMap | protected <K, V> Map<K, V> allocMap(int size) {
return size == 0 ? Collections.emptyMap() : new HashMap<>(size * 4/3, 0.75f);
} | java | protected <K, V> Map<K, V> allocMap(int size) {
return size == 0 ? Collections.emptyMap() : new HashMap<>(size * 4/3, 0.75f);
} | [
"protected",
"<",
"K",
",",
"V",
">",
"Map",
"<",
"K",
",",
"V",
">",
"allocMap",
"(",
"int",
"size",
")",
"{",
"return",
"size",
"==",
"0",
"?",
"Collections",
".",
"emptyMap",
"(",
")",
":",
"new",
"HashMap",
"<>",
"(",
"size",
"*",
"4",
"/",... | We usually know the size of the map ahead, and we want to return static empty map if we're not going to add anything. | [
"We",
"usually",
"know",
"the",
"size",
"of",
"the",
"map",
"ahead",
"and",
"we",
"want",
"to",
"return",
"static",
"empty",
"map",
"if",
"we",
"re",
"not",
"going",
"to",
"add",
"anything",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/BaseDecoder.java#L100-L102 |
29,495 | infinispan/infinispan | query-dsl/src/main/java/org/infinispan/query/dsl/impl/BaseQuery.java | BaseQuery.validateNamedParameters | public void validateNamedParameters() {
if (namedParameters != null) {
for (Map.Entry<String, Object> e : namedParameters.entrySet()) {
if (e.getValue() == null) {
throw log.queryParameterNotSet(e.getKey());
}
}
}
} | java | public void validateNamedParameters() {
if (namedParameters != null) {
for (Map.Entry<String, Object> e : namedParameters.entrySet()) {
if (e.getValue() == null) {
throw log.queryParameterNotSet(e.getKey());
}
}
}
} | [
"public",
"void",
"validateNamedParameters",
"(",
")",
"{",
"if",
"(",
"namedParameters",
"!=",
"null",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"Object",
">",
"e",
":",
"namedParameters",
".",
"entrySet",
"(",
")",
")",
"{",
"if"... | Ensure all named parameters have non-null values. | [
"Ensure",
"all",
"named",
"parameters",
"have",
"non",
"-",
"null",
"values",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query-dsl/src/main/java/org/infinispan/query/dsl/impl/BaseQuery.java#L163-L171 |
29,496 | infinispan/infinispan | core/src/main/java/org/infinispan/commands/AbstractVisitor.java | AbstractVisitor.visitCollection | public void visitCollection(InvocationContext ctx, Collection<? extends VisitableCommand> toVisit) throws Throwable {
for (VisitableCommand command : toVisit) {
command.acceptVisitor(ctx, this);
}
} | java | public void visitCollection(InvocationContext ctx, Collection<? extends VisitableCommand> toVisit) throws Throwable {
for (VisitableCommand command : toVisit) {
command.acceptVisitor(ctx, this);
}
} | [
"public",
"void",
"visitCollection",
"(",
"InvocationContext",
"ctx",
",",
"Collection",
"<",
"?",
"extends",
"VisitableCommand",
">",
"toVisit",
")",
"throws",
"Throwable",
"{",
"for",
"(",
"VisitableCommand",
"command",
":",
"toVisit",
")",
"{",
"command",
"."... | Helper method to visit a collection of VisitableCommands.
@param ctx Invocation context
@param toVisit collection of commands to visit
@throws Throwable in the event of problems | [
"Helper",
"method",
"to",
"visit",
"a",
"collection",
"of",
"VisitableCommands",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/commands/AbstractVisitor.java#L169-L173 |
29,497 | infinispan/infinispan | remote-query/remote-query-server/src/main/java/org/infinispan/query/remote/impl/indexing/IndexingMetadata.java | IndexingMetadata.isLegacyIndexingEnabled | public static boolean isLegacyIndexingEnabled(Descriptor messageDescriptor) {
boolean isLegacyIndexingEnabled = true;
for (Option o : messageDescriptor.getFileDescriptor().getOptions()) {
if (o.getName().equals(INDEXED_BY_DEFAULT_OPTION)) {
isLegacyIndexingEnabled = Boolean.valueOf((Str... | java | public static boolean isLegacyIndexingEnabled(Descriptor messageDescriptor) {
boolean isLegacyIndexingEnabled = true;
for (Option o : messageDescriptor.getFileDescriptor().getOptions()) {
if (o.getName().equals(INDEXED_BY_DEFAULT_OPTION)) {
isLegacyIndexingEnabled = Boolean.valueOf((Str... | [
"public",
"static",
"boolean",
"isLegacyIndexingEnabled",
"(",
"Descriptor",
"messageDescriptor",
")",
"{",
"boolean",
"isLegacyIndexingEnabled",
"=",
"true",
";",
"for",
"(",
"Option",
"o",
":",
"messageDescriptor",
".",
"getFileDescriptor",
"(",
")",
".",
"getOpti... | Retrieves the value of the 'indexed_by_default' protobuf option from the schema file defining the given
message descriptor. | [
"Retrieves",
"the",
"value",
"of",
"the",
"indexed_by_default",
"protobuf",
"option",
"from",
"the",
"schema",
"file",
"defining",
"the",
"given",
"message",
"descriptor",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/remote-query/remote-query-server/src/main/java/org/infinispan/query/remote/impl/indexing/IndexingMetadata.java#L354-L363 |
29,498 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/util/BeanUtils.java | BeanUtils.getterName | public static String getterName(Class<?> componentClass) {
if (componentClass == null) return null;
StringBuilder sb = new StringBuilder("get");
sb.append(componentClass.getSimpleName());
return sb.toString();
} | java | public static String getterName(Class<?> componentClass) {
if (componentClass == null) return null;
StringBuilder sb = new StringBuilder("get");
sb.append(componentClass.getSimpleName());
return sb.toString();
} | [
"public",
"static",
"String",
"getterName",
"(",
"Class",
"<",
"?",
">",
"componentClass",
")",
"{",
"if",
"(",
"componentClass",
"==",
"null",
")",
"return",
"null",
";",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"\"get\"",
")",
";",
"sb",
... | Returns a getter for a given class
@param componentClass class to find getter for
@return name of getter method | [
"Returns",
"a",
"getter",
"for",
"a",
"given",
"class"
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/BeanUtils.java#L53-L58 |
29,499 | infinispan/infinispan | commons/src/main/java/org/infinispan/commons/util/BeanUtils.java | BeanUtils.getterMethod | public static Method getterMethod(Class<?> target, Class<?> componentClass) {
try {
return target.getMethod(getterName(componentClass));
}
catch (NoSuchMethodException e) {
//if (log.isTraceEnabled()) log.trace("Unable to find method " + getterName(componentClass) + " in class " + ta... | java | public static Method getterMethod(Class<?> target, Class<?> componentClass) {
try {
return target.getMethod(getterName(componentClass));
}
catch (NoSuchMethodException e) {
//if (log.isTraceEnabled()) log.trace("Unable to find method " + getterName(componentClass) + " in class " + ta... | [
"public",
"static",
"Method",
"getterMethod",
"(",
"Class",
"<",
"?",
">",
"target",
",",
"Class",
"<",
"?",
">",
"componentClass",
")",
"{",
"try",
"{",
"return",
"target",
".",
"getMethod",
"(",
"getterName",
"(",
"componentClass",
")",
")",
";",
"}",
... | Returns a Method object corresponding to a getter that retrieves an instance of componentClass from target.
@param target class that the getter should exist on
@param componentClass component to get
@return Method object, or null of one does not exist | [
"Returns",
"a",
"Method",
"object",
"corresponding",
"to",
"a",
"getter",
"that",
"retrieves",
"an",
"instance",
"of",
"componentClass",
"from",
"target",
"."
] | 7c62b94886c3febb4774ae8376acf2baa0265ab5 | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/BeanUtils.java#L81-L92 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.