Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-11888 InvocationContext cleanup #8372

Merged
merged 1 commit into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 1 addition & 27 deletions core/src/main/java/org/infinispan/context/InvocationContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import java.util.Collection;
import java.util.Set;

import org.infinispan.container.impl.EntryFactory;
import org.infinispan.container.entries.CacheEntry;
import org.infinispan.container.entries.InternalCacheEntry;
import org.infinispan.remoting.transport.Address;

/**
Expand Down Expand Up @@ -57,24 +54,6 @@ public interface InvocationContext extends EntryLookup, Cloneable {

void clearLockedKeys();

/**
* Returns the class loader associated with this invocation
*
* @return a class loader instance or null if no class loader was
* specifically associated
* @deprecated Not in use any more, implementations might return null.
*/
@Deprecated
ClassLoader getClassLoader();

/**
* Sets the class loader associated for this invocation
*
* @deprecated Not in use any more.
*/
@Deprecated
void setClassLoader(ClassLoader classLoader);

/**
* Tracks the given key as locked by this invocation context.
*/
Expand All @@ -94,12 +73,7 @@ default void addLockedKeys(Collection<?> keys) {
boolean hasLockedKey(Object key);

/**
* @deprecated Since 8.1, use {@link EntryFactory#wrapExternalEntry(InvocationContext, Object, CacheEntry, boolean, boolean)} instead.
* @deprecated Since 11, to be removed in 14 with no replacement
*/
@Deprecated
default boolean replaceValue(Object key, InternalCacheEntry cacheEntry) {
return false;
}

boolean isEntryRemovedInContext(Object key);
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.infinispan.context.impl;

import org.infinispan.container.entries.CacheEntry;
import org.infinispan.container.entries.InternalCacheEntry;
import org.infinispan.context.InvocationContext;
import org.infinispan.remoting.transport.Address;

Expand Down Expand Up @@ -34,29 +33,12 @@ public boolean hasLockedKey(Object key) {
return getLockedKeys().contains(key);
}

@Override
public final ClassLoader getClassLoader() {
return null;
}

@Override
public final void setClassLoader(final ClassLoader classLoader) {
// No-op
}

@Override
public boolean isEntryRemovedInContext(final Object key) {
CacheEntry ce = lookupEntry(key);
return ce != null && ce.isRemoved() && ce.isChanged();
}

/**
* @deprecated Since 8.1, no longer used.
*/
@Deprecated
protected void onEntryValueReplaced(final Object key, final InternalCacheEntry cacheEntry) {
}

@Override
public InvocationContext clone() {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package org.infinispan.context;
package org.infinispan.context.impl;

import org.infinispan.commands.DataCommand;
import org.infinispan.commands.VisitableCommand;
import org.infinispan.commands.write.ClearCommand;
import org.infinispan.commands.write.InvalidateCommand;
import org.infinispan.commands.write.PutMapCommand;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.context.impl.ClearInvocationContext;
import org.infinispan.context.impl.NonTxInvocationContext;
import org.infinispan.context.impl.SingleKeyNonTxInvocationContext;
import org.infinispan.context.InvocationContext;
import org.infinispan.context.InvocationContextFactory;
import org.infinispan.factories.annotations.Inject;
import org.infinispan.factories.scopes.Scope;
import org.infinispan.factories.scopes.Scopes;
Expand All @@ -19,9 +18,7 @@
*
* @author Mircea Markus
* @author Dan Berindei
* @deprecated Since 9.0, this class is going to be moved to an internal package.
*/
@Deprecated
@Scope(Scopes.NAMED_CACHE)
public abstract class AbstractInvocationContextFactory implements InvocationContextFactory {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ public InvocationContext clone() {
return this;
}

@Override
public ClassLoader getClassLoader() {
return null;
}

@Override
public void setClassLoader(ClassLoader classLoader) {
throw newUnsupportedMethod();
}

/**
* @return an exception to state this context is read only
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import javax.transaction.Transaction;

import org.infinispan.context.AbstractInvocationContextFactory;
import org.infinispan.context.InvocationContext;
import org.infinispan.factories.annotations.SurvivesRestarts;
import org.infinispan.factories.scopes.Scope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,6 @@ public Address getOrigin() {
return origin;
}

@Override
public ClassLoader getClassLoader() {
return null;
}

@Override
public void setClassLoader(ClassLoader classLoader) {
// No-op
}

@Override
public boolean hasLockedKey(final Object key) {
return isLocked && isKeyEquals(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import org.infinispan.batch.BatchContainer;
import org.infinispan.commons.CacheException;
import org.infinispan.context.AbstractInvocationContextFactory;
import org.infinispan.context.InvocationContext;
import org.infinispan.factories.annotations.Inject;
import org.infinispan.factories.annotations.Start;
Expand Down