_id
stringlengths
2
7
title
stringlengths
3
140
partition
stringclasses
3 values
text
stringlengths
73
34.1k
language
stringclasses
1 value
meta_information
dict
q23800
CacheStoreFactoryRegistry.createInstance
train
public Object createInstance(StoreConfiguration storeConfiguration) { for(CacheStoreFactory factory : factories) { Object instance = factory.createInstance(storeConfiguration); if(instance != null) { return instance; } } throw log.unableToInstantiateClass(storeCo...
java
{ "resource": "" }
q23801
CacheStoreFactoryRegistry.addCacheStoreFactory
train
public void addCacheStoreFactory(CacheStoreFactory cacheStoreFactory) { if(cacheStoreFactory == null) { throw log.unableToAddNullCustomStore(); } factories.add(0, cacheStoreFactory); }
java
{ "resource": "" }
q23802
CliCommandBuffer.append
train
public final boolean append(String commandString, int nesting) { this.nesting += nesting; buffer.append(commandString); return this.nesting == 0; }
java
{ "resource": "" }
q23803
LocalTopologyManagerImpl.stop
train
@Stop(priority = 110) public void stop() { if (trace) { log.tracef("Stopping LocalTopologyManager on %s", transport.getAddress()); } running = false; for (LocalCacheStatus cache : runningCaches.values()) { cache.getTopologyUpdatesExecutor().shutdownNow(); } withi...
java
{ "resource": "" }
q23804
LocalTopologyManagerImpl.handleStatusRequest
train
@Override public ManagerStatusResponse handleStatusRequest(int viewId) { try { // As long as we have an older view, we can still process topologies from the old coordinator waitForView(viewId, getGlobalTimeout(), TimeUnit.MILLISECONDS); } catch (InterruptedException e) { // Shu...
java
{ "resource": "" }
q23805
LocalTopologyManagerImpl.doHandleTopologyUpdate
train
private boolean doHandleTopologyUpdate(String cacheName, CacheTopology cacheTopology, AvailabilityMode availabilityMode, int viewId, Address sender, LocalCacheStatus cacheStatus) { try { waitForView(viewId, cacheStatus.ge...
java
{ "resource": "" }
q23806
LocalTopologyManagerImpl.validateCommandViewId
train
@GuardedBy("runningCaches") private boolean validateCommandViewId(CacheTopology cacheTopology, int viewId, Address sender, String cacheName) { if (!sender.equals(transport.getCoordinator())) { log.debugf("Ignoring topology %d for cache %s from old coordinator %s", cacheTopology...
java
{ "resource": "" }
q23807
AuthenticationConfigurationBuilder.saslProperties
train
public AuthenticationConfigurationBuilder saslProperties(Map<String, String> saslProperties) { this.attributes.attribute(SASL_PROPERTIES).set(saslProperties); return this; }
java
{ "resource": "" }
q23808
CacheCollectors.serializableCollector
train
public static <T, R> Collector<T, ?, R> serializableCollector(SerializableSupplier<Collector<T, ?, R>> supplier) { return new CollectorSupplier<>(supplier); }
java
{ "resource": "" }
q23809
RouterConfigurationBuilder.build
train
public RouterConfiguration build() { return new RouterConfiguration(routingBuilder.build(), hotRodRouterBuilder.build(), restRouterBuilder.build(), singlePortRouterBuilder.build()); }
java
{ "resource": "" }
q23810
ExpirationManagerImpl.initialize
train
void initialize(ScheduledExecutorService executor, String cacheName, Configuration cfg) { this.executor = executor; this.configuration = cfg; this.cacheName = cacheName; }
java
{ "resource": "" }
q23811
PredicateOptimisations.comparePrimaryPredicates
train
public static int comparePrimaryPredicates(boolean isFirstNegated, PrimaryPredicateExpr first, boolean isSecondNegated, PrimaryPredicateExpr second) { if (first.getClass() == second.getClass()) { if (first instanceof ComparisonExpr) { ComparisonExpr comparison1 = (ComparisonExpr) first; ...
java
{ "resource": "" }
q23812
InterceptorConfigurationBuilder.interceptorClass
train
public InterceptorConfigurationBuilder interceptorClass(Class<? extends AsyncInterceptor> interceptorClass) { attributes.attribute(INTERCEPTOR_CLASS).set(interceptorClass); return this; }
java
{ "resource": "" }
q23813
InterceptorConfigurationBuilder.withProperties
train
public InterceptorConfigurationBuilder withProperties(Properties properties) { attributes.attribute(PROPERTIES).set(TypedProperties.toTypedProperties(properties)); return this; }
java
{ "resource": "" }
q23814
InterceptorConfigurationBuilder.clearProperties
train
public InterceptorConfigurationBuilder clearProperties() { TypedProperties properties = attributes.attribute(PROPERTIES).get(); properties.clear(); attributes.attribute(PROPERTIES).set(TypedProperties.toTypedProperties(properties)); return this; }
java
{ "resource": "" }
q23815
LuceneCacheLoader.getDirectory
train
private DirectoryLoaderAdaptor getDirectory(final String indexName) { DirectoryLoaderAdaptor adapter = openDirectories.get(indexName); if (adapter == null) { synchronized (openDirectories) { adapter = openDirectories.get(indexName); if (adapter == null) { fina...
java
{ "resource": "" }
q23816
LuceneCacheLoader.openLuceneDirectory
train
private FSDirectory openLuceneDirectory(final File path) { try { return FSDirectory.open(path.toPath()); } catch (IOException e) { throw log.exceptionInCacheLoader(e); } }
java
{ "resource": "" }
q23817
Streams.copyb
train
public static long copyb(InputStream input, OutputStream output) throws IOException { if (!(input instanceof BufferedInputStream)) { input = new BufferedInputStream(input); } if (!(output instanceof BufferedOutputStream)) { output = new BufferedO...
java
{ "resource": "" }
q23818
BeanBuilder.addQualifiers
train
public BeanBuilder<T> addQualifiers(Annotation... qualifiers) { this.qualifiers.addAll(Arrays2.asSet(qualifiers)); return this; }
java
{ "resource": "" }
q23819
BeanBuilder.addTypes
train
public BeanBuilder<T> addTypes(Type... types) { this.types.addAll(Arrays2.asSet(types)); return this; }
java
{ "resource": "" }
q23820
BasicEventLogger.getEvents
train
@Override public List<EventLog> getEvents(Instant start, int count, Optional<EventLogCategory> category, Optional<EventLogLevel> level) { return Collections.emptyList(); }
java
{ "resource": "" }
q23821
IndexingConfigurationBuilder.enable
train
@Deprecated public IndexingConfigurationBuilder enable() { Attribute<Index> index = attributes.attribute(INDEX); if (index.get() == Index.NONE) index.set(Index.ALL); return this; }
java
{ "resource": "" }
q23822
IndexingConfigurationBuilder.enabled
train
@Deprecated public IndexingConfigurationBuilder enabled(boolean enabled) { Attribute<Index> index = attributes.attribute(INDEX); if (index.get() == Index.NONE & enabled) index.set(Index.ALL); else if (!enabled) index.set(Index.NONE); return this; }
java
{ "resource": "" }
q23823
IndexingConfigurationBuilder.indexLocalOnly
train
@Deprecated public IndexingConfigurationBuilder indexLocalOnly(boolean b) { if (b) attributes.attribute(INDEX).set(Index.LOCAL); return this; }
java
{ "resource": "" }
q23824
IndexingConfigurationBuilder.addKeyTransformer
train
public IndexingConfigurationBuilder addKeyTransformer(Class<?> keyClass, Class<?> keyTransformerClass) { Map<Class<?>, Class<?>> indexedEntities = keyTransformers(); indexedEntities.put(keyClass, keyTransformerClass); attributes.attribute(KEY_TRANSFORMERS).set(indexedEntities); return this; }
java
{ "resource": "" }
q23825
OsgiClassLoader.findClass
train
@Override @SuppressWarnings("rawtypes") protected Class<?> findClass(String name) throws ClassNotFoundException { if (classCache.containsKey(name)) { return classCache.get(name); } for (WeakReference<Bundle> ref : bundles) { final Bundle bundle = ref.get(); // ISPN-46...
java
{ "resource": "" }
q23826
OsgiClassLoader.findResource
train
@Override protected URL findResource(String name) { if (resourceCache.containsKey(name)) { return resourceCache.get(name); } for (WeakReference<Bundle> ref : bundles) { final Bundle bundle = ref.get(); if (bundle != null && bundle.getState() == Bundle.ACTIVE) { ...
java
{ "resource": "" }
q23827
OsgiClassLoader.findResources
train
@Override @SuppressWarnings("unchecked") protected Enumeration<URL> findResources(String name) { final List<Enumeration<URL>> enumerations = new ArrayList<>(); for (WeakReference<Bundle> ref : bundles) { final Bundle bundle = ref.get(); if (bundle != null && bundle.getState() == Bun...
java
{ "resource": "" }
q23828
StateConsumerImpl.stopApplyingState
train
@Override public void stopApplyingState(int topologyId) { if (trace) log.tracef("Stop keeping track of changed keys for state transfer in topology %d", topologyId); commitManager.stopTrack(PUT_FOR_STATE_TRANSFER); }
java
{ "resource": "" }
q23829
StateConsumerImpl.start
train
@Start(priority = 20) public void start() { cacheName = cache.wired().getName(); isInvalidationMode = configuration.clustering().cacheMode().isInvalidation(); isTransactional = configuration.transaction().transactionMode().isTransactional(); isTotalOrder = configuration.transaction().transact...
java
{ "resource": "" }
q23830
StateConsumerImpl.cancelTransfers
train
protected void cancelTransfers(IntSet removedSegments) { synchronized (transferMapsLock) { List<Integer> segmentsToCancel = new ArrayList<>(removedSegments); while (!segmentsToCancel.isEmpty()) { int segmentId = segmentsToCancel.remove(0); List<InboundTransferTask> inboun...
java
{ "resource": "" }
q23831
StateConsumerImpl.restartBrokenTransfers
train
private void restartBrokenTransfers(CacheTopology cacheTopology, IntSet addedSegments) { Set<Address> members = new HashSet<>(cacheTopology.getReadConsistentHash().getMembers()); synchronized (transferMapsLock) { for (Iterator<Map.Entry<Address, List<InboundTransferTask>>> it = transfersBySource.en...
java
{ "resource": "" }
q23832
AbstractLockingInterceptor.visitNonTxDataWriteCommand
train
final Object visitNonTxDataWriteCommand(InvocationContext ctx, DataWriteCommand command) { if (hasSkipLocking(command) || !shouldLockKey(command)) { return invokeNext(ctx, command); } LockPromise lockPromise = lockAndRecord(ctx, command.getKey(), getLockTimeoutMillis(command)); return ...
java
{ "resource": "" }
q23833
AbstractLockingInterceptor.nonTxLockAndInvokeNext
train
protected final Object nonTxLockAndInvokeNext(InvocationContext ctx, VisitableCommand command, LockPromise lockPromise, InvocationFinallyAction finallyFunction) { return lockPromise.toInvocationStage().andHandle(ctx, command, (rCtx, rCommand, rv, throwable) -> { if (throwable != null) { ...
java
{ "resource": "" }
q23834
InvalidationCacheAccessDelegate.get
train
@Override @SuppressWarnings("UnusedParameters") public Object get(Object session, Object key, long txTimestamp) throws CacheException { if ( !region.checkValid() ) { return null; } final Object val = cache.get( key ); if (val == null && session != null) { putValidator.registerPendingPut(session, key, tx...
java
{ "resource": "" }
q23835
InvalidationCacheAccessDelegate.putFromLoad
train
@Override @SuppressWarnings("UnusedParameters") public boolean putFromLoad(Object session, Object key, Object value, long txTimestamp, Object version, boolean minimalPutOverride) throws CacheException { if ( !region.checkValid() ) { if (trace) { log.tracef( "Region %s not valid", region.getName() ); } ...
java
{ "resource": "" }
q23836
SimpleCacheImpl.isNull
train
private boolean isNull(InternalCacheEntry<K, V> entry) { if (entry == null) { return true; } else if (entry.canExpire()) { if (entry.isExpired(timeService.wallClockTime())) { if (cacheNotifier.hasListener(CacheEntryExpired.class)) { CompletionStages.join(cacheNot...
java
{ "resource": "" }
q23837
SimpleCacheImpl.cacheStreamCast
train
private static <K, V> CacheStream<Entry<K, V>> cacheStreamCast(CacheStream stream) { return stream; }
java
{ "resource": "" }
q23838
Machine.contractStates
train
public void contractStates() { boolean contracted; do { contracted = false; for (Iterator<State> iterator = states.iterator(); iterator.hasNext(); ) { State s = iterator.next(); if (s.links.size() == 1 && s.links.get(0).type == LinkType.BACKTRACK) { L...
java
{ "resource": "" }
q23839
JmxUtil.buildJmxDomain
train
public static String buildJmxDomain(String domain, MBeanServer mBeanServer, String groupName) { return findJmxDomain(domain, mBeanServer, groupName); }
java
{ "resource": "" }
q23840
JmxUtil.registerMBean
train
public static void registerMBean(Object mbean, ObjectName objectName, MBeanServer mBeanServer) throws Exception { if (!mBeanServer.isRegistered(objectName)) { try { SecurityActions.registerMBean(mbean, objectName, mBeanServer); log.tracef("Registered %s under %s", mbean, objectNam...
java
{ "resource": "" }
q23841
JmxUtil.unregisterMBeans
train
public static int unregisterMBeans(String filter, MBeanServer mBeanServer) { try { ObjectName filterObjName = new ObjectName(filter); Set<ObjectInstance> mbeans = mBeanServer.queryMBeans(filterObjName, null); for (ObjectInstance mbean : mbeans) { ObjectName name = mbean.getO...
java
{ "resource": "" }
q23842
LifecycleManager.cacheStarting
train
@Override public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) { InternalCacheRegistry icr = cr.getGlobalComponentRegistry().getComponent(InternalCacheRegistry.class); if (!icr.isInternalCache(cacheName) || icr.internalCacheHasFlag(cacheName, Flag.QUERYABLE)) { Ad...
java
{ "resource": "" }
q23843
LifecycleManager.checkIndexableClasses
train
private void checkIndexableClasses(SearchIntegrator searchFactory, Set<Class<?>> indexedEntities) { for (Class<?> c : indexedEntities) { if (searchFactory.getIndexBinding(new PojoIndexedTypeIdentifier(c)) == null) { throw log.classNotIndexable(c.getName()); } } }
java
{ "resource": "" }
q23844
LifecycleManager.registerQueryMBeans
train
private void registerQueryMBeans(ComponentRegistry cr, Configuration cfg, SearchIntegrator searchIntegrator) { AdvancedCache<?, ?> cache = cr.getComponent(Cache.class).getAdvancedCache(); // Resolve MBean server instance GlobalJmxStatisticsConfiguration jmxConfig = cr.getGlobalComponentRegistry().getG...
java
{ "resource": "" }
q23845
LifecycleManager.makeAggregatedClassLoader
train
private ClassLoader makeAggregatedClassLoader(ClassLoader globalClassLoader) { // use an ordered set to deduplicate them Set<ClassLoader> classLoaders = new LinkedHashSet<>(6); // add the cache manager's CL if (globalClassLoader != null) { classLoaders.add(globalClassLoader); } ...
java
{ "resource": "" }
q23846
LifecycleManager.unregisterQueryMBeans
train
private void unregisterQueryMBeans(ComponentRegistry cr, String cacheName) { if (mbeanServer != null) { try { InfinispanQueryStatisticsInfo stats = cr.getComponent(InfinispanQueryStatisticsInfo.class); if (stats != null) { GlobalJmxStatisticsConfiguration jmxConfig ...
java
{ "resource": "" }
q23847
CommitManager.stopTrack
train
public final void stopTrack(Flag track) { setTrack(track, false); if (!trackStateTransfer && !trackXSiteStateTransfer) { if (trace) { log.tracef("Tracking is disabled. Clear tracker: %s", tracker); } tracker.clear(); } else { for (Iterator<Map.Entry<Obje...
java
{ "resource": "" }
q23848
CommitManager.commit
train
public final void commit(final CacheEntry entry, final Flag operation, int segment, boolean l1Only, InvocationContext ctx) { if (trace) { log.tracef("Trying to commit. Key=%s. Operation Flag=%s, L1 write/invalidation=%s", toStr(entry.getKey()), operation, l1Only...
java
{ "resource": "" }
q23849
TransactionalSharedLuceneLock.commitTransactions
train
private void commitTransactions() throws IOException { try { tm.commit(); } catch (Exception e) { log.unableToCommitTransaction(e); throw new IOException("SharedLuceneLock could not commit a transaction", e); } if (trace) { log.tracef("Batch transaction ...
java
{ "resource": "" }
q23850
TransactionalSharedLuceneLock.clearLockSuspending
train
public void clearLockSuspending() { Transaction tx = null; try { // if there is an ongoing transaction we need to suspend it if ((tx = tm.getTransaction()) != null) { tm.suspend(); } clearLock(); } catch (Exception e) { log.errorSuspending...
java
{ "resource": "" }
q23851
DummyBaseTransactionManager.begin
train
@Override public void begin() throws NotSupportedException, SystemException { Transaction currentTx; if ((currentTx = getTransaction()) != null) throw new NotSupportedException(Thread.currentThread() + " is already associated with a transaction (" + currentTx + ")"); DummyTr...
java
{ "resource": "" }
q23852
DummyBaseTransactionManager.commit
train
@Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { DummyTransaction tx = getTransaction(); if (tx == null) throw ne...
java
{ "resource": "" }
q23853
DummyBaseTransactionManager.rollback
train
@Override public void rollback() throws IllegalStateException, SecurityException, SystemException { Transaction tx = getTransaction(); if (tx == null) throw new IllegalStateException("no transaction associated with thread"); tx.rollback(); // Disasso...
java
{ "resource": "" }
q23854
DummyBaseTransactionManager.setRollbackOnly
train
@Override public void setRollbackOnly() throws IllegalStateException, SystemException { Transaction tx = getTransaction(); if (tx == null) throw new IllegalStateException("no transaction associated with calling thread"); tx.setRollbackOnly(); }
java
{ "resource": "" }
q23855
DummyBaseTransactionManager.suspend
train
@Override public Transaction suspend() throws SystemException { Transaction retval = getTransaction(); setTransaction(null); if (trace) log.tracef("Suspending tx %s", retval); return retval; }
java
{ "resource": "" }
q23856
DummyBaseTransactionManager.resume
train
@Override public void resume(Transaction tx) throws InvalidTransactionException, IllegalStateException, SystemException { if (trace) log.tracef("Resuming tx %s", tx); setTransaction(tx); }
java
{ "resource": "" }
q23857
QueryInterceptor.removeFromIndexes
train
void removeFromIndexes(TransactionContext transactionContext, Object key) { Stream<IndexedTypeIdentifier> typeIdentifiers = getKnownClasses().stream() .filter(searchFactoryHandler::hasIndex) .map(PojoIndexedTypeIdentifier::new); Set<Work> deleteWorks = typeIdentifiers .ma...
java
{ "resource": "" }
q23858
QueryInterceptor.removeFromIndexes
train
private void removeFromIndexes(Object value, Object key, TransactionContext transactionContext) { performSearchWork(value, keyToString(key), WorkType.DELETE, transactionContext); }
java
{ "resource": "" }
q23859
BaseCounterOperation.sendHeaderAndCounterNameAndRead
train
void sendHeaderAndCounterNameAndRead(Channel channel) { ByteBuf buf = getHeaderAndCounterNameBufferAndRead(channel, 0); channel.writeAndFlush(buf); }
java
{ "resource": "" }
q23860
AbstractInternalDataContainer.filterExpiredEntries
train
protected Spliterator<InternalCacheEntry<K, V>> filterExpiredEntries(Spliterator<InternalCacheEntry<K, V>> spliterator) { // This way we only read the wall clock time at the beginning long accessTime = timeService.wallClockTime(); return new FilterSpliterator<>(spliterator, expiredIterationPredicate(a...
java
{ "resource": "" }
q23861
AbstractInternalDataContainer.expiredIterationPredicate
train
protected Predicate<InternalCacheEntry<K, V>> expiredIterationPredicate(long accessTime) { return e -> ! e.canExpire() || ! (e.isExpired(accessTime) && expirationManager.entryExpiredInMemoryFromIteration(e, accessTime).join() == Boolean.TRUE); }
java
{ "resource": "" }
q23862
TransactionRequestProcessor.rollbackTransaction
train
void rollbackTransaction(HotRodHeader header, Subject subject, XidImpl xid) { RollbackTransactionOperation operation = new RollbackTransactionOperation(header, server, subject, xid, this::writeTransactionResponse); executor.execute(operation); }
java
{ "resource": "" }
q23863
TransactionRequestProcessor.commitTransaction
train
void commitTransaction(HotRodHeader header, Subject subject, XidImpl xid) { CommitTransactionOperation operation = new CommitTransactionOperation(header, server, subject, xid, this::writeTransactionResponse); executor.execute(operation); }
java
{ "resource": "" }
q23864
TransactionRequestProcessor.prepareTransaction
train
void prepareTransaction(HotRodHeader header, Subject subject, XidImpl xid, boolean onePhaseCommit, List<TransactionWrite> writes, boolean recoverable, long timeout) { HotRodServer.CacheInfo cacheInfo = server.getCacheInfo(header); AdvancedCache<byte[], byte[]> cache = server.cache(cacheInfo, header...
java
{ "resource": "" }
q23865
TransactionRequestProcessor.isValid
train
private boolean isValid(TransactionWrite write, AdvancedCache<byte[], byte[]> readCache) { if (write.skipRead()) { if (isTrace) { log.tracef("Operation %s wasn't read.", write); } return true; } CacheEntry<byte[], byte[]> entry = readCache.getCacheEntry(write.key...
java
{ "resource": "" }
q23866
QueryParser.parseQuery
train
public CommonTree parseQuery(String queryString, QueryResolverDelegate resolverDelegate, QueryRendererDelegate rendererDelegate) throws ParsingException { IckleLexer lexer = new IckleLexer(new ANTLRStringStream(queryString)); CommonTokenStream tokens = new CommonTokenStream(lexer); IckleParser parser ...
java
{ "resource": "" }
q23867
WrappedByteArrayOrPrimitiveMapper.serializeObj
train
private String serializeObj(WrappedByteArray mv) throws Exception { return Base64.getEncoder().encodeToString(mv.getBytes()); }
java
{ "resource": "" }
q23868
WrappedByteArrayOrPrimitiveMapper.deserializeObj
train
private WrappedByteArray deserializeObj(String key) throws Exception { byte[] data = Base64.getDecoder().decode(key); return new WrappedByteArray(data); }
java
{ "resource": "" }
q23869
IntSets.from
train
public static IntSet from(Set<Integer> integerSet) { if (integerSet instanceof IntSet) { return (IntSet) integerSet; } int size = integerSet.size(); switch (size) { case 0: return EmptyIntSet.getInstance(); case 1: return new SingletonIntSet(int...
java
{ "resource": "" }
q23870
IntSets.from
train
public static IntSet from(PrimitiveIterator.OfInt iterator) { boolean hasNext = iterator.hasNext(); if (!hasNext) { return EmptyIntSet.getInstance(); } int firstValue = iterator.nextInt(); hasNext = iterator.hasNext(); if (!hasNext) { return new SingletonIntSet(firs...
java
{ "resource": "" }
q23871
IntSets.mutableFrom
train
public static IntSet mutableFrom(Set<Integer> integerSet) { if (integerSet instanceof SmallIntSet) { return (SmallIntSet) integerSet; } if (integerSet instanceof ConcurrentSmallIntSet) { return (ConcurrentSmallIntSet) integerSet; } return mutableCopyFrom(integerSet); }
java
{ "resource": "" }
q23872
IntSets.mutableCopyFrom
train
public static IntSet mutableCopyFrom(Set<Integer> mutableSet) { if (mutableSet instanceof SingletonIntSet) { return mutableSet(((SingletonIntSet) mutableSet).value); } return new SmallIntSet(mutableSet); }
java
{ "resource": "" }
q23873
IntSets.concurrentCopyFrom
train
public static IntSet concurrentCopyFrom(IntSet intSet, int maxExclusive) { ConcurrentSmallIntSet cis = new ConcurrentSmallIntSet(maxExclusive); intSet.forEach((IntConsumer) cis::set); return cis; }
java
{ "resource": "" }
q23874
RIMBeanServerRegistrationUtility.isRegistered
train
static <K, V> boolean isRegistered(AbstractJCache<K, V> cache, ObjectNameType objectNameType) { Set<ObjectName> registeredObjectNames; MBeanServer mBeanServer = cache.getMBeanServer(); if (mBeanServer != null) { ObjectName objectName = calculateObjectName(cache, objectNameType); reg...
java
{ "resource": "" }
q23875
RemoteCacheManager.getCache
train
@Override public <K, V> RemoteCache<K, V> getCache(String cacheName) { return getCache(cacheName, configuration.forceReturnValues(), null, null); }
java
{ "resource": "" }
q23876
RemoteCacheManager.getCache
train
@Override public <K, V> RemoteCache<K, V> getCache() { return getCache(configuration.forceReturnValues()); }
java
{ "resource": "" }
q23877
RemoteCacheManager.stop
train
@Override public void stop() { if (isStarted()) { log.debugf("Stopping remote cache manager %x", System.identityHashCode(this)); synchronized (cacheName2RemoteCache) { for(Map.Entry<RemoteCacheKey, RemoteCacheHolder> cache : cacheName2RemoteCache.entrySet()) { cache...
java
{ "resource": "" }
q23878
RemoteCacheManager.initRemoteCache
train
private void initRemoteCache(RemoteCacheImpl remoteCache, OperationsFactory operationsFactory) { if (configuration.statistics().jmxEnabled()) { remoteCache.init(marshaller, operationsFactory, configuration.keySizeEstimate(), configuration.valueSizeEstimate(), configuration.batchSize(), mbe...
java
{ "resource": "" }
q23879
InfinispanCollections.difference
train
public static <E> Set<E> difference(Set<? extends E> s1, Set<? extends E> s2) { Set<E> copy1 = new HashSet<>(s1); copy1.removeAll(new HashSet<>(s2)); return copy1; }
java
{ "resource": "" }
q23880
ComponentRegistry.cacheComponents
train
public void cacheComponents() { stateTransferManager = basicComponentRegistry.getComponent(StateTransferManager.class).wired(); responseGenerator = basicComponentRegistry.getComponent(ResponseGenerator.class).wired(); commandsFactory = basicComponentRegistry.getComponent(CommandsFactory.class).wired()...
java
{ "resource": "" }
q23881
DistributedCacheStream.filter
train
@Override public CacheStream<R> filter(Predicate<? super R> predicate) { return addIntermediateOperation(new FilterOperation<>(predicate)); }
java
{ "resource": "" }
q23882
DistributedCacheStream.reduce
train
@Override public R reduce(R identity, BinaryOperator<R> accumulator) { return performOperation(TerminalFunctions.reduceFunction(identity, accumulator), true, accumulator, null); }
java
{ "resource": "" }
q23883
DistributedCacheStream.iterator
train
@Override public Iterator<R> iterator() { log.tracef("Distributed iterator invoked with rehash: %s", rehashAware); if (!rehashAware) { // Non rehash doesn't care about lost segments or completed ones CloseableIterator<R> closeableIterator = nonRehashRemoteIterator(dm.getReadConsistentHa...
java
{ "resource": "" }
q23884
ProtobufMetadataManagerImpl.getProtobufMetadataManager
train
private static ProtobufMetadataManagerImpl getProtobufMetadataManager(EmbeddedCacheManager cacheManager) { if (cacheManager == null) { throw new IllegalArgumentException("cacheManager cannot be null"); } ProtobufMetadataManagerImpl metadataManager = (ProtobufMetadataManagerImpl) cacheManager....
java
{ "resource": "" }
q23885
InternalEntryFactoryImpl.isStoreMetadata
train
public static boolean isStoreMetadata(Metadata metadata, InternalCacheEntry ice) { return metadata != null && (ice == null || isEntryMetadataAware(ice)) && (metadata.version() != null || !(metadata instanceof EmbeddedMetadata)); }
java
{ "resource": "" }
q23886
AttributeSet.attribute
train
@SuppressWarnings("unchecked") public <T> Attribute<T> attribute(String name) { return (Attribute<T>) this.attributes.get(name); }
java
{ "resource": "" }
q23887
AttributeSet.read
train
public void read(AttributeSet other) { for (Iterator<Attribute<?>> iterator = attributes.values().iterator(); iterator.hasNext();) { Attribute<Object> attribute = (Attribute<Object>) iterator.next(); Attribute<Object> a = other.attribute(attribute.name()); if (a.isModified()) { ...
java
{ "resource": "" }
q23888
AttributeSet.write
train
public void write(XMLStreamWriter writer, String xmlElementName) throws XMLStreamException { if (isModified()) { writer.writeStartElement(xmlElementName); write(writer); writer.writeEndElement(); } }
java
{ "resource": "" }
q23889
AttributeSet.write
train
public void write(XMLStreamWriter writer, String xmlElementName, AttributeDefinition<?>... defs) throws XMLStreamException { boolean skip = true; for (AttributeDefinition def : defs) { skip = skip && !attribute(def).isModified(); } if (!skip) { writer.writeStartElement(xmlEleme...
java
{ "resource": "" }
q23890
AttributeSet.write
train
public void write(XMLStreamWriter writer) throws XMLStreamException { for (Attribute<?> attr : attributes.values()) { if (attr.isPersistent()) attr.write(writer, attr.getAttributeDefinition().xmlName()); } }
java
{ "resource": "" }
q23891
InfinispanIndexInput.setBufferToCurrentChunkIfPossible
train
private void setBufferToCurrentChunkIfPossible() { ChunkCacheKey key = new ChunkCacheKey(fileKey.getIndexName(), filename, currentLoadedChunk, chunkSize, affinitySegmentId); buffer = (byte[]) chunksCache.get(key); if (buffer == null) { currentLoadedChunk--; bufferPosition = chunkSize...
java
{ "resource": "" }
q23892
DirectoryBuilder.newDirectoryInstance
train
public static BuildContext newDirectoryInstance(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName) { validateIndexCaches(indexName, metadataCache, chunksCache, distLocksCache); return new DirectoryBuilderImpl(metadataCache, chunksCache, distLocksCache, indexNam...
java
{ "resource": "" }
q23893
Feature.isAvailableOrThrowException
train
public static Features isAvailableOrThrowException(Features features, String feature, ClassLoader classLoader) { if (features == null) { features = new Features(classLoader); } isAvailableOrThrowException(features, feature); return features; }
java
{ "resource": "" }
q23894
TableManipulationConfigurationBuilder.idColumnName
train
public S idColumnName(String idColumnName) { attributes.attribute(ID_COLUMN_NAME).set(idColumnName); return self(); }
java
{ "resource": "" }
q23895
TableManipulationConfigurationBuilder.idColumnType
train
public S idColumnType(String idColumnType) { attributes.attribute(ID_COLUMN_TYPE).set(idColumnType); return self(); }
java
{ "resource": "" }
q23896
TableManipulationConfigurationBuilder.dataColumnName
train
public S dataColumnName(String dataColumnName) { attributes.attribute(DATA_COLUMN_NAME).set(dataColumnName); return self(); }
java
{ "resource": "" }
q23897
TableManipulationConfigurationBuilder.dataColumnType
train
public S dataColumnType(String dataColumnType) { attributes.attribute(DATA_COLUMN_TYPE).set(dataColumnType); return self(); }
java
{ "resource": "" }
q23898
TableManipulationConfigurationBuilder.timestampColumnName
train
public S timestampColumnName(String timestampColumnName) { attributes.attribute(TIMESTAMP_COLUMN_NAME).set(timestampColumnName); return self(); }
java
{ "resource": "" }
q23899
TableManipulationConfigurationBuilder.timestampColumnType
train
public S timestampColumnType(String timestampColumnType) { attributes.attribute(TIMESTAMP_COLUMN_TYPE).set(timestampColumnType); return self(); }
java
{ "resource": "" }