mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 06:45:21 +00:00
Refactor rename internal method DefaultPersistenceContext.classContext()
This commit is contained in:
1 parent
c5e940733c
commit
8440a13b0f
1 file changed
+5
-5
+5
-5
@@ -93,7 +93,7 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
|||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
putCount++;
|
putCount++;
|
||||||
getClassContext(rootType).put(id, bean);
|
classContext(rootType).put(id, bean);
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
|||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
putCount++;
|
putCount++;
|
||||||
return getClassContext(rootType).putIfAbsent(id, bean);
|
return classContext(rootType).putIfAbsent(id, bean);
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
|||||||
public Object get(Class<?> rootType, Object id) {
|
public Object get(Class<?> rootType, Object id) {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
return getClassContext(rootType).get(id);
|
return classContext(rootType).get(id);
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
|||||||
public WithOption getWithOption(Class<?> rootType, Object id) {
|
public WithOption getWithOption(Class<?> rootType, Object id) {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
try {
|
try {
|
||||||
return getClassContext(rootType).getWithOption(id);
|
return classContext(rootType).getWithOption(id);
|
||||||
} finally {
|
} finally {
|
||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@ public final class DefaultPersistenceContext implements SpiPersistenceContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ClassContext getClassContext(Class<?> rootType) {
|
private ClassContext classContext(Class<?> rootType) {
|
||||||
return typeCache.computeIfAbsent(rootType, k -> new ClassContext(rootType));
|
return typeCache.computeIfAbsent(rootType, k -> new ClassContext(rootType));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user