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,500
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/BeanUtils.java
BeanUtils.setterMethod
public static Method setterMethod(Class<?> target, Class<?> componentClass) { try { return target.getMethod(setterName(componentClass), componentClass); } catch (NoSuchMethodException e) { //if (log.isTraceEnabled()) log.trace("Unable to find method " + setterName(componentClass) + "...
java
public static Method setterMethod(Class<?> target, Class<?> componentClass) { try { return target.getMethod(setterName(componentClass), componentClass); } catch (NoSuchMethodException e) { //if (log.isTraceEnabled()) log.trace("Unable to find method " + setterName(componentClass) + "...
[ "public", "static", "Method", "setterMethod", "(", "Class", "<", "?", ">", "target", ",", "Class", "<", "?", ">", "componentClass", ")", "{", "try", "{", "return", "target", ".", "getMethod", "(", "setterName", "(", "componentClass", ")", ",", "componentCl...
Returns a Method object corresponding to a setter that sets an instance of componentClass from target. @param target class that the setter should exist on @param componentClass component to set @return Method object, or null of one does not exist
[ "Returns", "a", "Method", "object", "corresponding", "to", "a", "setter", "that", "sets", "an", "instance", "of", "componentClass", "from", "target", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/BeanUtils.java#L101-L112
29,501
infinispan/infinispan
server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheAdd.java
CacheAdd.extractIndexingProperties
private Properties extractIndexingProperties(OperationContext context, ModelNode operation, String cacheConfiguration) { Properties properties = new Properties(); PathAddress cacheAddress = getCacheAddressFromOperation(operation); Resource cacheConfigResource = context.readResourceFromRoot(cache...
java
private Properties extractIndexingProperties(OperationContext context, ModelNode operation, String cacheConfiguration) { Properties properties = new Properties(); PathAddress cacheAddress = getCacheAddressFromOperation(operation); Resource cacheConfigResource = context.readResourceFromRoot(cache...
[ "private", "Properties", "extractIndexingProperties", "(", "OperationContext", "context", ",", "ModelNode", "operation", ",", "String", "cacheConfiguration", ")", "{", "Properties", "properties", "=", "new", "Properties", "(", ")", ";", "PathAddress", "cacheAddress", ...
Extract indexing information for the cache from the model. @return a {@link Properties} with the indexing properties or empty if the cache is not indexed
[ "Extract", "indexing", "information", "for", "the", "cache", "from", "the", "model", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheAdd.java#L115-L140
29,502
infinispan/infinispan
server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheAdd.java
CacheAdd.populate
void populate(ModelNode fromModel, ModelNode toModel) throws OperationFailedException { for(AttributeDefinition attr : CacheResource.CACHE_ATTRIBUTES) { attr.validateAndSet(fromModel, toModel); } }
java
void populate(ModelNode fromModel, ModelNode toModel) throws OperationFailedException { for(AttributeDefinition attr : CacheResource.CACHE_ATTRIBUTES) { attr.validateAndSet(fromModel, toModel); } }
[ "void", "populate", "(", "ModelNode", "fromModel", ",", "ModelNode", "toModel", ")", "throws", "OperationFailedException", "{", "for", "(", "AttributeDefinition", "attr", ":", "CacheResource", ".", "CACHE_ATTRIBUTES", ")", "{", "attr", ".", "validateAndSet", "(", ...
Transfer elements common to both operations and models @param fromModel @param toModel
[ "Transfer", "elements", "common", "to", "both", "operations", "and", "models" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheAdd.java#L270-L274
29,503
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/ReflectionUtil.java
ReflectionUtil.getAllMethodsShallow
public static List<Method> getAllMethodsShallow(Class<?> c, Class<? extends Annotation> annotationType) { List<Method> annotated = new ArrayList<>(); for (Method m : c.getDeclaredMethods()) { if (m.isAnnotationPresent(annotationType)) annotated.add(m); } return annotated; ...
java
public static List<Method> getAllMethodsShallow(Class<?> c, Class<? extends Annotation> annotationType) { List<Method> annotated = new ArrayList<>(); for (Method m : c.getDeclaredMethods()) { if (m.isAnnotationPresent(annotationType)) annotated.add(m); } return annotated; ...
[ "public", "static", "List", "<", "Method", ">", "getAllMethodsShallow", "(", "Class", "<", "?", ">", "c", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotationType", ")", "{", "List", "<", "Method", ">", "annotated", "=", "new", "ArrayList", ...
Returns a set of Methods that contain the given method annotation. This includes all public, protected, package and private methods, but not those of superclasses and interfaces. @param c class to inspect @param annotationType the type of annotation to look for @return List of Method objects that require...
[ "Returns", "a", "set", "of", "Methods", "that", "contain", "the", "given", "method", "annotation", ".", "This", "includes", "all", "public", "protected", "package", "and", "private", "methods", "but", "not", "those", "of", "superclasses", "and", "interfaces", ...
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/ReflectionUtil.java#L55-L63
29,504
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/ReflectionUtil.java
ReflectionUtil.notFound
private static boolean notFound(Method m, Collection<Method> s) { for (Method found : s) { if (m.getName().equals(found.getName()) && Arrays.equals(m.getParameterTypes(), found.getParameterTypes())) return false; } return true; }
java
private static boolean notFound(Method m, Collection<Method> s) { for (Method found : s) { if (m.getName().equals(found.getName()) && Arrays.equals(m.getParameterTypes(), found.getParameterTypes())) return false; } return true; }
[ "private", "static", "boolean", "notFound", "(", "Method", "m", ",", "Collection", "<", "Method", ">", "s", ")", "{", "for", "(", "Method", "found", ":", "s", ")", "{", "if", "(", "m", ".", "getName", "(", ")", ".", "equals", "(", "found", ".", "...
Tests whether a method has already been found, i.e., overridden. @param m method to inspect @param s collection of methods found @return true a method with the same signature already exists.
[ "Tests", "whether", "a", "method", "has", "already", "been", "found", "i", ".", "e", ".", "overridden", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/ReflectionUtil.java#L154-L161
29,505
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/ReflectionUtil.java
ReflectionUtil.getValue
public static Object getValue(Object instance, String fieldName) { Field f = findFieldRecursively(instance.getClass(), fieldName); if (f == null) throw new CacheException("Could not find field named '" + fieldName + "' on instance " + instance); try { f.setAccessible(true); return f....
java
public static Object getValue(Object instance, String fieldName) { Field f = findFieldRecursively(instance.getClass(), fieldName); if (f == null) throw new CacheException("Could not find field named '" + fieldName + "' on instance " + instance); try { f.setAccessible(true); return f....
[ "public", "static", "Object", "getValue", "(", "Object", "instance", ",", "String", "fieldName", ")", "{", "Field", "f", "=", "findFieldRecursively", "(", "instance", ".", "getClass", "(", ")", ",", "fieldName", ")", ";", "if", "(", "f", "==", "null", ")...
Retrieves the value of a field of an object instance via reflection @param instance to inspect @param fieldName name of field to retrieve @return a value
[ "Retrieves", "the", "value", "of", "a", "field", "of", "an", "object", "instance", "via", "reflection" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/ReflectionUtil.java#L272-L281
29,506
infinispan/infinispan
query/src/main/java/org/infinispan/query/indexmanager/IndexManagerBasedLockController.java
IndexManagerBasedLockController.waitForAvailabilityInternal
private boolean waitForAvailabilityInternal() { final Directory directory = indexManager.getDirectoryProvider().getDirectory(); try { Lock lock = directory.obtainLock(IndexWriter.WRITE_LOCK_NAME); lock.close(); return true; } catch (LockObtainFailedException lofe) { ...
java
private boolean waitForAvailabilityInternal() { final Directory directory = indexManager.getDirectoryProvider().getDirectory(); try { Lock lock = directory.obtainLock(IndexWriter.WRITE_LOCK_NAME); lock.close(); return true; } catch (LockObtainFailedException lofe) { ...
[ "private", "boolean", "waitForAvailabilityInternal", "(", ")", "{", "final", "Directory", "directory", "=", "indexManager", ".", "getDirectoryProvider", "(", ")", ".", "getDirectory", "(", ")", ";", "try", "{", "Lock", "lock", "=", "directory", ".", "obtainLock"...
This is returning as soon as the lock is available, or after 10 seconds. @return true if the lock is free at the time of returning.
[ "This", "is", "returning", "as", "soon", "as", "the", "lock", "is", "available", "or", "after", "10", "seconds", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/indexmanager/IndexManagerBasedLockController.java#L56-L68
29,507
infinispan/infinispan
lock/src/main/java/org/infinispan/lock/impl/lock/RequestExpirationScheduler.java
RequestExpirationScheduler.scheduleForCompletion
public void scheduleForCompletion(String requestId, CompletableFuture<Boolean> request, long time, TimeUnit unit) { if (request.isDone()) { if (trace) { log.tracef("Request[%s] is not scheduled because is already done", requestId); } return; } if (scheduledReque...
java
public void scheduleForCompletion(String requestId, CompletableFuture<Boolean> request, long time, TimeUnit unit) { if (request.isDone()) { if (trace) { log.tracef("Request[%s] is not scheduled because is already done", requestId); } return; } if (scheduledReque...
[ "public", "void", "scheduleForCompletion", "(", "String", "requestId", ",", "CompletableFuture", "<", "Boolean", ">", "request", ",", "long", "time", ",", "TimeUnit", "unit", ")", "{", "if", "(", "request", ".", "isDone", "(", ")", ")", "{", "if", "(", "...
Schedules a request for completion @param requestId, the unique identifier if the request @param request, the request @param time, time expressed in long @param unit, {@link TimeUnit}
[ "Schedules", "a", "request", "for", "completion" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lock/src/main/java/org/infinispan/lock/impl/lock/RequestExpirationScheduler.java#L58-L82
29,508
infinispan/infinispan
lock/src/main/java/org/infinispan/lock/impl/lock/RequestExpirationScheduler.java
RequestExpirationScheduler.abortScheduling
public void abortScheduling(String requestId, boolean force) { if (trace) { log.tracef("Request[%s] abort scheduling", requestId); } ScheduledRequest scheduledRequest = scheduledRequests.get(requestId); if (scheduledRequest != null && (scheduledRequest.request.isDone() || force)) { ...
java
public void abortScheduling(String requestId, boolean force) { if (trace) { log.tracef("Request[%s] abort scheduling", requestId); } ScheduledRequest scheduledRequest = scheduledRequests.get(requestId); if (scheduledRequest != null && (scheduledRequest.request.isDone() || force)) { ...
[ "public", "void", "abortScheduling", "(", "String", "requestId", ",", "boolean", "force", ")", "{", "if", "(", "trace", ")", "{", "log", ".", "tracef", "(", "\"Request[%s] abort scheduling\"", ",", "requestId", ")", ";", "}", "ScheduledRequest", "scheduledReques...
Aborts the scheduled request. If force is true, it will abort even if the request is not completed @param requestId, unique identifier of the request @param force, force abort
[ "Aborts", "the", "scheduled", "request", ".", "If", "force", "is", "true", "it", "will", "abort", "even", "if", "the", "request", "is", "not", "completed" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lock/src/main/java/org/infinispan/lock/impl/lock/RequestExpirationScheduler.java#L99-L108
29,509
infinispan/infinispan
tasks/api/src/main/java/org/infinispan/tasks/TaskContext.java
TaskContext.addParameter
public TaskContext addParameter(String name, Object value) { Map<String, Object> params = (Map<String, Object>) parameters.orElseGet(HashMap::new); params.put(name, value); return parameters(params); }
java
public TaskContext addParameter(String name, Object value) { Map<String, Object> params = (Map<String, Object>) parameters.orElseGet(HashMap::new); params.put(name, value); return parameters(params); }
[ "public", "TaskContext", "addParameter", "(", "String", "name", ",", "Object", "value", ")", "{", "Map", "<", "String", ",", "Object", ">", "params", "=", "(", "Map", "<", "String", ",", "Object", ">", ")", "parameters", ".", "orElseGet", "(", "HashMap",...
Adds a named parameter to the task context
[ "Adds", "a", "named", "parameter", "to", "the", "task", "context" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/tasks/api/src/main/java/org/infinispan/tasks/TaskContext.java#L78-L83
29,510
infinispan/infinispan
core/src/main/java/org/infinispan/container/impl/L1SegmentedDataContainer.java
L1SegmentedDataContainer.clear
@Override public void clear(IntSet segments) { IntSet extraSegments = null; PrimitiveIterator.OfInt iter = segments.iterator(); // First try to just clear the respective maps while (iter.hasNext()) { int segment = iter.nextInt(); ConcurrentMap<K, InternalCacheEntry<K, V>> ma...
java
@Override public void clear(IntSet segments) { IntSet extraSegments = null; PrimitiveIterator.OfInt iter = segments.iterator(); // First try to just clear the respective maps while (iter.hasNext()) { int segment = iter.nextInt(); ConcurrentMap<K, InternalCacheEntry<K, V>> ma...
[ "@", "Override", "public", "void", "clear", "(", "IntSet", "segments", ")", "{", "IntSet", "extraSegments", "=", "null", ";", "PrimitiveIterator", ".", "OfInt", "iter", "=", "segments", ".", "iterator", "(", ")", ";", "// First try to just clear the respective map...
Removes all entries that map to the given segments @param segments the segments to clear data for
[ "Removes", "all", "entries", "that", "map", "to", "the", "given", "segments" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/container/impl/L1SegmentedDataContainer.java#L145-L169
29,511
infinispan/infinispan
query/src/main/java/org/infinispan/query/backend/QueryKnownClasses.java
QueryKnownClasses.startInternalCache
private void startInternalCache() { if (knownClassesCache == null) { synchronized (this) { if (knownClassesCache == null) { internalCacheRegistry.registerInternalCache(QUERY_KNOWN_CLASSES_CACHE_NAME, getInternalCacheConfig(), EnumSet.of(InternalCacheRegistry.Flag.PERSISTENT)); ...
java
private void startInternalCache() { if (knownClassesCache == null) { synchronized (this) { if (knownClassesCache == null) { internalCacheRegistry.registerInternalCache(QUERY_KNOWN_CLASSES_CACHE_NAME, getInternalCacheConfig(), EnumSet.of(InternalCacheRegistry.Flag.PERSISTENT)); ...
[ "private", "void", "startInternalCache", "(", ")", "{", "if", "(", "knownClassesCache", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "knownClassesCache", "==", "null", ")", "{", "internalCacheRegistry", ".", "registerInternalCache", ...
Start the internal cache lazily.
[ "Start", "the", "internal", "cache", "lazily", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/backend/QueryKnownClasses.java#L206-L217
29,512
infinispan/infinispan
query/src/main/java/org/infinispan/query/backend/QueryKnownClasses.java
QueryKnownClasses.getInternalCacheConfig
private Configuration getInternalCacheConfig() { ConfigurationBuilder configurationBuilder = new ConfigurationBuilder(); // allow the registry to work for local caches as well as clustered caches CacheMode cacheMode = cacheManager.getGlobalComponentRegistry().getGlobalConfiguration().isClustered() ...
java
private Configuration getInternalCacheConfig() { ConfigurationBuilder configurationBuilder = new ConfigurationBuilder(); // allow the registry to work for local caches as well as clustered caches CacheMode cacheMode = cacheManager.getGlobalComponentRegistry().getGlobalConfiguration().isClustered() ...
[ "private", "Configuration", "getInternalCacheConfig", "(", ")", "{", "ConfigurationBuilder", "configurationBuilder", "=", "new", "ConfigurationBuilder", "(", ")", ";", "// allow the registry to work for local caches as well as clustered caches", "CacheMode", "cacheMode", "=", "ca...
Create the configuration for the internal cache.
[ "Create", "the", "configuration", "for", "the", "internal", "cache", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/backend/QueryKnownClasses.java#L222-L236
29,513
infinispan/infinispan
server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheCommands.java
CacheCommands.execute
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); ListIterator<PathElement> iterator = address.iterator(); PathElement element = iterator.next(); ...
java
@Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.require(OP_ADDR)); ListIterator<PathElement> iterator = address.iterator(); PathElement element = iterator.next(); ...
[ "@", "Override", "public", "void", "execute", "(", "OperationContext", "context", ",", "ModelNode", "operation", ")", "throws", "OperationFailedException", "{", "final", "PathAddress", "address", "=", "PathAddress", ".", "pathAddress", "(", "operation", ".", "requir...
An attribute write handler which performs cache operations @param context the operation context @param operation the operation being executed @throws org.jboss.as.controller.OperationFailedException
[ "An", "attribute", "write", "handler", "which", "performs", "cache", "operations" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheCommands.java#L75-L99
29,514
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java
DummyTransaction.commit
@Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException { if (trace) { log.tracef("Transaction.commit() invoked in transaction with Xid=%s", xid); } if (isDone()) { throw new IllegalStateExcep...
java
@Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException { if (trace) { log.tracef("Transaction.commit() invoked in transaction with Xid=%s", xid); } if (isDone()) { throw new IllegalStateExcep...
[ "@", "Override", "public", "void", "commit", "(", ")", "throws", "RollbackException", ",", "HeuristicMixedException", ",", "HeuristicRollbackException", ",", "SecurityException", ",", "SystemException", "{", "if", "(", "trace", ")", "{", "log", ".", "tracef", "(",...
Attempt to commit this transaction. @throws RollbackException If the transaction was marked for rollback only, the transaction is rolled back and this exception is thrown. @throws SystemException If the transaction service fails in an unexpected way. @throws HeuristicMixedException If a heuristi...
[ "Attempt", "to", "commit", "this", "transaction", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java#L104-L114
29,515
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java
DummyTransaction.rollback
@Override public void rollback() throws IllegalStateException, SystemException { if (trace) { log.tracef("Transaction.rollback() invoked in transaction with Xid=%s", xid); } if (isDone()) { throw new IllegalStateException("Transaction is done. Cannot rollback transaction"); ...
java
@Override public void rollback() throws IllegalStateException, SystemException { if (trace) { log.tracef("Transaction.rollback() invoked in transaction with Xid=%s", xid); } if (isDone()) { throw new IllegalStateException("Transaction is done. Cannot rollback transaction"); ...
[ "@", "Override", "public", "void", "rollback", "(", ")", "throws", "IllegalStateException", ",", "SystemException", "{", "if", "(", "trace", ")", "{", "log", ".", "tracef", "(", "\"Transaction.rollback() invoked in transaction with Xid=%s\"", ",", "xid", ")", ";", ...
Rolls back this transaction. @throws IllegalStateException If the transaction is in a state where it cannot be rolled back. This could be because the transaction is no longer active, or because it is in the {@link Status#STATUS_PREPARED prepared state}. @throws SystemException If the transaction service fails in...
[ "Rolls", "back", "this", "transaction", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java#L124-L147
29,516
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java
DummyTransaction.setRollbackOnly
@Override public void setRollbackOnly() throws IllegalStateException, SystemException { if (trace) { log.tracef("Transaction.setRollbackOnly() invoked in transaction with Xid=%s", xid); } if (isDone()) { throw new IllegalStateException("Transaction is done. Cannot change status");...
java
@Override public void setRollbackOnly() throws IllegalStateException, SystemException { if (trace) { log.tracef("Transaction.setRollbackOnly() invoked in transaction with Xid=%s", xid); } if (isDone()) { throw new IllegalStateException("Transaction is done. Cannot change status");...
[ "@", "Override", "public", "void", "setRollbackOnly", "(", ")", "throws", "IllegalStateException", ",", "SystemException", "{", "if", "(", "trace", ")", "{", "log", ".", "tracef", "(", "\"Transaction.setRollbackOnly() invoked in transaction with Xid=%s\"", ",", "xid", ...
Mark the transaction so that the only possible outcome is a rollback. @throws IllegalStateException If the transaction is not in an active state. @throws SystemException If the transaction service fails in an unexpected way.
[ "Mark", "the", "transaction", "so", "that", "the", "only", "possible", "outcome", "is", "a", "rollback", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java#L155-L164
29,517
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java
DummyTransaction.enlistResource
@Override public boolean enlistResource(XAResource resource) throws RollbackException, IllegalStateException, SystemException { if (trace) { log.tracef("Transaction.enlistResource(%s) invoked in transaction with Xid=%s", resource, xid); } checkStatusBeforeRegister("resource"); //avo...
java
@Override public boolean enlistResource(XAResource resource) throws RollbackException, IllegalStateException, SystemException { if (trace) { log.tracef("Transaction.enlistResource(%s) invoked in transaction with Xid=%s", resource, xid); } checkStatusBeforeRegister("resource"); //avo...
[ "@", "Override", "public", "boolean", "enlistResource", "(", "XAResource", "resource", ")", "throws", "RollbackException", ",", "IllegalStateException", ",", "SystemException", "{", "if", "(", "trace", ")", "{", "log", ".", "tracef", "(", "\"Transaction.enlistResour...
Enlist an XA resource with this transaction. @return <code>true</code> if the resource could be enlisted with this transaction, otherwise <code>false</code>. @throws RollbackException If the transaction is marked for rollback only. @throws IllegalStateException If the transaction is in a state where resources cann...
[ "Enlist", "an", "XA", "resource", "with", "this", "transaction", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java#L187-L224
29,518
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java
DummyTransaction.runCommit
public void runCommit(boolean forceRollback) throws HeuristicMixedException, HeuristicRollbackException, RollbackException { if (trace) { log.tracef("runCommit(forceRollback=%b) invoked in transaction with Xid=%s", forceRollback, xid); } if (forceRollback) { markRollbackOnly(new Roll...
java
public void runCommit(boolean forceRollback) throws HeuristicMixedException, HeuristicRollbackException, RollbackException { if (trace) { log.tracef("runCommit(forceRollback=%b) invoked in transaction with Xid=%s", forceRollback, xid); } if (forceRollback) { markRollbackOnly(new Roll...
[ "public", "void", "runCommit", "(", "boolean", "forceRollback", ")", "throws", "HeuristicMixedException", ",", "HeuristicRollbackException", ",", "RollbackException", "{", "if", "(", "trace", ")", "{", "log", ".", "tracef", "(", "\"runCommit(forceRollback=%b) invoked in...
Runs the second phase of two-phase-commit protocol. If {@code forceRollback} is {@code true}, then a {@link RollbackException} is thrown with the message {@link #FORCE_ROLLBACK_MESSAGE}. @param forceRollback force the transaction to rollback.
[ "Runs", "the", "second", "phase", "of", "two", "-", "phase", "-", "commit", "protocol", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/tm/DummyTransaction.java#L314-L337
29,519
infinispan/infinispan
lucene/lucene-directory/src/main/java/org/infinispan/lucene/LuceneKey2StringMapper.java
LuceneKey2StringMapper.getKeyMapping
@Override public Object getKeyMapping(String key) { if (key == null) { throw new IllegalArgumentException("Not supporting null keys"); } // ChunkCacheKey: "C|" + fileName + "|" + chunkId + "|" + bufferSize "|" + indexName + "|" + affinitySegmentId; // FileCacheKey : "M|" + fileName ...
java
@Override public Object getKeyMapping(String key) { if (key == null) { throw new IllegalArgumentException("Not supporting null keys"); } // ChunkCacheKey: "C|" + fileName + "|" + chunkId + "|" + bufferSize "|" + indexName + "|" + affinitySegmentId; // FileCacheKey : "M|" + fileName ...
[ "@", "Override", "public", "Object", "getKeyMapping", "(", "String", "key", ")", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Not supporting null keys\"", ")", ";", "}", "// ChunkCacheKey: \"C|\" + fileName + \"|...
This method has to perform the inverse transformation of the keys used in the Lucene Directory from String to object. So this implementation is strongly coupled to the toString method of each key type. @see ChunkCacheKey#toString() @see FileCacheKey#toString() @see FileListCacheKey#toString() @see FileReadLockKey#toSt...
[ "This", "method", "has", "to", "perform", "the", "inverse", "transformation", "of", "the", "keys", "used", "in", "the", "Lucene", "Directory", "from", "String", "to", "object", ".", "So", "this", "implementation", "is", "strongly", "coupled", "to", "the", "t...
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/lucene-directory/src/main/java/org/infinispan/lucene/LuceneKey2StringMapper.java#L52-L97
29,520
infinispan/infinispan
hibernate/cache-v51/src/main/java/org/infinispan/hibernate/cache/v51/impl/BaseRegion.java
BaseRegion.suspend
public Transaction suspend() { Transaction tx = null; try { if ( tm != null ) { tx = tm.suspend(); } } catch (SystemException se) { throw log.cannotSuspendTx(se); } return tx; }
java
public Transaction suspend() { Transaction tx = null; try { if ( tm != null ) { tx = tm.suspend(); } } catch (SystemException se) { throw log.cannotSuspendTx(se); } return tx; }
[ "public", "Transaction", "suspend", "(", ")", "{", "Transaction", "tx", "=", "null", ";", "try", "{", "if", "(", "tm", "!=", "null", ")", "{", "tx", "=", "tm", ".", "suspend", "(", ")", ";", "}", "}", "catch", "(", "SystemException", "se", ")", "...
Tell the TransactionManager to suspend any ongoing transaction. @return the transaction that was suspended, or <code>null</code> if there wasn't one
[ "Tell", "the", "TransactionManager", "to", "suspend", "any", "ongoing", "transaction", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/hibernate/cache-v51/src/main/java/org/infinispan/hibernate/cache/v51/impl/BaseRegion.java#L168-L179
29,521
infinispan/infinispan
hibernate/cache-v51/src/main/java/org/infinispan/hibernate/cache/v51/impl/BaseRegion.java
BaseRegion.resume
public void resume(Transaction tx) { try { if ( tx != null ) { tm.resume( tx ); } } catch (Exception e) { throw log.cannotResumeTx( e ); } }
java
public void resume(Transaction tx) { try { if ( tx != null ) { tm.resume( tx ); } } catch (Exception e) { throw log.cannotResumeTx( e ); } }
[ "public", "void", "resume", "(", "Transaction", "tx", ")", "{", "try", "{", "if", "(", "tx", "!=", "null", ")", "{", "tm", ".", "resume", "(", "tx", ")", ";", "}", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "log", ".", "cannotResumeT...
Tell the TransactionManager to resume the given transaction @param tx the transaction to suspend. May be <code>null</code>.
[ "Tell", "the", "TransactionManager", "to", "resume", "the", "given", "transaction" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/hibernate/cache-v51/src/main/java/org/infinispan/hibernate/cache/v51/impl/BaseRegion.java#L186-L195
29,522
infinispan/infinispan
server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/AddAliasCommand.java
AddAliasCommand.addNewAliasToList
private ModelNode addNewAliasToList(ModelNode list, String alias) { // check for empty string if (alias == null || alias.equals("")) return list ; // check for undefined list (AS7-3476) if (!list.isDefined()) { list.setEmptyList(); } ModelNode n...
java
private ModelNode addNewAliasToList(ModelNode list, String alias) { // check for empty string if (alias == null || alias.equals("")) return list ; // check for undefined list (AS7-3476) if (!list.isDefined()) { list.setEmptyList(); } ModelNode n...
[ "private", "ModelNode", "addNewAliasToList", "(", "ModelNode", "list", ",", "String", "alias", ")", "{", "// check for empty string", "if", "(", "alias", "==", "null", "||", "alias", ".", "equals", "(", "\"\"", ")", ")", "return", "list", ";", "// check for un...
Adds new alias to a LIST ModelNode of existing aliases. @param list LIST ModelNode of aliases @param alias @return LIST ModelNode with the added aliases
[ "Adds", "new", "alias", "to", "a", "LIST", "ModelNode", "of", "existing", "aliases", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/AddAliasCommand.java#L97-L121
29,523
infinispan/infinispan
query/src/main/java/org/infinispan/query/impl/ComponentRegistryUtils.java
ComponentRegistryUtils.getQueryCache
public static QueryCache getQueryCache(Cache<?, ?> cache) { return SecurityActions.getCacheGlobalComponentRegistry(cache.getAdvancedCache()).getComponent(QueryCache.class); }
java
public static QueryCache getQueryCache(Cache<?, ?> cache) { return SecurityActions.getCacheGlobalComponentRegistry(cache.getAdvancedCache()).getComponent(QueryCache.class); }
[ "public", "static", "QueryCache", "getQueryCache", "(", "Cache", "<", "?", ",", "?", ">", "cache", ")", "{", "return", "SecurityActions", ".", "getCacheGlobalComponentRegistry", "(", "cache", ".", "getAdvancedCache", "(", ")", ")", ".", "getComponent", "(", "Q...
Returns the optional QueryCache.
[ "Returns", "the", "optional", "QueryCache", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/impl/ComponentRegistryUtils.java#L66-L68
29,524
infinispan/infinispan
object-filter/src/main/java/org/infinispan/objectfilter/impl/predicateindex/AttributeNode.java
AttributeNode.addChild
public AttributeNode<AttributeMetadata, AttributeId> addChild(AttributeId attribute) { AttributeNode<AttributeMetadata, AttributeId> child; if (children == null) { children = new HashMap<>(); child = new AttributeNode<>(attribute, this); children.put(attribute, child); re...
java
public AttributeNode<AttributeMetadata, AttributeId> addChild(AttributeId attribute) { AttributeNode<AttributeMetadata, AttributeId> child; if (children == null) { children = new HashMap<>(); child = new AttributeNode<>(attribute, this); children.put(attribute, child); re...
[ "public", "AttributeNode", "<", "AttributeMetadata", ",", "AttributeId", ">", "addChild", "(", "AttributeId", "attribute", ")", "{", "AttributeNode", "<", "AttributeMetadata", ",", "AttributeId", ">", "child", ";", "if", "(", "children", "==", "null", ")", "{", ...
Add a child node. If the child already exists it just increments its usage counter and returns the existing child. @param attribute @return the added or existing child
[ "Add", "a", "child", "node", ".", "If", "the", "child", "already", "exists", "it", "just", "increments", "its", "usage", "counter", "and", "returns", "the", "existing", "child", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/object-filter/src/main/java/org/infinispan/objectfilter/impl/predicateindex/AttributeNode.java#L125-L141
29,525
infinispan/infinispan
object-filter/src/main/java/org/infinispan/objectfilter/impl/predicateindex/AttributeNode.java
AttributeNode.removeChild
public void removeChild(AttributeId attribute) { if (children == null) { throw new IllegalArgumentException("No child found : " + attribute); } AttributeNode<AttributeMetadata, AttributeId> child = children.get(attribute); if (child == null) { throw new IllegalArgumentException...
java
public void removeChild(AttributeId attribute) { if (children == null) { throw new IllegalArgumentException("No child found : " + attribute); } AttributeNode<AttributeMetadata, AttributeId> child = children.get(attribute); if (child == null) { throw new IllegalArgumentException...
[ "public", "void", "removeChild", "(", "AttributeId", "attribute", ")", "{", "if", "(", "children", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"No child found : \"", "+", "attribute", ")", ";", "}", "AttributeNode", "<", "Attribute...
Decrement the usage counter of a child node and remove it if no usages remain. The removal works recursively up the path to the root. @param attribute the attribute of the child to be removed
[ "Decrement", "the", "usage", "counter", "of", "a", "child", "node", "and", "remove", "it", "if", "no", "usages", "remain", ".", "The", "removal", "works", "recursively", "up", "the", "path", "to", "the", "root", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/object-filter/src/main/java/org/infinispan/objectfilter/impl/predicateindex/AttributeNode.java#L149-L159
29,526
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java
TotalOrderManager.ensureOrder
public final void ensureOrder(TotalOrderRemoteTransactionState state, Collection<?> keysModified) throws InterruptedException { //the retries due to state transfer re-uses the same state. we need that the keys previous locked to be release //in order to insert it again in the keys locked. //NOTE: this...
java
public final void ensureOrder(TotalOrderRemoteTransactionState state, Collection<?> keysModified) throws InterruptedException { //the retries due to state transfer re-uses the same state. we need that the keys previous locked to be release //in order to insert it again in the keys locked. //NOTE: this...
[ "public", "final", "void", "ensureOrder", "(", "TotalOrderRemoteTransactionState", "state", ",", "Collection", "<", "?", ">", "keysModified", ")", "throws", "InterruptedException", "{", "//the retries due to state transfer re-uses the same state. we need that the keys previous lock...
It ensures the validation order for the transaction corresponding to the prepare command. This allow the prepare command to be moved to a thread pool. @param state the total order prepare state
[ "It", "ensures", "the", "validation", "order", "for", "the", "transaction", "corresponding", "to", "the", "prepare", "command", ".", "This", "allow", "the", "prepare", "command", "to", "be", "moved", "to", "a", "thread", "pool", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java#L65-L93
29,527
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java
TotalOrderManager.release
public final void release(TotalOrderRemoteTransactionState state) { TotalOrderLatch synchronizedBlock = state.getTransactionSynchronizedBlock(); if (synchronizedBlock == null) { //already released! return; } Collection<Object> lockedKeys = state.getLockedKeys(); synchroni...
java
public final void release(TotalOrderRemoteTransactionState state) { TotalOrderLatch synchronizedBlock = state.getTransactionSynchronizedBlock(); if (synchronizedBlock == null) { //already released! return; } Collection<Object> lockedKeys = state.getLockedKeys(); synchroni...
[ "public", "final", "void", "release", "(", "TotalOrderRemoteTransactionState", "state", ")", "{", "TotalOrderLatch", "synchronizedBlock", "=", "state", ".", "getTransactionSynchronizedBlock", "(", ")", ";", "if", "(", "synchronizedBlock", "==", "null", ")", "{", "//...
Release the locked key possibly unblock waiting prepares. @param state the state
[ "Release", "the", "locked", "key", "possibly", "unblock", "waiting", "prepares", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java#L100-L115
29,528
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java
TotalOrderManager.notifyStateTransferStart
public final Collection<TotalOrderLatch> notifyStateTransferStart(int topologyId, boolean isRebalance) { if (stateTransferInProgress.get() != null) { return Collections.emptyList(); } List<TotalOrderLatch> preparingTransactions = new ArrayList<>(keysLocked.size()); preparingTransactions...
java
public final Collection<TotalOrderLatch> notifyStateTransferStart(int topologyId, boolean isRebalance) { if (stateTransferInProgress.get() != null) { return Collections.emptyList(); } List<TotalOrderLatch> preparingTransactions = new ArrayList<>(keysLocked.size()); preparingTransactions...
[ "public", "final", "Collection", "<", "TotalOrderLatch", ">", "notifyStateTransferStart", "(", "int", "topologyId", ",", "boolean", "isRebalance", ")", "{", "if", "(", "stateTransferInProgress", ".", "get", "(", ")", "!=", "null", ")", "{", "return", "Collection...
It notifies that a state transfer is about to start. @param topologyId the new topology ID @return the current pending prepares
[ "It", "notifies", "that", "a", "state", "transfer", "is", "about", "to", "start", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java#L123-L136
29,529
infinispan/infinispan
core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java
TotalOrderManager.notifyStateTransferEnd
public final void notifyStateTransferEnd() { TotalOrderLatch block = stateTransferInProgress.getAndSet(null); if (block != null) { block.unBlock(); } if (trace) { log.tracef("State Transfer finish. It will release %s", block); } totalOrderExecutor.checkForReadyTasks...
java
public final void notifyStateTransferEnd() { TotalOrderLatch block = stateTransferInProgress.getAndSet(null); if (block != null) { block.unBlock(); } if (trace) { log.tracef("State Transfer finish. It will release %s", block); } totalOrderExecutor.checkForReadyTasks...
[ "public", "final", "void", "notifyStateTransferEnd", "(", ")", "{", "TotalOrderLatch", "block", "=", "stateTransferInProgress", ".", "getAndSet", "(", "null", ")", ";", "if", "(", "block", "!=", "null", ")", "{", "block", ".", "unBlock", "(", ")", ";", "}"...
It notifies the end of the state transfer possibly unblock waiting prepares.
[ "It", "notifies", "the", "end", "of", "the", "state", "transfer", "possibly", "unblock", "waiting", "prepares", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/transaction/totalorder/TotalOrderManager.java#L141-L150
29,530
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/configuration/JsonReader.java
JsonReader.readJson
public void readJson(ConfigurationBuilderInfo builderInfo, String json) { readJson(builderInfo, "", Json.read(json)); }
java
public void readJson(ConfigurationBuilderInfo builderInfo, String json) { readJson(builderInfo, "", Json.read(json)); }
[ "public", "void", "readJson", "(", "ConfigurationBuilderInfo", "builderInfo", ",", "String", "json", ")", "{", "readJson", "(", "builderInfo", ",", "\"\"", ",", "Json", ".", "read", "(", "json", ")", ")", ";", "}" ]
Parses a JSON document into the supplied builder. @param builderInfo The configuration builder to use when reading. @param json the JSON document.
[ "Parses", "a", "JSON", "document", "into", "the", "supplied", "builder", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/configuration/JsonReader.java#L25-L27
29,531
infinispan/infinispan
server/integration/endpoint/src/main/java/org/infinispan/server/endpoint/subsystem/EndpointSchema.java
EndpointSchema.format
String format(String pattern) { return String.format(pattern, this.domain, this.major, this.minor); }
java
String format(String pattern) { return String.format(pattern, this.domain, this.major, this.minor); }
[ "String", "format", "(", "String", "pattern", ")", "{", "return", "String", ".", "format", "(", "pattern", ",", "this", ".", "domain", ",", "this", ".", "major", ",", "this", ".", "minor", ")", ";", "}" ]
Formats a string using the specified pattern. @param pattern a formatter pattern @return a formatted string
[ "Formats", "a", "string", "using", "the", "specified", "pattern", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/endpoint/src/main/java/org/infinispan/server/endpoint/subsystem/EndpointSchema.java#L90-L92
29,532
infinispan/infinispan
core/src/main/java/org/infinispan/functional/impl/FunctionalMapImpl.java
FunctionalMapImpl.findDecoratedCache
private DecoratedCache<K, V> findDecoratedCache(Cache<K, V> cache) { if (cache instanceof AbstractDelegatingCache) { if (cache instanceof DecoratedCache) { return ((DecoratedCache<K, V>) cache); } return findDecoratedCache(((AbstractDelegatingCache<K, V>) cache).getDelegate(...
java
private DecoratedCache<K, V> findDecoratedCache(Cache<K, V> cache) { if (cache instanceof AbstractDelegatingCache) { if (cache instanceof DecoratedCache) { return ((DecoratedCache<K, V>) cache); } return findDecoratedCache(((AbstractDelegatingCache<K, V>) cache).getDelegate(...
[ "private", "DecoratedCache", "<", "K", ",", "V", ">", "findDecoratedCache", "(", "Cache", "<", "K", ",", "V", ">", "cache", ")", "{", "if", "(", "cache", "instanceof", "AbstractDelegatingCache", ")", "{", "if", "(", "cache", "instanceof", "DecoratedCache", ...
Finds the first decorated cache if there are delegates surrounding it otherwise null
[ "Finds", "the", "first", "decorated", "cache", "if", "there", "are", "delegates", "surrounding", "it", "otherwise", "null" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/functional/impl/FunctionalMapImpl.java#L66-L74
29,533
infinispan/infinispan
atomic-factory/src/main/java/org/infinispan/atomic/container/Container.java
Container.onCacheModification
@SuppressWarnings({ "rawtypes", "unchecked" }) @CacheEntryModified @CacheEntryCreated @Deprecated public void onCacheModification(CacheEntryEvent event){ if( !event.getKey().equals(key) ) return; if(event.isPre()) return; try { GenericJBossMarshaller marshall...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) @CacheEntryModified @CacheEntryCreated @Deprecated public void onCacheModification(CacheEntryEvent event){ if( !event.getKey().equals(key) ) return; if(event.isPre()) return; try { GenericJBossMarshaller marshall...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "@", "CacheEntryModified", "@", "CacheEntryCreated", "@", "Deprecated", "public", "void", "onCacheModification", "(", "CacheEntryEvent", "event", ")", "{", "if", "(", "!", "event", ...
Internal use of the listener API. @param event of class CacheEntryModifiedEvent
[ "Internal", "use", "of", "the", "listener", "API", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/atomic-factory/src/main/java/org/infinispan/atomic/container/Container.java#L153-L177
29,534
infinispan/infinispan
core/src/main/java/org/infinispan/statetransfer/StateTransferManagerImpl.java
StateTransferManagerImpl.pickConsistentHashFactory
public static ConsistentHashFactory pickConsistentHashFactory(GlobalConfiguration globalConfiguration, Configuration configuration) { ConsistentHashFactory factory = configuration.clustering().hash().consistentHashFactory(); if (factory == null) { CacheMode cacheMode = configuration.clustering().ca...
java
public static ConsistentHashFactory pickConsistentHashFactory(GlobalConfiguration globalConfiguration, Configuration configuration) { ConsistentHashFactory factory = configuration.clustering().hash().consistentHashFactory(); if (factory == null) { CacheMode cacheMode = configuration.clustering().ca...
[ "public", "static", "ConsistentHashFactory", "pickConsistentHashFactory", "(", "GlobalConfiguration", "globalConfiguration", ",", "Configuration", "configuration", ")", "{", "ConsistentHashFactory", "factory", "=", "configuration", ".", "clustering", "(", ")", ".", "hash", ...
If no ConsistentHashFactory was explicitly configured we choose a suitable one based on cache mode.
[ "If", "no", "ConsistentHashFactory", "was", "explicitly", "configured", "we", "choose", "a", "suitable", "one", "based", "on", "cache", "mode", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/statetransfer/StateTransferManagerImpl.java#L131-L152
29,535
infinispan/infinispan
core/src/main/java/org/infinispan/statetransfer/StateTransferManagerImpl.java
StateTransferManagerImpl.addPartitioner
private CacheTopology addPartitioner(CacheTopology cacheTopology) { ConsistentHash currentCH = cacheTopology.getCurrentCH(); currentCH = new PartitionerConsistentHash(currentCH, keyPartitioner); ConsistentHash pendingCH = cacheTopology.getPendingCH(); if (pendingCH != null) { pendingCH ...
java
private CacheTopology addPartitioner(CacheTopology cacheTopology) { ConsistentHash currentCH = cacheTopology.getCurrentCH(); currentCH = new PartitionerConsistentHash(currentCH, keyPartitioner); ConsistentHash pendingCH = cacheTopology.getPendingCH(); if (pendingCH != null) { pendingCH ...
[ "private", "CacheTopology", "addPartitioner", "(", "CacheTopology", "cacheTopology", ")", "{", "ConsistentHash", "currentCH", "=", "cacheTopology", ".", "getCurrentCH", "(", ")", ";", "currentCH", "=", "new", "PartitionerConsistentHash", "(", "currentCH", ",", "keyPar...
Decorates the given cache topology to add a key partitioner. The key partitioner may include support for grouping as well.
[ "Decorates", "the", "given", "cache", "topology", "to", "add", "a", "key", "partitioner", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/statetransfer/StateTransferManagerImpl.java#L159-L172
29,536
infinispan/infinispan
server/hotrod/src/main/java/org/infinispan/server/hotrod/LifecycleCallbacks.java
LifecycleCallbacks.registerGlobalTxTable
private void registerGlobalTxTable(GlobalComponentRegistry globalComponentRegistry) { InternalCacheRegistry registry = globalComponentRegistry.getComponent(InternalCacheRegistry.class); ConfigurationBuilder builder = new ConfigurationBuilder(); //we can't lose transactions. distributed cache can lose ...
java
private void registerGlobalTxTable(GlobalComponentRegistry globalComponentRegistry) { InternalCacheRegistry registry = globalComponentRegistry.getComponent(InternalCacheRegistry.class); ConfigurationBuilder builder = new ConfigurationBuilder(); //we can't lose transactions. distributed cache can lose ...
[ "private", "void", "registerGlobalTxTable", "(", "GlobalComponentRegistry", "globalComponentRegistry", ")", "{", "InternalCacheRegistry", "registry", "=", "globalComponentRegistry", ".", "getComponent", "(", "InternalCacheRegistry", ".", "class", ")", ";", "ConfigurationBuild...
Creates the global transaction internal cache.
[ "Creates", "the", "global", "transaction", "internal", "cache", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/hotrod/src/main/java/org/infinispan/server/hotrod/LifecycleCallbacks.java#L122-L133
29,537
infinispan/infinispan
core/src/main/java/org/infinispan/registry/impl/InternalCacheRegistryImpl.java
InternalCacheRegistryImpl.registerInternalCache
@Override public synchronized void registerInternalCache(String name, Configuration configuration, EnumSet<Flag> flags) { boolean configPresent = cacheManager.getCacheConfiguration(name) != null; // check if it already has been defined. Currently we don't support existing user-defined configuration. ...
java
@Override public synchronized void registerInternalCache(String name, Configuration configuration, EnumSet<Flag> flags) { boolean configPresent = cacheManager.getCacheConfiguration(name) != null; // check if it already has been defined. Currently we don't support existing user-defined configuration. ...
[ "@", "Override", "public", "synchronized", "void", "registerInternalCache", "(", "String", "name", ",", "Configuration", "configuration", ",", "EnumSet", "<", "Flag", ">", "flags", ")", "{", "boolean", "configPresent", "=", "cacheManager", ".", "getCacheConfiguratio...
Synchronized to prevent users from registering the same configuration at the same time
[ "Synchronized", "to", "prevent", "users", "from", "registering", "the", "same", "configuration", "at", "the", "same", "time" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/registry/impl/InternalCacheRegistryImpl.java#L40-L68
29,538
infinispan/infinispan
core/src/main/java/org/infinispan/scattered/impl/ScatteredStateProviderImpl.java
ScatteredStateProviderImpl.replicateAndInvalidate
private CompletableFuture<Void> replicateAndInvalidate(CacheTopology cacheTopology) { Address nextMember = getNextMember(cacheTopology); if (nextMember != null) { HashSet<Address> otherMembers = new HashSet<>(cacheTopology.getActualMembers()); Address localAddress = rpcManager.getAddress()...
java
private CompletableFuture<Void> replicateAndInvalidate(CacheTopology cacheTopology) { Address nextMember = getNextMember(cacheTopology); if (nextMember != null) { HashSet<Address> otherMembers = new HashSet<>(cacheTopology.getActualMembers()); Address localAddress = rpcManager.getAddress()...
[ "private", "CompletableFuture", "<", "Void", ">", "replicateAndInvalidate", "(", "CacheTopology", "cacheTopology", ")", "{", "Address", "nextMember", "=", "getNextMember", "(", "cacheTopology", ")", ";", "if", "(", "nextMember", "!=", "null", ")", "{", "HashSet", ...
that this node keeps from previous topology.
[ "that", "this", "node", "keeps", "from", "previous", "topology", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/scattered/impl/ScatteredStateProviderImpl.java#L56-L95
29,539
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/CollectionFactory.java
CollectionFactory.makeSet
@SafeVarargs public static <T> Set<T> makeSet(T... entries) { return new HashSet<>(Arrays.asList(entries)); }
java
@SafeVarargs public static <T> Set<T> makeSet(T... entries) { return new HashSet<>(Arrays.asList(entries)); }
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "Set", "<", "T", ">", "makeSet", "(", "T", "...", "entries", ")", "{", "return", "new", "HashSet", "<>", "(", "Arrays", ".", "asList", "(", "entries", ")", ")", ";", "}" ]
Create a Set backed by the specified array. @param entries the array by which the list will be backed @param <T> type of elements @return a set view of the specified array
[ "Create", "a", "Set", "backed", "by", "the", "specified", "array", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/CollectionFactory.java#L193-L196
29,540
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/io/ExposedByteArrayOutputStream.java
ExposedByteArrayOutputStream.getNewBufferSize
public final int getNewBufferSize(int curSize, int minNewSize) { if (curSize <= maxDoublingSize) return Math.max(curSize << 1, minNewSize); else return Math.max(curSize + (curSize >> 2), minNewSize); }
java
public final int getNewBufferSize(int curSize, int minNewSize) { if (curSize <= maxDoublingSize) return Math.max(curSize << 1, minNewSize); else return Math.max(curSize + (curSize >> 2), minNewSize); }
[ "public", "final", "int", "getNewBufferSize", "(", "int", "curSize", ",", "int", "minNewSize", ")", "{", "if", "(", "curSize", "<=", "maxDoublingSize", ")", "return", "Math", ".", "max", "(", "curSize", "<<", "1", ",", "minNewSize", ")", ";", "else", "re...
Gets the number of bytes to which the internal buffer should be resized. @param curSize the current number of bytes @param minNewSize the minimum number of bytes required @return the size to which the internal buffer should be resized
[ "Gets", "the", "number", "of", "bytes", "to", "which", "the", "internal", "buffer", "should", "be", "resized", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/io/ExposedByteArrayOutputStream.java#L107-L112
29,541
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/Closeables.java
Closeables.spliterator
public static <E> CloseableSpliterator<E> spliterator(CloseableIterator<? extends E> iterator, long size, int characteristics) { return new CloseableIteratorAsCloseableSpliterator<>(iterator, size, characteristics); }
java
public static <E> CloseableSpliterator<E> spliterator(CloseableIterator<? extends E> iterator, long size, int characteristics) { return new CloseableIteratorAsCloseableSpliterator<>(iterator, size, characteristics); }
[ "public", "static", "<", "E", ">", "CloseableSpliterator", "<", "E", ">", "spliterator", "(", "CloseableIterator", "<", "?", "extends", "E", ">", "iterator", ",", "long", "size", ",", "int", "characteristics", ")", "{", "return", "new", "CloseableIteratorAsClo...
Takes a provided closeable iterator and wraps it appropriately so it can be used as a closeable spliterator that will close the iterator when the spliterator is closed. @param iterator The closeable iterator to change to a spliterator @param size The approximate size of the iterator. If no size is known {@link Long#MA...
[ "Takes", "a", "provided", "closeable", "iterator", "and", "wraps", "it", "appropriately", "so", "it", "can", "be", "used", "as", "a", "closeable", "spliterator", "that", "will", "close", "the", "iterator", "when", "the", "spliterator", "is", "closed", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/Closeables.java#L29-L32
29,542
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/Closeables.java
Closeables.spliterator
public static <T> CloseableSpliterator<T> spliterator(Spliterator<T> spliterator) { if (spliterator instanceof CloseableSpliterator) { return (CloseableSpliterator<T>) spliterator; } return new SpliteratorAsCloseableSpliterator<>(spliterator); }
java
public static <T> CloseableSpliterator<T> spliterator(Spliterator<T> spliterator) { if (spliterator instanceof CloseableSpliterator) { return (CloseableSpliterator<T>) spliterator; } return new SpliteratorAsCloseableSpliterator<>(spliterator); }
[ "public", "static", "<", "T", ">", "CloseableSpliterator", "<", "T", ">", "spliterator", "(", "Spliterator", "<", "T", ">", "spliterator", ")", "{", "if", "(", "spliterator", "instanceof", "CloseableSpliterator", ")", "{", "return", "(", "CloseableSpliterator", ...
Creates a closeable spliterator from the given spliterator that does nothing when close is called. @param spliterator The spliterator to wrap to allow it to become a closeable spliterator. @param <T> The type of the spliterators @return A spliterator that does nothing when closed
[ "Creates", "a", "closeable", "spliterator", "from", "the", "given", "spliterator", "that", "does", "nothing", "when", "close", "is", "called", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/Closeables.java#L40-L45
29,543
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/Closeables.java
Closeables.spliterator
public static <R> CloseableSpliterator<R> spliterator(BaseStream<R, Stream<R>> stream) { Spliterator<R> spliterator = stream.spliterator(); if (spliterator instanceof CloseableSpliterator) { return (CloseableSpliterator<R>) spliterator; } return new StreamToCloseableSpliterator<>(stream...
java
public static <R> CloseableSpliterator<R> spliterator(BaseStream<R, Stream<R>> stream) { Spliterator<R> spliterator = stream.spliterator(); if (spliterator instanceof CloseableSpliterator) { return (CloseableSpliterator<R>) spliterator; } return new StreamToCloseableSpliterator<>(stream...
[ "public", "static", "<", "R", ">", "CloseableSpliterator", "<", "R", ">", "spliterator", "(", "BaseStream", "<", "R", ",", "Stream", "<", "R", ">", ">", "stream", ")", "{", "Spliterator", "<", "R", ">", "spliterator", "=", "stream", ".", "spliterator", ...
Creates a closeable spliterator that when closed will close the underlying stream as well @param stream The stream to change into a closeable spliterator @param <R> The type of the stream @return A spliterator that when closed will also close the underlying stream
[ "Creates", "a", "closeable", "spliterator", "that", "when", "closed", "will", "close", "the", "underlying", "stream", "as", "well" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/Closeables.java#L53-L59
29,544
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/Closeables.java
Closeables.iterator
public static <R> CloseableIterator<R> iterator(BaseStream<R, Stream<R>> stream) { Iterator<R> iterator = stream.iterator(); if (iterator instanceof CloseableIterator) { return (CloseableIterator<R>) iterator; } return new StreamToCloseableIterator<>(stream, iterator); }
java
public static <R> CloseableIterator<R> iterator(BaseStream<R, Stream<R>> stream) { Iterator<R> iterator = stream.iterator(); if (iterator instanceof CloseableIterator) { return (CloseableIterator<R>) iterator; } return new StreamToCloseableIterator<>(stream, iterator); }
[ "public", "static", "<", "R", ">", "CloseableIterator", "<", "R", ">", "iterator", "(", "BaseStream", "<", "R", ",", "Stream", "<", "R", ">", ">", "stream", ")", "{", "Iterator", "<", "R", ">", "iterator", "=", "stream", ".", "iterator", "(", ")", ...
Creates a closeable iterator that when closed will close the underlying stream as well @param stream The stream to change into a closeable iterator @param <R> The type of the stream @return An iterator that when closed will also close the underlying stream
[ "Creates", "a", "closeable", "iterator", "that", "when", "closed", "will", "close", "the", "underlying", "stream", "as", "well" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/Closeables.java#L67-L73
29,545
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/Closeables.java
Closeables.iterator
public static <E> CloseableIterator<E> iterator(Iterator<? extends E> iterator) { if (iterator instanceof CloseableIterator) { return (CloseableIterator<E>) iterator; } return new IteratorAsCloseableIterator<>(iterator); }
java
public static <E> CloseableIterator<E> iterator(Iterator<? extends E> iterator) { if (iterator instanceof CloseableIterator) { return (CloseableIterator<E>) iterator; } return new IteratorAsCloseableIterator<>(iterator); }
[ "public", "static", "<", "E", ">", "CloseableIterator", "<", "E", ">", "iterator", "(", "Iterator", "<", "?", "extends", "E", ">", "iterator", ")", "{", "if", "(", "iterator", "instanceof", "CloseableIterator", ")", "{", "return", "(", "CloseableIterator", ...
Creates a closeable iterator from the given iterator that does nothing when close is called. @param iterator The iterator to wrap to allow it to become a closeable iterator @param <E> The type of the iterators @return An iterator that does nothing when closed
[ "Creates", "a", "closeable", "iterator", "from", "the", "given", "iterator", "that", "does", "nothing", "when", "close", "is", "called", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/Closeables.java#L81-L86
29,546
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/Closeables.java
Closeables.stream
public static <E> Stream<E> stream(CloseableSpliterator<E> spliterator, boolean parallel) { Stream<E> stream = StreamSupport.stream(spliterator, parallel); stream.onClose(spliterator::close); return stream; }
java
public static <E> Stream<E> stream(CloseableSpliterator<E> spliterator, boolean parallel) { Stream<E> stream = StreamSupport.stream(spliterator, parallel); stream.onClose(spliterator::close); return stream; }
[ "public", "static", "<", "E", ">", "Stream", "<", "E", ">", "stream", "(", "CloseableSpliterator", "<", "E", ">", "spliterator", ",", "boolean", "parallel", ")", "{", "Stream", "<", "E", ">", "stream", "=", "StreamSupport", ".", "stream", "(", "spliterat...
Creates a stream that when closed will also close the underlying spliterator @param spliterator spliterator to back the stream and subsequently close @param parallel whether or not the returned stream is parallel or not @param <E> the type of the stream @return the stream to use
[ "Creates", "a", "stream", "that", "when", "closed", "will", "also", "close", "the", "underlying", "spliterator" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/Closeables.java#L95-L99
29,547
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/Closeables.java
Closeables.stream
public static <E> Stream<E> stream(CloseableIterator<E> iterator, boolean parallel, long size, int characteristics) { Stream<E> stream = StreamSupport.stream(Spliterators.spliterator(iterator, size, characteristics), parallel); stream.onClose(iterator::close); return stream; }
java
public static <E> Stream<E> stream(CloseableIterator<E> iterator, boolean parallel, long size, int characteristics) { Stream<E> stream = StreamSupport.stream(Spliterators.spliterator(iterator, size, characteristics), parallel); stream.onClose(iterator::close); return stream; }
[ "public", "static", "<", "E", ">", "Stream", "<", "E", ">", "stream", "(", "CloseableIterator", "<", "E", ">", "iterator", ",", "boolean", "parallel", ",", "long", "size", ",", "int", "characteristics", ")", "{", "Stream", "<", "E", ">", "stream", "=",...
Creates a stream that when closed will also close the underlying iterator @param iterator iterator to back the stream and subsequently close @param parallel whether or not the returned stream is parallel or not @param size the size of the iterator if known, otherwise {@link Long#MAX_VALUE} should be passed. @param char...
[ "Creates", "a", "stream", "that", "when", "closed", "will", "also", "close", "the", "underlying", "iterator" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/Closeables.java#L110-L114
29,548
infinispan/infinispan
core/src/main/java/org/infinispan/statetransfer/OutboundTransferTask.java
OutboundTransferTask.cancelSegments
public void cancelSegments(IntSet cancelledSegments) { if (segments.removeAll(cancelledSegments)) { if (trace) { log.tracef("Cancelling outbound transfer to node %s, segments %s (remaining segments %s)", destination, cancelledSegments, segments); } ent...
java
public void cancelSegments(IntSet cancelledSegments) { if (segments.removeAll(cancelledSegments)) { if (trace) { log.tracef("Cancelling outbound transfer to node %s, segments %s (remaining segments %s)", destination, cancelledSegments, segments); } ent...
[ "public", "void", "cancelSegments", "(", "IntSet", "cancelledSegments", ")", "{", "if", "(", "segments", ".", "removeAll", "(", "cancelledSegments", ")", ")", "{", "if", "(", "trace", ")", "{", "log", ".", "tracef", "(", "\"Cancelling outbound transfer to node %...
Cancel some of the segments. If all segments get cancelled then the whole task will be cancelled. @param cancelledSegments segments to cancel.
[ "Cancel", "some", "of", "the", "segments", ".", "If", "all", "segments", "get", "cancelled", "then", "the", "whole", "task", "will", "be", "cancelled", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/statetransfer/OutboundTransferTask.java#L285-L296
29,549
infinispan/infinispan
core/src/main/java/org/infinispan/statetransfer/OutboundTransferTask.java
OutboundTransferTask.cancel
public void cancel() { if (runnableFuture != null && !runnableFuture.isCancelled()) { log.debugf("Cancelling outbound transfer to node %s, segments %s", destination, segments); runnableFuture.cancel(true); } }
java
public void cancel() { if (runnableFuture != null && !runnableFuture.isCancelled()) { log.debugf("Cancelling outbound transfer to node %s, segments %s", destination, segments); runnableFuture.cancel(true); } }
[ "public", "void", "cancel", "(", ")", "{", "if", "(", "runnableFuture", "!=", "null", "&&", "!", "runnableFuture", ".", "isCancelled", "(", ")", ")", "{", "log", ".", "debugf", "(", "\"Cancelling outbound transfer to node %s, segments %s\"", ",", "destination", ...
Cancel the whole task.
[ "Cancel", "the", "whole", "task", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/statetransfer/OutboundTransferTask.java#L301-L306
29,550
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.unmarshallArray
public static <E> E[] unmarshallArray(ObjectInput in, ArrayBuilder<E> builder) throws IOException, ClassNotFoundException { final int size = unmarshallSize(in); if (size == NULL_VALUE) { return null; } final E[] array = Objects.requireNonNull(builder, "ArrayBuilder must be non-null").bu...
java
public static <E> E[] unmarshallArray(ObjectInput in, ArrayBuilder<E> builder) throws IOException, ClassNotFoundException { final int size = unmarshallSize(in); if (size == NULL_VALUE) { return null; } final E[] array = Objects.requireNonNull(builder, "ArrayBuilder must be non-null").bu...
[ "public", "static", "<", "E", ">", "E", "[", "]", "unmarshallArray", "(", "ObjectInput", "in", ",", "ArrayBuilder", "<", "E", ">", "builder", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "final", "int", "size", "=", "unmarshallSize", "("...
Unmarshall arrays. @param in {@link ObjectInput} to read. @param builder {@link ArrayBuilder} to build the array. @param <E> Array type. @return The populated array. @throws IOException If any of the usual Input/Output related exceptions occur. @throws ClassNotFoundException If the class of a seria...
[ "Unmarshall", "arrays", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L206-L217
29,551
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.unmarshallSize
public static int unmarshallSize(ObjectInput in) throws IOException { byte b = in.readByte(); if ((b & 0x80) != 0) { return NULL_VALUE; //negative value } int i = b & 0x3F; if ((b & 0x40) == 0) { return i; } int shift = 6; do { b = in.readByte()...
java
public static int unmarshallSize(ObjectInput in) throws IOException { byte b = in.readByte(); if ((b & 0x80) != 0) { return NULL_VALUE; //negative value } int i = b & 0x3F; if ((b & 0x40) == 0) { return i; } int shift = 6; do { b = in.readByte()...
[ "public", "static", "int", "unmarshallSize", "(", "ObjectInput", "in", ")", "throws", "IOException", "{", "byte", "b", "=", "in", ".", "readByte", "(", ")", ";", "if", "(", "(", "b", "&", "0x80", ")", "!=", "0", ")", "{", "return", "NULL_VALUE", ";",...
Unmarshall an integer. @param in {@link ObjectInput} to read. @return The integer value or {@link #NULL_VALUE} if the original value was negative. @throws IOException If any of the usual Input/Output related exceptions occur. @see #marshallSize(ObjectOutput, int).
[ "Unmarshall", "an", "integer", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L423-L440
29,552
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.marshallIntCollection
public static void marshallIntCollection(Collection<Integer> collection, ObjectOutput out) throws IOException { final int size = collection == null ? NULL_VALUE : collection.size(); marshallSize(out, size); if (size <= 0) { return; } for (Integer integer : collection) { o...
java
public static void marshallIntCollection(Collection<Integer> collection, ObjectOutput out) throws IOException { final int size = collection == null ? NULL_VALUE : collection.size(); marshallSize(out, size); if (size <= 0) { return; } for (Integer integer : collection) { o...
[ "public", "static", "void", "marshallIntCollection", "(", "Collection", "<", "Integer", ">", "collection", ",", "ObjectOutput", "out", ")", "throws", "IOException", "{", "final", "int", "size", "=", "collection", "==", "null", "?", "NULL_VALUE", ":", "collection...
Marshalls a collection of integers. @param collection the collection to marshall. @param out the {@link ObjectOutput} to write to. @throws IOException if an error occurs.
[ "Marshalls", "a", "collection", "of", "integers", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L469-L478
29,553
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.unmarshallIntCollection
public static <T extends Collection<Integer>> T unmarshallIntCollection(ObjectInput in, CollectionBuilder<Integer, T> builder) throws IOException { final int size = unmarshallSize(in); if (size == NULL_VALUE) { return null; } T collection = Objects.requireNonNull(builder, "CollectionBui...
java
public static <T extends Collection<Integer>> T unmarshallIntCollection(ObjectInput in, CollectionBuilder<Integer, T> builder) throws IOException { final int size = unmarshallSize(in); if (size == NULL_VALUE) { return null; } T collection = Objects.requireNonNull(builder, "CollectionBui...
[ "public", "static", "<", "T", "extends", "Collection", "<", "Integer", ">", ">", "T", "unmarshallIntCollection", "(", "ObjectInput", "in", ",", "CollectionBuilder", "<", "Integer", ",", "T", ">", "builder", ")", "throws", "IOException", "{", "final", "int", ...
Unmarshalls a collection of integers. @param in the {@link ObjectInput} to read from. @param builder the {@link CollectionBuilder} to build the collection of integer. @param <T> the concrete type of the collection. @return the collection. @throws IOException if an error occurs.
[ "Unmarshalls", "a", "collection", "of", "integers", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L489-L499
29,554
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java
MarshallUtil.isSafeClass
public static boolean isSafeClass(String className, List<String> whitelist) { for (String whiteRegExp : whitelist) { Pattern whitePattern = Pattern.compile(whiteRegExp); Matcher whiteMatcher = whitePattern.matcher(className); if (whiteMatcher.find()) { if (log.isTraceEnabled...
java
public static boolean isSafeClass(String className, List<String> whitelist) { for (String whiteRegExp : whitelist) { Pattern whitePattern = Pattern.compile(whiteRegExp); Matcher whiteMatcher = whitePattern.matcher(className); if (whiteMatcher.find()) { if (log.isTraceEnabled...
[ "public", "static", "boolean", "isSafeClass", "(", "String", "className", ",", "List", "<", "String", ">", "whitelist", ")", "{", "for", "(", "String", "whiteRegExp", ":", "whitelist", ")", "{", "Pattern", "whitePattern", "=", "Pattern", ".", "compile", "(",...
Checks whether class name is matched by the class name white list regular expressions provided. @param className class to verify @param whitelist list of regular expressions to match class name against @return true if the class matched at least one of the regular expressions, false otherwise
[ "Checks", "whether", "class", "name", "is", "matched", "by", "the", "class", "name", "white", "list", "regular", "expressions", "provided", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/marshall/MarshallUtil.java#L509-L522
29,555
infinispan/infinispan
counter/src/main/java/org/infinispan/counter/impl/strong/AbstractStrongCounter.java
AbstractStrongCounter.initCounterState
private synchronized void initCounterState(Long currentValue) { if (weakCounter == null) { weakCounter = currentValue == null ? newCounterValue(configuration) : newCounterValue(currentValue, configuration); } }
java
private synchronized void initCounterState(Long currentValue) { if (weakCounter == null) { weakCounter = currentValue == null ? newCounterValue(configuration) : newCounterValue(currentValue, configuration); } }
[ "private", "synchronized", "void", "initCounterState", "(", "Long", "currentValue", ")", "{", "if", "(", "weakCounter", "==", "null", ")", "{", "weakCounter", "=", "currentValue", "==", "null", "?", "newCounterValue", "(", "configuration", ")", ":", "newCounterV...
Initializes the weak value. @param currentValue The current value.
[ "Initializes", "the", "weak", "value", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/impl/strong/AbstractStrongCounter.java#L191-L197
29,556
infinispan/infinispan
cli/cli-interpreter/src/main/java/org/infinispan/cli/interpreter/utils/ParserSupport.java
ParserSupport.millis
public static long millis(final String time, final String timeUnit) { return TIMEUNITS.get(timeUnit).toMillis(Long.parseLong(time)); }
java
public static long millis(final String time, final String timeUnit) { return TIMEUNITS.get(timeUnit).toMillis(Long.parseLong(time)); }
[ "public", "static", "long", "millis", "(", "final", "String", "time", ",", "final", "String", "timeUnit", ")", "{", "return", "TIMEUNITS", ".", "get", "(", "timeUnit", ")", ".", "toMillis", "(", "Long", ".", "parseLong", "(", "time", ")", ")", ";", "}"...
Converts a time representation into milliseconds @param time @param timeUnit @return
[ "Converts", "a", "time", "representation", "into", "milliseconds" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/cli/cli-interpreter/src/main/java/org/infinispan/cli/interpreter/utils/ParserSupport.java#L25-L27
29,557
infinispan/infinispan
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/OperationsFactory.java
OperationsFactory.newPingOperation
public PingOperation newPingOperation(boolean releaseChannel) { return new PingOperation(codec, topologyId, cfg, cacheNameBytes, channelFactory, releaseChannel, this); }
java
public PingOperation newPingOperation(boolean releaseChannel) { return new PingOperation(codec, topologyId, cfg, cacheNameBytes, channelFactory, releaseChannel, this); }
[ "public", "PingOperation", "newPingOperation", "(", "boolean", "releaseChannel", ")", "{", "return", "new", "PingOperation", "(", "codec", ",", "topologyId", ",", "cfg", ",", "cacheNameBytes", ",", "channelFactory", ",", "releaseChannel", ",", "this", ")", ";", ...
Construct a ping request directed to a particular node. @return a ping operation for a particular node @param releaseChannel
[ "Construct", "a", "ping", "request", "directed", "to", "a", "particular", "node", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/operations/OperationsFactory.java#L209-L211
29,558
infinispan/infinispan
core/src/main/java/org/infinispan/persistence/PersistenceUtil.java
PersistenceUtil.count
public static int count(SegmentedAdvancedLoadWriteStore<?, ?> salws, IntSet segments) { Long result = Flowable.fromPublisher(salws.publishKeys(segments, null)).count().blockingGet(); if (result > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return result.intValue(); }
java
public static int count(SegmentedAdvancedLoadWriteStore<?, ?> salws, IntSet segments) { Long result = Flowable.fromPublisher(salws.publishKeys(segments, null)).count().blockingGet(); if (result > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return result.intValue(); }
[ "public", "static", "int", "count", "(", "SegmentedAdvancedLoadWriteStore", "<", "?", ",", "?", ">", "salws", ",", "IntSet", "segments", ")", "{", "Long", "result", "=", "Flowable", ".", "fromPublisher", "(", "salws", ".", "publishKeys", "(", "segments", ","...
Counts how many entries are present in the segmented store. Only the segments provided will have entries counted. @param salws segmented store containing entries @param segments segments to count entries from @return count of entries that are in the provided segments
[ "Counts", "how", "many", "entries", "are", "present", "in", "the", "segmented", "store", ".", "Only", "the", "segments", "provided", "will", "have", "entries", "counted", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/persistence/PersistenceUtil.java#L74-L80
29,559
infinispan/infinispan
query/src/main/java/org/infinispan/query/backend/KeyTransformationHandler.java
KeyTransformationHandler.stringToKey
public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': // this is a String, NOT a Short. For Short see case 'X'. return s.substring(2); case 'I': // This is an Integer return Integer.valueOf(s.substring(2)); ...
java
public Object stringToKey(String s) { char type = s.charAt(0); switch (type) { case 'S': // this is a String, NOT a Short. For Short see case 'X'. return s.substring(2); case 'I': // This is an Integer return Integer.valueOf(s.substring(2)); ...
[ "public", "Object", "stringToKey", "(", "String", "s", ")", "{", "char", "type", "=", "s", ".", "charAt", "(", "0", ")", ";", "switch", "(", "type", ")", "{", "case", "'", "'", ":", "// this is a String, NOT a Short. For Short see case 'X'.", "return", "s", ...
Converts a Lucene document id from string form back to the original object. @param s the string form of the key @return the key object
[ "Converts", "a", "Lucene", "document", "id", "from", "string", "form", "back", "to", "the", "original", "object", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/backend/KeyTransformationHandler.java#L59-L108
29,560
infinispan/infinispan
query/src/main/java/org/infinispan/query/backend/KeyTransformationHandler.java
KeyTransformationHandler.keyToString
public String keyToString(Object key) { // This string should be in the format of: // "<TYPE>:<KEY>" for internally supported types or "T:<KEY_CLASS>:<KEY>" for custom types // e.g.: // "S:my string key" // "I:75" // "D:5.34" // "B:f" // "T:com.myorg.MyType:STRI...
java
public String keyToString(Object key) { // This string should be in the format of: // "<TYPE>:<KEY>" for internally supported types or "T:<KEY_CLASS>:<KEY>" for custom types // e.g.: // "S:my string key" // "I:75" // "D:5.34" // "B:f" // "T:com.myorg.MyType:STRI...
[ "public", "String", "keyToString", "(", "Object", "key", ")", "{", "// This string should be in the format of:", "// \"<TYPE>:<KEY>\" for internally supported types or \"T:<KEY_CLASS>:<KEY>\" for custom types", "// e.g.:", "// \"S:my string key\"", "// \"I:75\"", "// \"D:5.34\"", "...
Stringify a key so Lucene can use it as document id. @param key the key @return a string form of the key
[ "Stringify", "a", "key", "so", "Lucene", "can", "use", "it", "as", "document", "id", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/backend/KeyTransformationHandler.java#L127-L171
29,561
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/base/CommandInterceptor.java
CommandInterceptor.invokeNextInterceptor
public final Object invokeNextInterceptor(InvocationContext ctx, VisitableCommand command) throws Throwable { Object maybeStage = nextInterceptor.visitCommand(ctx, command); if (maybeStage instanceof SimpleAsyncInvocationStage) { return ((InvocationStage) maybeStage).get(); } else { ...
java
public final Object invokeNextInterceptor(InvocationContext ctx, VisitableCommand command) throws Throwable { Object maybeStage = nextInterceptor.visitCommand(ctx, command); if (maybeStage instanceof SimpleAsyncInvocationStage) { return ((InvocationStage) maybeStage).get(); } else { ...
[ "public", "final", "Object", "invokeNextInterceptor", "(", "InvocationContext", "ctx", ",", "VisitableCommand", "command", ")", "throws", "Throwable", "{", "Object", "maybeStage", "=", "nextInterceptor", ".", "visitCommand", "(", "ctx", ",", "command", ")", ";", "...
Invokes the next interceptor in the chain. This is how interceptor implementations should pass a call up the chain to the next interceptor. @param ctx invocation context @param command command to pass up the chain. @return return value of the invocation @throws Throwable in the event of problems
[ "Invokes", "the", "next", "interceptor", "in", "the", "chain", ".", "This", "is", "how", "interceptor", "implementations", "should", "pass", "a", "call", "up", "the", "chain", "to", "the", "next", "interceptor", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/base/CommandInterceptor.java#L117-L124
29,562
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/base/CommandInterceptor.java
CommandInterceptor.handleDefault
@Override protected Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable { return invokeNextInterceptor(ctx, command); }
java
@Override protected Object handleDefault(InvocationContext ctx, VisitableCommand command) throws Throwable { return invokeNextInterceptor(ctx, command); }
[ "@", "Override", "protected", "Object", "handleDefault", "(", "InvocationContext", "ctx", ",", "VisitableCommand", "command", ")", "throws", "Throwable", "{", "return", "invokeNextInterceptor", "(", "ctx", ",", "command", ")", ";", "}" ]
The default behaviour of the visitXXX methods, which is to ignore the call and pass the call up to the next interceptor in the chain. @param ctx invocation context @param command command to invoke @return return value @throws Throwable in the event of problems
[ "The", "default", "behaviour", "of", "the", "visitXXX", "methods", "which", "is", "to", "ignore", "the", "call", "and", "pass", "the", "call", "up", "to", "the", "next", "interceptor", "in", "the", "chain", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/base/CommandInterceptor.java#L135-L138
29,563
infinispan/infinispan
core/src/main/java/org/infinispan/stream/StreamMarshalling.java
StreamMarshalling.entryToKeyFunction
public static <K, V> Function<Map.Entry<K, V>, K> entryToKeyFunction() { return EntryToKeyFunction.getInstance(); }
java
public static <K, V> Function<Map.Entry<K, V>, K> entryToKeyFunction() { return EntryToKeyFunction.getInstance(); }
[ "public", "static", "<", "K", ",", "V", ">", "Function", "<", "Map", ".", "Entry", "<", "K", ",", "V", ">", ",", "K", ">", "entryToKeyFunction", "(", ")", "{", "return", "EntryToKeyFunction", ".", "getInstance", "(", ")", ";", "}" ]
Provides a function that returns the key of the entry when invoked. @param <K> key type of the entry @param <V> value type of the entry @return a function that when applied to a given entry will return the key
[ "Provides", "a", "function", "that", "returns", "the", "key", "of", "the", "entry", "when", "invoked", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/stream/StreamMarshalling.java#L60-L62
29,564
infinispan/infinispan
core/src/main/java/org/infinispan/stream/StreamMarshalling.java
StreamMarshalling.entryToValueFunction
public static <K, V> Function<Map.Entry<K, V>, V> entryToValueFunction() { return EntryToValueFunction.getInstance(); }
java
public static <K, V> Function<Map.Entry<K, V>, V> entryToValueFunction() { return EntryToValueFunction.getInstance(); }
[ "public", "static", "<", "K", ",", "V", ">", "Function", "<", "Map", ".", "Entry", "<", "K", ",", "V", ">", ",", "V", ">", "entryToValueFunction", "(", ")", "{", "return", "EntryToValueFunction", ".", "getInstance", "(", ")", ";", "}" ]
Provides a function that returns the value of the entry when invoked. @param <K> key type of the entry @param <V> value type of the entry @return a function that when applied to a given entry will return the value
[ "Provides", "a", "function", "that", "returns", "the", "value", "of", "the", "entry", "when", "invoked", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/stream/StreamMarshalling.java#L70-L72
29,565
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/concurrent/ConcurrentWeakKeyHashMap.java
ConcurrentWeakKeyHashMap.hash
private static int hash(int h) { // Spread bits to regularize both segment and index locations, // using variant of single-word Wang/Jenkins hash. h += h << 15 ^ 0xffffcd7d; h ^= h >>> 10; h += h << 3; h ^= h >>> 6; h += (h << 2) + (h << 14); return h ^ h >>> 16; }
java
private static int hash(int h) { // Spread bits to regularize both segment and index locations, // using variant of single-word Wang/Jenkins hash. h += h << 15 ^ 0xffffcd7d; h ^= h >>> 10; h += h << 3; h ^= h >>> 6; h += (h << 2) + (h << 14); return h ^ h >>> 16; }
[ "private", "static", "int", "hash", "(", "int", "h", ")", "{", "// Spread bits to regularize both segment and index locations,", "// using variant of single-word Wang/Jenkins hash.", "h", "+=", "h", "<<", "15", "^", "0xffffcd7d", ";", "h", "^=", "h", ">>>", "10", ";",...
Applies a supplemental hash function to a given hashCode, which defends against poor quality hash functions. This is critical because ConcurrentReferenceHashMap uses power-of-two length hash tables, that otherwise encounter collisions for hashCodes that do not differ in lower or upper bits.
[ "Applies", "a", "supplemental", "hash", "function", "to", "a", "given", "hashCode", "which", "defends", "against", "poor", "quality", "hash", "functions", ".", "This", "is", "critical", "because", "ConcurrentReferenceHashMap", "uses", "power", "-", "of", "-", "t...
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/concurrent/ConcurrentWeakKeyHashMap.java#L107-L116
29,566
infinispan/infinispan
core/src/main/java/org/infinispan/factories/components/ComponentMetadataRepo.java
ComponentMetadataRepo.getComponentMetadata
public ComponentMetadata getComponentMetadata(Class<?> componentClass) { ComponentMetadata md = componentMetadataMap.get(componentClass.getName()); if (md == null) { if (componentClass.getSuperclass() != null) { return getComponentMetadata(componentClass.getSuperclass()); } els...
java
public ComponentMetadata getComponentMetadata(Class<?> componentClass) { ComponentMetadata md = componentMetadataMap.get(componentClass.getName()); if (md == null) { if (componentClass.getSuperclass() != null) { return getComponentMetadata(componentClass.getSuperclass()); } els...
[ "public", "ComponentMetadata", "getComponentMetadata", "(", "Class", "<", "?", ">", "componentClass", ")", "{", "ComponentMetadata", "md", "=", "componentMetadataMap", ".", "get", "(", "componentClass", ".", "getName", "(", ")", ")", ";", "if", "(", "md", "=="...
Look up metadata for a component class. <p>If the class does not have any metadata, tries to look up the metadata of its superclasses. This is needed for mocks and other classes generated at runtime.</p> <p>Do not use for looking up the metadata of an interface, e.g. to determine the scope of a component that doesn't...
[ "Look", "up", "metadata", "for", "a", "component", "class", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/factories/components/ComponentMetadataRepo.java#L109-L122
29,567
infinispan/infinispan
core/src/main/java/org/infinispan/factories/components/ComponentMetadataRepo.java
ComponentMetadataRepo.injectFactoryForComponent
@Deprecated public void injectFactoryForComponent(Class<?> componentType, Class<?> factoryType) { factories.put(componentType.getName(), factoryType.getName()); }
java
@Deprecated public void injectFactoryForComponent(Class<?> componentType, Class<?> factoryType) { factories.put(componentType.getName(), factoryType.getName()); }
[ "@", "Deprecated", "public", "void", "injectFactoryForComponent", "(", "Class", "<", "?", ">", "componentType", ",", "Class", "<", "?", ">", "factoryType", ")", "{", "factories", ".", "put", "(", "componentType", ".", "getName", "(", ")", ",", "factoryType",...
Inject a factory for a given component type. @param componentType Component type that the factory will produce @param factoryType Factory that produces the given type of components @deprecated For testing purposes only.
[ "Inject", "a", "factory", "for", "a", "given", "component", "type", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/factories/components/ComponentMetadataRepo.java#L195-L198
29,568
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java
BaseAsyncInterceptor.setNextInterceptor
@Override public final void setNextInterceptor(AsyncInterceptor nextInterceptor) { this.nextInterceptor = nextInterceptor; this.nextDDInterceptor = nextInterceptor instanceof DDAsyncInterceptor ? (DDAsyncInterceptor) nextInterceptor : null; }
java
@Override public final void setNextInterceptor(AsyncInterceptor nextInterceptor) { this.nextInterceptor = nextInterceptor; this.nextDDInterceptor = nextInterceptor instanceof DDAsyncInterceptor ? (DDAsyncInterceptor) nextInterceptor : null; }
[ "@", "Override", "public", "final", "void", "setNextInterceptor", "(", "AsyncInterceptor", "nextInterceptor", ")", "{", "this", ".", "nextInterceptor", "=", "nextInterceptor", ";", "this", ".", "nextDDInterceptor", "=", "nextInterceptor", "instanceof", "DDAsyncIntercept...
Used internally to set up the interceptor.
[ "Used", "internally", "to", "set", "up", "the", "interceptor", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java#L33-L38
29,569
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java
BaseAsyncInterceptor.invokeNext
public final Object invokeNext(InvocationContext ctx, VisitableCommand command) { try { if (nextDDInterceptor != null) { return command.acceptVisitor(ctx, nextDDInterceptor); } else { return nextInterceptor.visitCommand(ctx, command); } } catch (Throwable t...
java
public final Object invokeNext(InvocationContext ctx, VisitableCommand command) { try { if (nextDDInterceptor != null) { return command.acceptVisitor(ctx, nextDDInterceptor); } else { return nextInterceptor.visitCommand(ctx, command); } } catch (Throwable t...
[ "public", "final", "Object", "invokeNext", "(", "InvocationContext", "ctx", ",", "VisitableCommand", "command", ")", "{", "try", "{", "if", "(", "nextDDInterceptor", "!=", "null", ")", "{", "return", "command", ".", "acceptVisitor", "(", "ctx", ",", "nextDDInt...
Invoke the next interceptor, possibly with a new command. <p>Use {@link #invokeNextThenApply(InvocationContext, VisitableCommand, InvocationSuccessFunction)} or {@link #invokeNextThenAccept(InvocationContext, VisitableCommand, InvocationSuccessAction)} instead if you need to process the return value of the next interc...
[ "Invoke", "the", "next", "interceptor", "possibly", "with", "a", "new", "command", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java#L53-L63
29,570
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java
BaseAsyncInterceptor.delayedValue
public static Object delayedValue(CompletionStage<Void> stage, Object syncValue) { if (stage != null) { CompletableFuture<?> future = stage.toCompletableFuture(); if (!future.isDone()) { return asyncValue(stage.thenApply(v -> syncValue)); } if (future.isCompletedExc...
java
public static Object delayedValue(CompletionStage<Void> stage, Object syncValue) { if (stage != null) { CompletableFuture<?> future = stage.toCompletableFuture(); if (!future.isDone()) { return asyncValue(stage.thenApply(v -> syncValue)); } if (future.isCompletedExc...
[ "public", "static", "Object", "delayedValue", "(", "CompletionStage", "<", "Void", ">", "stage", ",", "Object", "syncValue", ")", "{", "if", "(", "stage", "!=", "null", ")", "{", "CompletableFuture", "<", "?", ">", "future", "=", "stage", ".", "toCompletab...
Returns an InvocationStage if the provided CompletionStage is null, not completed or completed via exception. If these are not true the sync value is returned directly. @param stage wait for completion of this if not null @param syncValue sync value to return if stage is complete or as stage value @return invocation st...
[ "Returns", "an", "InvocationStage", "if", "the", "provided", "CompletionStage", "is", "null", "not", "completed", "or", "completed", "via", "exception", ".", "If", "these", "are", "not", "true", "the", "sync", "value", "is", "returned", "directly", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java#L299-L310
29,571
infinispan/infinispan
core/src/main/java/org/infinispan/remoting/transport/AbstractDelegatingTransport.java
AbstractDelegatingTransport.afterInvokeRemotely
protected Map<Address, Response> afterInvokeRemotely(ReplicableCommand command, Map<Address, Response> responseMap) { return responseMap; }
java
protected Map<Address, Response> afterInvokeRemotely(ReplicableCommand command, Map<Address, Response> responseMap) { return responseMap; }
[ "protected", "Map", "<", "Address", ",", "Response", ">", "afterInvokeRemotely", "(", "ReplicableCommand", "command", ",", "Map", "<", "Address", ",", "Response", ">", "responseMap", ")", "{", "return", "responseMap", ";", "}" ]
method invoked after a successful remote invocation. @param command the command invoked remotely. @param responseMap can be null if not response is expected. @return the new response map
[ "method", "invoked", "after", "a", "successful", "remote", "invocation", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/remoting/transport/AbstractDelegatingTransport.java#L169-L171
29,572
infinispan/infinispan
core/src/main/java/org/infinispan/container/impl/DefaultSegmentedDataContainer.java
DefaultSegmentedDataContainer.stop
@Stop(priority = 9999) public void stop() { for (int i = 0; i < maps.length(); ++i) { stopMap(i, false); } }
java
@Stop(priority = 9999) public void stop() { for (int i = 0; i < maps.length(); ++i) { stopMap(i, false); } }
[ "@", "Stop", "(", "priority", "=", "9999", ")", "public", "void", "stop", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "maps", ".", "length", "(", ")", ";", "++", "i", ")", "{", "stopMap", "(", "i", ",", "false", ")", ";"...
Priority has to be higher than the clear priority - which is currently 999
[ "Priority", "has", "to", "be", "higher", "than", "the", "clear", "priority", "-", "which", "is", "currently", "999" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/container/impl/DefaultSegmentedDataContainer.java#L79-L84
29,573
infinispan/infinispan
query/src/main/java/org/infinispan/query/dsl/embedded/impl/BaseIckleFilterIndexingServiceProvider.java
BaseIckleFilterIndexingServiceProvider.getEventTypeFromAnnotation
private Event.Type getEventTypeFromAnnotation(Class<? extends Annotation> annotation) { if (annotation == CacheEntryCreated.class) return Event.Type.CACHE_ENTRY_CREATED; if (annotation == CacheEntryModified.class) return Event.Type.CACHE_ENTRY_MODIFIED; if (annotation == CacheEntryRemoved.class) retur...
java
private Event.Type getEventTypeFromAnnotation(Class<? extends Annotation> annotation) { if (annotation == CacheEntryCreated.class) return Event.Type.CACHE_ENTRY_CREATED; if (annotation == CacheEntryModified.class) return Event.Type.CACHE_ENTRY_MODIFIED; if (annotation == CacheEntryRemoved.class) retur...
[ "private", "Event", ".", "Type", "getEventTypeFromAnnotation", "(", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "if", "(", "annotation", "==", "CacheEntryCreated", ".", "class", ")", "return", "Event", ".", "Type", ".", "CACHE_ENTR...
Obtains the event type that corresponds to the given event annotation. @param annotation a CacheEntryXXX annotation @return the event type or {@code null} if the given annotation is not supported
[ "Obtains", "the", "event", "type", "that", "corresponds", "to", "the", "given", "event", "annotation", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/dsl/embedded/impl/BaseIckleFilterIndexingServiceProvider.java#L114-L126
29,574
infinispan/infinispan
server/integration/commons/src/main/java/org/infinispan/server/commons/dmr/ModelNodes.java
ModelNodes.asEnum
public static <E extends Enum<E>> E asEnum(ModelNode value, Class<E> targetClass) { return asEnum(value, targetClass, null); }
java
public static <E extends Enum<E>> E asEnum(ModelNode value, Class<E> targetClass) { return asEnum(value, targetClass, null); }
[ "public", "static", "<", "E", "extends", "Enum", "<", "E", ">", ">", "E", "asEnum", "(", "ModelNode", "value", ",", "Class", "<", "E", ">", "targetClass", ")", "{", "return", "asEnum", "(", "value", ",", "targetClass", ",", "null", ")", ";", "}" ]
Returns the value of the node as an Enum value, or null if the node is undefined. @param value a model node @return the value of the node as an Enum, or null if the node is undefined.
[ "Returns", "the", "value", "of", "the", "node", "as", "an", "Enum", "value", "or", "null", "if", "the", "node", "is", "undefined", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/commons/src/main/java/org/infinispan/server/commons/dmr/ModelNodes.java#L75-L77
29,575
infinispan/infinispan
server/integration/commons/src/main/java/org/infinispan/server/commons/dmr/ModelNodes.java
ModelNodes.asModuleIdentifier
public static ModuleIdentifier asModuleIdentifier(ModelNode value, ModuleIdentifier defaultValue) { return value.isDefined() ? ModuleIdentifier.fromString(value.asString()) : defaultValue; }
java
public static ModuleIdentifier asModuleIdentifier(ModelNode value, ModuleIdentifier defaultValue) { return value.isDefined() ? ModuleIdentifier.fromString(value.asString()) : defaultValue; }
[ "public", "static", "ModuleIdentifier", "asModuleIdentifier", "(", "ModelNode", "value", ",", "ModuleIdentifier", "defaultValue", ")", "{", "return", "value", ".", "isDefined", "(", ")", "?", "ModuleIdentifier", ".", "fromString", "(", "value", ".", "asString", "(...
Returns the value of the node as a module identifier, or the specified default if the node is undefined. @param value a model node @return the value of the node as a module identifier, or the specified default if the node is undefined.
[ "Returns", "the", "value", "of", "the", "node", "as", "a", "module", "identifier", "or", "the", "specified", "default", "if", "the", "node", "is", "undefined", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/commons/src/main/java/org/infinispan/server/commons/dmr/ModelNodes.java#L102-L104
29,576
infinispan/infinispan
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/configuration/ConfigurationBuilder.java
ConfigurationBuilder.handleNullMarshaller
private void handleNullMarshaller() { try { // First see if marshalling is in the class path - if so we can use the generic marshaller // We have to use the commons class loader, since marshalling is its dependency Class.forName("org.jboss.marshalling.river.RiverMarshaller", false, Util...
java
private void handleNullMarshaller() { try { // First see if marshalling is in the class path - if so we can use the generic marshaller // We have to use the commons class loader, since marshalling is its dependency Class.forName("org.jboss.marshalling.river.RiverMarshaller", false, Util...
[ "private", "void", "handleNullMarshaller", "(", ")", "{", "try", "{", "// First see if marshalling is in the class path - if so we can use the generic marshaller", "// We have to use the commons class loader, since marshalling is its dependency", "Class", ".", "forName", "(", "\"org.jbos...
Method that handles default marshaller - needed as a placeholder
[ "Method", "that", "handles", "default", "marshaller", "-", "needed", "as", "a", "placeholder" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/configuration/ConfigurationBuilder.java#L451-L462
29,577
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/distribution/TxDistributionInterceptor.java
TxDistributionInterceptor.handleTxWriteCommand
private Object handleTxWriteCommand(InvocationContext ctx, AbstractDataWriteCommand command, Object key) throws Throwable { try { if (!ctx.isOriginLocal()) { LocalizedCacheTopology cacheTopology = checkTopologyId(command); // Ignore any remote command when we aren't the o...
java
private Object handleTxWriteCommand(InvocationContext ctx, AbstractDataWriteCommand command, Object key) throws Throwable { try { if (!ctx.isOriginLocal()) { LocalizedCacheTopology cacheTopology = checkTopologyId(command); // Ignore any remote command when we aren't the o...
[ "private", "Object", "handleTxWriteCommand", "(", "InvocationContext", "ctx", ",", "AbstractDataWriteCommand", "command", ",", "Object", "key", ")", "throws", "Throwable", "{", "try", "{", "if", "(", "!", "ctx", ".", "isOriginLocal", "(", ")", ")", "{", "Local...
If we are within one transaction we won't do any replication as replication would only be performed at commit time. If the operation didn't originate locally we won't do any replication either.
[ "If", "we", "are", "within", "one", "transaction", "we", "won", "t", "do", "any", "replication", "as", "replication", "would", "only", "be", "performed", "at", "commit", "time", ".", "If", "the", "operation", "didn", "t", "originate", "locally", "we", "won...
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/distribution/TxDistributionInterceptor.java#L400-L432
29,578
infinispan/infinispan
query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryEngine.java
QueryEngine.buildLuceneQuery
protected <E> CacheQuery<E> buildLuceneQuery(IckleParsingResult<TypeMetadata> ickleParsingResult, Map<String, Object> namedParameters, long startOffset, int maxResults, IndexedQueryMode queryMode) { if (log.isDebugEnabled()) { log.debugf("Building Lucene query for : %s", ickleParsingResult.getQueryString...
java
protected <E> CacheQuery<E> buildLuceneQuery(IckleParsingResult<TypeMetadata> ickleParsingResult, Map<String, Object> namedParameters, long startOffset, int maxResults, IndexedQueryMode queryMode) { if (log.isDebugEnabled()) { log.debugf("Building Lucene query for : %s", ickleParsingResult.getQueryString...
[ "protected", "<", "E", ">", "CacheQuery", "<", "E", ">", "buildLuceneQuery", "(", "IckleParsingResult", "<", "TypeMetadata", ">", "ickleParsingResult", ",", "Map", "<", "String", ",", "Object", ">", "namedParameters", ",", "long", "startOffset", ",", "int", "m...
Build a Lucene index query.
[ "Build", "a", "Lucene", "index", "query", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryEngine.java#L813-L847
29,579
infinispan/infinispan
query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryEngine.java
QueryEngine.makeTypeQuery
protected org.apache.lucene.search.Query makeTypeQuery(org.apache.lucene.search.Query query, String targetEntityName) { return query; }
java
protected org.apache.lucene.search.Query makeTypeQuery(org.apache.lucene.search.Query query, String targetEntityName) { return query; }
[ "protected", "org", ".", "apache", ".", "lucene", ".", "search", ".", "Query", "makeTypeQuery", "(", "org", ".", "apache", ".", "lucene", ".", "search", ".", "Query", "query", ",", "String", "targetEntityName", ")", "{", "return", "query", ";", "}" ]
Enhances the give query with an extra condition to discriminate on entity type. This is a no-op in embedded mode but other query engines could use it to discriminate if more types are stored in the same index. To be overridden by subclasses as needed.
[ "Enhances", "the", "give", "query", "with", "an", "extra", "condition", "to", "discriminate", "on", "entity", "type", ".", "This", "is", "a", "no", "-", "op", "in", "embedded", "mode", "but", "other", "query", "engines", "could", "use", "it", "to", "disc...
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/dsl/embedded/impl/QueryEngine.java#L865-L867
29,580
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/impl/CacheLoaderInterceptor.java
CacheLoaderInterceptor.loadIfNeeded
protected final CompletionStage<Void> loadIfNeeded(final InvocationContext ctx, Object key, final FlagAffectedCommand cmd) { if (skipLoad(cmd, key, ctx)) { return null; } return loadInContext(ctx, key, cmd); }
java
protected final CompletionStage<Void> loadIfNeeded(final InvocationContext ctx, Object key, final FlagAffectedCommand cmd) { if (skipLoad(cmd, key, ctx)) { return null; } return loadInContext(ctx, key, cmd); }
[ "protected", "final", "CompletionStage", "<", "Void", ">", "loadIfNeeded", "(", "final", "InvocationContext", "ctx", ",", "Object", "key", ",", "final", "FlagAffectedCommand", "cmd", ")", "{", "if", "(", "skipLoad", "(", "cmd", ",", "key", ",", "ctx", ")", ...
Loads from the cache loader the entry for the given key. A found value is loaded into the current context. The method returns whether the value was found or not, or even if the cache loader was checked. @param ctx The current invocation's context @param key The key for the entry to look up @param cmd The command that...
[ "Loads", "from", "the", "cache", "loader", "the", "entry", "for", "the", "given", "key", ".", "A", "found", "value", "is", "loaded", "into", "the", "current", "context", ".", "The", "method", "returns", "whether", "the", "value", "was", "found", "or", "n...
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/impl/CacheLoaderInterceptor.java#L342-L348
29,581
infinispan/infinispan
core/src/main/java/org/infinispan/util/Casting.java
Casting.toSerialSupplierCollect
@SuppressWarnings("unchecked") public static <T, R> SerializableSupplier<Collector<T, ?, R>> toSerialSupplierCollect( SerializableSupplier supplier) { return supplier; }
java
@SuppressWarnings("unchecked") public static <T, R> SerializableSupplier<Collector<T, ?, R>> toSerialSupplierCollect( SerializableSupplier supplier) { return supplier; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ",", "R", ">", "SerializableSupplier", "<", "Collector", "<", "T", ",", "?", ",", "R", ">", ">", "toSerialSupplierCollect", "(", "SerializableSupplier", "supplier", ")", "{", "...
since Java doesn't work as well with nested generics
[ "since", "Java", "doesn", "t", "work", "as", "well", "with", "nested", "generics" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/util/Casting.java#L13-L17
29,582
infinispan/infinispan
core/src/main/java/org/infinispan/util/Casting.java
Casting.toSupplierCollect
@SuppressWarnings("unchecked") public static <T, R> Supplier<Collector<T, ?, R>> toSupplierCollect(Supplier supplier) { return supplier; }
java
@SuppressWarnings("unchecked") public static <T, R> Supplier<Collector<T, ?, R>> toSupplierCollect(Supplier supplier) { return supplier; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ",", "R", ">", "Supplier", "<", "Collector", "<", "T", ",", "?", ",", "R", ">", ">", "toSupplierCollect", "(", "Supplier", "supplier", ")", "{", "return", "supplier", ";", ...
This is a hack to allow for cast to work properly, since Java doesn't work as well with nested generics
[ "This", "is", "a", "hack", "to", "allow", "for", "cast", "to", "work", "properly", "since", "Java", "doesn", "t", "work", "as", "well", "with", "nested", "generics" ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/util/Casting.java#L20-L23
29,583
infinispan/infinispan
server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/RemoveAliasCommand.java
RemoveAliasCommand.removeAliasFromList
private ModelNode removeAliasFromList(ModelNode list, String alias) throws OperationFailedException { // check for empty string if (alias == null || alias.equals("")) return list ; // check for undefined list (AS7-3476) if (!list.isDefined()) { throw InfinispanM...
java
private ModelNode removeAliasFromList(ModelNode list, String alias) throws OperationFailedException { // check for empty string if (alias == null || alias.equals("")) return list ; // check for undefined list (AS7-3476) if (!list.isDefined()) { throw InfinispanM...
[ "private", "ModelNode", "removeAliasFromList", "(", "ModelNode", "list", ",", "String", "alias", ")", "throws", "OperationFailedException", "{", "// check for empty string", "if", "(", "alias", "==", "null", "||", "alias", ".", "equals", "(", "\"\"", ")", ")", "...
Remove an alias from a LIST ModelNode of existing aliases. @param list LIST ModelNode of aliases @param alias @return LIST ModelNode with the alias removed
[ "Remove", "an", "alias", "from", "a", "LIST", "ModelNode", "of", "existing", "aliases", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/RemoveAliasCommand.java#L98-L118
29,584
infinispan/infinispan
core/src/main/java/org/infinispan/configuration/cache/IndexingConfiguration.java
IndexingConfiguration.indexShareable
public boolean indexShareable() { TypedProperties properties = properties(); boolean hasRamDirectoryProvider = false; for (Object objKey : properties.keySet()) { String key = (String) objKey; if (key.endsWith(DIRECTORY_PROVIDER_KEY)) { String directoryImplementationName =...
java
public boolean indexShareable() { TypedProperties properties = properties(); boolean hasRamDirectoryProvider = false; for (Object objKey : properties.keySet()) { String key = (String) objKey; if (key.endsWith(DIRECTORY_PROVIDER_KEY)) { String directoryImplementationName =...
[ "public", "boolean", "indexShareable", "(", ")", "{", "TypedProperties", "properties", "=", "properties", "(", ")", ";", "boolean", "hasRamDirectoryProvider", "=", "false", ";", "for", "(", "Object", "objKey", ":", "properties", ".", "keySet", "(", ")", ")", ...
Check if the indexes can be shared. Currently only "ram" based indexes don't allow any sort of sharing. @return false if the index is ram only and thus not shared
[ "Check", "if", "the", "indexes", "can", "be", "shared", ".", "Currently", "only", "ram", "based", "indexes", "don", "t", "allow", "any", "sort", "of", "sharing", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/configuration/cache/IndexingConfiguration.java#L143-L160
29,585
infinispan/infinispan
hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java
Caches.withinTx
public static <T> T withinTx( AdvancedCache cache, Callable<T> c) throws Exception { // Retrieve transaction manager return withinTx( cache.getTransactionManager(), c ); }
java
public static <T> T withinTx( AdvancedCache cache, Callable<T> c) throws Exception { // Retrieve transaction manager return withinTx( cache.getTransactionManager(), c ); }
[ "public", "static", "<", "T", ">", "T", "withinTx", "(", "AdvancedCache", "cache", ",", "Callable", "<", "T", ">", "c", ")", "throws", "Exception", "{", "// Retrieve transaction manager", "return", "withinTx", "(", "cache", ".", "getTransactionManager", "(", "...
Call an operation within a transaction. This method guarantees that the right pattern is used to make sure that the transaction is always either committed or rollback. @param cache instance whose transaction manager to use @param c callable instance to run within a transaction @param <T> type of callable return @retur...
[ "Call", "an", "operation", "within", "a", "transaction", ".", "This", "method", "guarantees", "that", "the", "right", "pattern", "is", "used", "to", "make", "sure", "that", "the", "transaction", "is", "always", "either", "committed", "or", "rollback", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java#L54-L59
29,586
infinispan/infinispan
hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java
Caches.withinTx
public static <T> T withinTx( TransactionManager tm, Callable<T> c) throws Exception { if ( tm == null ) { try { return c.call(); } catch (Exception e) { throw e; } } else { tm.begin(); try { return c.call(); } catch (Exception e) { tm.setRollbackOnly(); throw e; ...
java
public static <T> T withinTx( TransactionManager tm, Callable<T> c) throws Exception { if ( tm == null ) { try { return c.call(); } catch (Exception e) { throw e; } } else { tm.begin(); try { return c.call(); } catch (Exception e) { tm.setRollbackOnly(); throw e; ...
[ "public", "static", "<", "T", ">", "T", "withinTx", "(", "TransactionManager", "tm", ",", "Callable", "<", "T", ">", "c", ")", "throws", "Exception", "{", "if", "(", "tm", "==", "null", ")", "{", "try", "{", "return", "c", ".", "call", "(", ")", ...
Call an operation within a transaction. This method guarantees that the right pattern is used to make sure that the transaction is always either committed or rollbacked. @param tm transaction manager @param c callable instance to run within a transaction @param <T> type of callable return @return returns whatever the ...
[ "Call", "an", "operation", "within", "a", "transaction", ".", "This", "method", "guarantees", "that", "the", "right", "pattern", "is", "used", "to", "make", "sure", "that", "the", "transaction", "is", "always", "either", "committed", "or", "rollbacked", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java#L72-L101
29,587
infinispan/infinispan
hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java
Caches.asyncWriteCache
public static AdvancedCache asyncWriteCache( AdvancedCache cache, Flag extraFlag) { return cache.withFlags( Flag.SKIP_CACHE_LOAD, Flag.SKIP_REMOTE_LOOKUP, Flag.FORCE_ASYNCHRONOUS, extraFlag ); }
java
public static AdvancedCache asyncWriteCache( AdvancedCache cache, Flag extraFlag) { return cache.withFlags( Flag.SKIP_CACHE_LOAD, Flag.SKIP_REMOTE_LOOKUP, Flag.FORCE_ASYNCHRONOUS, extraFlag ); }
[ "public", "static", "AdvancedCache", "asyncWriteCache", "(", "AdvancedCache", "cache", ",", "Flag", "extraFlag", ")", "{", "return", "cache", ".", "withFlags", "(", "Flag", ".", "SKIP_CACHE_LOAD", ",", "Flag", ".", "SKIP_REMOTE_LOOKUP", ",", "Flag", ".", "FORCE_...
Transform a given cache into a cache that writes cache entries without waiting for them to complete, adding an extra flag. @param cache to be transformed @param extraFlag to add to the returned cache @return a cache that writes asynchronously
[ "Transform", "a", "given", "cache", "into", "a", "cache", "that", "writes", "cache", "entries", "without", "waiting", "for", "them", "to", "complete", "adding", "an", "extra", "flag", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java#L158-L167
29,588
infinispan/infinispan
hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java
Caches.failSilentWriteCache
public static AdvancedCache failSilentWriteCache(AdvancedCache cache) { return cache.withFlags( Flag.FAIL_SILENTLY, Flag.ZERO_LOCK_ACQUISITION_TIMEOUT, Flag.SKIP_CACHE_LOAD, Flag.SKIP_REMOTE_LOOKUP ); }
java
public static AdvancedCache failSilentWriteCache(AdvancedCache cache) { return cache.withFlags( Flag.FAIL_SILENTLY, Flag.ZERO_LOCK_ACQUISITION_TIMEOUT, Flag.SKIP_CACHE_LOAD, Flag.SKIP_REMOTE_LOOKUP ); }
[ "public", "static", "AdvancedCache", "failSilentWriteCache", "(", "AdvancedCache", "cache", ")", "{", "return", "cache", ".", "withFlags", "(", "Flag", ".", "FAIL_SILENTLY", ",", "Flag", ".", "ZERO_LOCK_ACQUISITION_TIMEOUT", ",", "Flag", ".", "SKIP_CACHE_LOAD", ",",...
Transform a given cache into a cache that fails silently if cache writes fail. @param cache to be transformed @return a cache that fails silently if cache writes fail
[ "Transform", "a", "given", "cache", "into", "a", "cache", "that", "fails", "silently", "if", "cache", "writes", "fail", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java#L175-L182
29,589
infinispan/infinispan
hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java
Caches.failSilentReadCache
public static AdvancedCache failSilentReadCache(AdvancedCache cache) { return cache.withFlags( Flag.FAIL_SILENTLY, Flag.ZERO_LOCK_ACQUISITION_TIMEOUT ); }
java
public static AdvancedCache failSilentReadCache(AdvancedCache cache) { return cache.withFlags( Flag.FAIL_SILENTLY, Flag.ZERO_LOCK_ACQUISITION_TIMEOUT ); }
[ "public", "static", "AdvancedCache", "failSilentReadCache", "(", "AdvancedCache", "cache", ")", "{", "return", "cache", ".", "withFlags", "(", "Flag", ".", "FAIL_SILENTLY", ",", "Flag", ".", "ZERO_LOCK_ACQUISITION_TIMEOUT", ")", ";", "}" ]
Transform a given cache into a cache that fails silently if cache reads fail. @param cache to be transformed @return a cache that fails silently if cache reads fail
[ "Transform", "a", "given", "cache", "into", "a", "cache", "that", "fails", "silently", "if", "cache", "reads", "fail", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/hibernate/cache-commons/src/main/java/org/infinispan/hibernate/cache/commons/util/Caches.java#L211-L216
29,590
infinispan/infinispan
extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java
CacheStatisticManager.setTransactionOutcome
public final void setTransactionOutcome(boolean commit, GlobalTransaction globalTransaction, boolean local) { TransactionStatistics txs = getTransactionStatistic(globalTransaction, local); if (txs == null) { log.outcomeOnUnexistingTransaction(globalTransaction == null ? "null" : globalTransaction.g...
java
public final void setTransactionOutcome(boolean commit, GlobalTransaction globalTransaction, boolean local) { TransactionStatistics txs = getTransactionStatistic(globalTransaction, local); if (txs == null) { log.outcomeOnUnexistingTransaction(globalTransaction == null ? "null" : globalTransaction.g...
[ "public", "final", "void", "setTransactionOutcome", "(", "boolean", "commit", ",", "GlobalTransaction", "globalTransaction", ",", "boolean", "local", ")", "{", "TransactionStatistics", "txs", "=", "getTransactionStatistic", "(", "globalTransaction", ",", "local", ")", ...
Sets the transaction outcome to commit or rollback, depending if the transaction has commit successfully or not respectively. @param commit {@code true} if the transaction has committed successfully. @param globalTransaction the terminated global transaction. @param local {@code true} if measure...
[ "Sets", "the", "transaction", "outcome", "to", "commit", "or", "rollback", "depending", "if", "the", "transaction", "has", "commit", "successfully", "or", "not", "respectively", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java#L123-L131
29,591
infinispan/infinispan
extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java
CacheStatisticManager.beginTransaction
public final void beginTransaction(GlobalTransaction globalTransaction, boolean local) { if (local) { //Not overriding the InitialValue method leads me to have "null" at the first invocation of get() TransactionStatistics lts = createTransactionStatisticIfAbsent(globalTransaction, true); ...
java
public final void beginTransaction(GlobalTransaction globalTransaction, boolean local) { if (local) { //Not overriding the InitialValue method leads me to have "null" at the first invocation of get() TransactionStatistics lts = createTransactionStatisticIfAbsent(globalTransaction, true); ...
[ "public", "final", "void", "beginTransaction", "(", "GlobalTransaction", "globalTransaction", ",", "boolean", "local", ")", "{", "if", "(", "local", ")", "{", "//Not overriding the InitialValue method leads me to have \"null\" at the first invocation of get()", "TransactionStatis...
Signals the start of a transaction. @param local {@code true} if the transaction is local.
[ "Signals", "the", "start", "of", "a", "transaction", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java#L170-L183
29,592
infinispan/infinispan
extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java
CacheStatisticManager.terminateTransaction
public final void terminateTransaction(GlobalTransaction globalTransaction, boolean local, boolean remote) { TransactionStatistics txs = null; if (local) { txs = removeTransactionStatistic(globalTransaction, true); } if (txs != null) { txs.terminateTransaction(); cach...
java
public final void terminateTransaction(GlobalTransaction globalTransaction, boolean local, boolean remote) { TransactionStatistics txs = null; if (local) { txs = removeTransactionStatistic(globalTransaction, true); } if (txs != null) { txs.terminateTransaction(); cach...
[ "public", "final", "void", "terminateTransaction", "(", "GlobalTransaction", "globalTransaction", ",", "boolean", "local", ",", "boolean", "remote", ")", "{", "TransactionStatistics", "txs", "=", "null", ";", "if", "(", "local", ")", "{", "txs", "=", "removeTran...
Signals the ending of a transaction. After this, no more statistics are updated for this transaction and the values measured are merged with the cache statistics. @param local {@code true} if the transaction is local. @param remote {@code true} if the transaction is remote.
[ "Signals", "the", "ending", "of", "a", "transaction", ".", "After", "this", "no", "more", "statistics", "are", "updated", "for", "this", "transaction", "and", "the", "values", "measured", "are", "merged", "with", "the", "cache", "statistics", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/extended-statistics/src/main/java/org/infinispan/stats/CacheStatisticManager.java#L192-L210
29,593
infinispan/infinispan
query/src/main/java/org/infinispan/query/affinity/FixedShardsDistribution.java
FixedShardsDistribution.populateSegments
private void populateSegments(int[] shardsNumPerServer, List<Set<Integer>> segmentsPerServer, List<Address> nodes) { int shardId = 0; int n = 0; Set<Integer> remainingSegments = new HashSet<>(); for (Address node : nodes) { Collection<Integer> primarySegments = segmentsPerServer.get(n);...
java
private void populateSegments(int[] shardsNumPerServer, List<Set<Integer>> segmentsPerServer, List<Address> nodes) { int shardId = 0; int n = 0; Set<Integer> remainingSegments = new HashSet<>(); for (Address node : nodes) { Collection<Integer> primarySegments = segmentsPerServer.get(n);...
[ "private", "void", "populateSegments", "(", "int", "[", "]", "shardsNumPerServer", ",", "List", "<", "Set", "<", "Integer", ">", ">", "segmentsPerServer", ",", "List", "<", "Address", ">", "nodes", ")", "{", "int", "shardId", "=", "0", ";", "int", "n", ...
Associates segments to each shard. @param shardsNumPerServer numbers of shards allocated for each server @param segmentsPerServer the primary owned segments of each server @param nodes the members of the cluster
[ "Associates", "segments", "to", "each", "shard", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/affinity/FixedShardsDistribution.java#L66-L92
29,594
infinispan/infinispan
query/src/main/java/org/infinispan/query/affinity/FixedShardsDistribution.java
FixedShardsDistribution.allocateShardsToNodes
private static int[] allocateShardsToNodes(int numShards, int numNodes, List<Set<Integer>> weightPerServer) { int[] shardsPerServer = new int[numNodes]; Iterator<Integer> cyclicNodeIterator = Stream.iterate(0, i -> (i + 1) % numNodes).iterator(); while (numShards > 0) { int slot = cyclicNodeI...
java
private static int[] allocateShardsToNodes(int numShards, int numNodes, List<Set<Integer>> weightPerServer) { int[] shardsPerServer = new int[numNodes]; Iterator<Integer> cyclicNodeIterator = Stream.iterate(0, i -> (i + 1) % numNodes).iterator(); while (numShards > 0) { int slot = cyclicNodeI...
[ "private", "static", "int", "[", "]", "allocateShardsToNodes", "(", "int", "numShards", ",", "int", "numNodes", ",", "List", "<", "Set", "<", "Integer", ">", ">", "weightPerServer", ")", "{", "int", "[", "]", "shardsPerServer", "=", "new", "int", "[", "n...
Allocates shards in a round robin fashion for the servers, ignoring those without segments. @return int[] with the number of shards per server
[ "Allocates", "shards", "in", "a", "round", "robin", "fashion", "for", "the", "servers", "ignoring", "those", "without", "segments", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/query/src/main/java/org/infinispan/query/affinity/FixedShardsDistribution.java#L99-L110
29,595
infinispan/infinispan
core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java
JGroupsTransport.sendCommandToAll
private void sendCommandToAll(ReplicableCommand command, long requestId, DeliverOrder deliverOrder, boolean rsvp) { Message message = new Message(); marshallRequest(message, command, requestId); setMessageFlags(message, deliverOrder, rsvp, true); if (deliverOrder == DeliverOrder.TOTAL) { ...
java
private void sendCommandToAll(ReplicableCommand command, long requestId, DeliverOrder deliverOrder, boolean rsvp) { Message message = new Message(); marshallRequest(message, command, requestId); setMessageFlags(message, deliverOrder, rsvp, true); if (deliverOrder == DeliverOrder.TOTAL) { ...
[ "private", "void", "sendCommandToAll", "(", "ReplicableCommand", "command", ",", "long", "requestId", ",", "DeliverOrder", "deliverOrder", ",", "boolean", "rsvp", ")", "{", "Message", "message", "=", "new", "Message", "(", ")", ";", "marshallRequest", "(", "mess...
Send a command to the entire cluster. Doesn't send the command to itself unless {@code deliverOrder == TOTAL}.
[ "Send", "a", "command", "to", "the", "entire", "cluster", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java#L1163-L1173
29,596
infinispan/infinispan
core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java
JGroupsTransport.sendCommand
private void sendCommand(Collection<Address> targets, ReplicableCommand command, long requestId, DeliverOrder deliverOrder, boolean rsvp, boolean checkView) { Objects.requireNonNull(targets); Message message = new Message(); marshallRequest(message, command, requestId); ...
java
private void sendCommand(Collection<Address> targets, ReplicableCommand command, long requestId, DeliverOrder deliverOrder, boolean rsvp, boolean checkView) { Objects.requireNonNull(targets); Message message = new Message(); marshallRequest(message, command, requestId); ...
[ "private", "void", "sendCommand", "(", "Collection", "<", "Address", ">", "targets", ",", "ReplicableCommand", "command", ",", "long", "requestId", ",", "DeliverOrder", "deliverOrder", ",", "boolean", "rsvp", ",", "boolean", "checkView", ")", "{", "Objects", "."...
Send a command to multiple targets. Doesn't send the command to itself unless {@code deliverOrder == TOTAL}.
[ "Send", "a", "command", "to", "multiple", "targets", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsTransport.java#L1216-L1246
29,597
infinispan/infinispan
server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheContainerConfigurationBuilder.java
CacheContainerConfigurationBuilder.makeGlobalClassLoader
private ClassLoader makeGlobalClassLoader(ModuleLoader moduleLoader, ModuleIdentifier cacheContainerModule, List<ModuleIdentifier> additionalModules) throws ModuleLoadException { Set<ClassLoader> classLoaders = new LinkedHashSet<>(); // use an ordered set to deduplicate possible duplicates! if (cacheCo...
java
private ClassLoader makeGlobalClassLoader(ModuleLoader moduleLoader, ModuleIdentifier cacheContainerModule, List<ModuleIdentifier> additionalModules) throws ModuleLoadException { Set<ClassLoader> classLoaders = new LinkedHashSet<>(); // use an ordered set to deduplicate possible duplicates! if (cacheCo...
[ "private", "ClassLoader", "makeGlobalClassLoader", "(", "ModuleLoader", "moduleLoader", ",", "ModuleIdentifier", "cacheContainerModule", ",", "List", "<", "ModuleIdentifier", ">", "additionalModules", ")", "throws", "ModuleLoadException", "{", "Set", "<", "ClassLoader", "...
Creates an aggregated ClassLoader using the loaders of the cache container module and the optional modules listed under the 'modules' element. @param moduleLoader the ModuleLoader @param cacheContainerModule the (optional) module identifier from the 'module' attribute of the cache-container @param additionalMo...
[ "Creates", "an", "aggregated", "ClassLoader", "using", "the", "loaders", "of", "the", "cache", "container", "module", "and", "the", "optional", "modules", "listed", "under", "the", "modules", "element", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/server/integration/infinispan/src/main/java/org/jboss/as/clustering/infinispan/subsystem/CacheContainerConfigurationBuilder.java#L291-L314
29,598
infinispan/infinispan
core/src/main/java/org/infinispan/distribution/topologyaware/TopologyInfo.java
TopologyInfo.splitExpectedOwnedSegments
private void splitExpectedOwnedSegments(Collection<? extends Location> locations, float totalOwnedSegments, float totalCapacity) { float remainingCapacity = totalCapacity; float remainingOwned = totalOwnedSegments; // First pass, assign expected owned segmen...
java
private void splitExpectedOwnedSegments(Collection<? extends Location> locations, float totalOwnedSegments, float totalCapacity) { float remainingCapacity = totalCapacity; float remainingOwned = totalOwnedSegments; // First pass, assign expected owned segmen...
[ "private", "void", "splitExpectedOwnedSegments", "(", "Collection", "<", "?", "extends", "Location", ">", "locations", ",", "float", "totalOwnedSegments", ",", "float", "totalCapacity", ")", "{", "float", "remainingCapacity", "=", "totalCapacity", ";", "float", "rem...
Split totalOwnedSegments segments into the given locations recursively. @param locations List of locations of the same level, sorted descending by capacity factor
[ "Split", "totalOwnedSegments", "segments", "into", "the", "given", "locations", "recursively", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/distribution/topologyaware/TopologyInfo.java#L228-L292
29,599
infinispan/infinispan
counter/src/main/java/org/infinispan/counter/impl/listener/CounterManagerNotificationManager.java
CounterManagerNotificationManager.registerCounter
public void registerCounter(ByteString counterName, CounterEventGenerator generator, TopologyChangeListener topologyChangeListener) { if (counters.putIfAbsent(counterName, new Holder(generator, topologyChangeListener)) != null) { throw new IllegalStateException(); } }
java
public void registerCounter(ByteString counterName, CounterEventGenerator generator, TopologyChangeListener topologyChangeListener) { if (counters.putIfAbsent(counterName, new Holder(generator, topologyChangeListener)) != null) { throw new IllegalStateException(); } }
[ "public", "void", "registerCounter", "(", "ByteString", "counterName", ",", "CounterEventGenerator", "generator", ",", "TopologyChangeListener", "topologyChangeListener", ")", "{", "if", "(", "counters", ".", "putIfAbsent", "(", "counterName", ",", "new", "Holder", "(...
It registers a new counter created locally. @param counterName The counter's name. @param generator The counter's {@link CounterEvent} generator. @param topologyChangeListener The counter's listener to topology change. It can be {@code null}. @throws IllegalStateException If the counter with th...
[ "It", "registers", "a", "new", "counter", "created", "locally", "." ]
7c62b94886c3febb4774ae8376acf2baa0265ab5
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/counter/src/main/java/org/infinispan/counter/impl/listener/CounterManagerNotificationManager.java#L89-L94