public class OAThreadLocalDelegate extends Object
Modifier and Type | Field and Description |
---|---|
static int |
cntDeadlock |
static HashMap<Object,OAThreadLocal[]> |
hmLock |
protected static ReentrantReadWriteLock |
rwLock |
Constructor and Description |
---|
OAThreadLocalDelegate() |
Modifier and Type | Method and Description |
---|---|
static void |
addDontAdjustHub(Hub hub)
Hubs that should not be adjusted when trying to set activeObject and adjusting masterHub.AO
|
static void |
addHubEvent(HubEvent he) |
static void |
addHubMergerCallback(OAThreadLocalHubMergerCallback cb) |
protected static void |
addHubMergerCallback(OAThreadLocal ti,
OAThreadLocalHubMergerCallback cb) |
static boolean |
addSiblingHelper(OASiblingHelper sh) |
protected static boolean |
addSiblingHelper(OAThreadLocal ti,
OASiblingHelper sh) |
static void |
clearSiblingHelpers() |
static void |
endCompoundUndoable() |
static void |
endUndoable() |
protected static void |
endUndoable(OAThreadLocal ti) |
static String |
getAllStackTraces() |
static boolean |
getCanAdjustHub(Hub hub) |
static Object |
getContext()
Get the context that can be used to call OAContext.getContext
|
static boolean |
getCreateUndoablePropertyChanges() |
protected static boolean |
getCreateUndoablePropertyChanges(OAThreadLocal ti) |
static HubEvent |
getCurrentHubEvent() |
static int |
getDeadlockCount() |
static Hub |
getFastLoadingHub() |
protected static Hub |
getFastLoadingHub(OAThreadLocal ti) |
static int |
getHubListenerTreeCount() |
protected static int |
getHubListenerTreeCount(OAThreadLocal ti) |
static String |
getIgnoreTreeListenerProperty() |
static boolean |
getIsAdmin() |
static boolean |
getIsAdmin(OAThreadLocal ti) |
static Object[] |
getLocks() |
static OAJson |
getOAJackson() |
static int |
getOASyncEventCount() |
static OAThreadLocal |
getOAThreadLocal() |
static int |
getObjectCacheAddMode() |
protected static int |
getObjectCacheAddMode(OAThreadLocal ti) |
static OAObjectSerializer |
getObjectSerializer()
used by Serialization for the current thread.
|
protected static OAObjectSerializer |
getObjectSerializer(OAThreadLocal ti) |
static HubEvent |
getOldestHubEvent() |
static OAProcess |
getProcess() |
protected static OAProcess |
getProcess(OAThreadLocal ti) |
static int |
getRecursiveTriggerCount() |
protected static int |
getRecursiveTriggerCount(OAThreadLocal ti) |
static RequestInfo |
getRemoteRequestInfo() |
static ArrayList<OASiblingHelper> |
getSiblingHelpers() |
static ArrayList<OASiblingHelper> |
getSiblingHelpers(OAThreadLocal ti) |
static String |
getThreadDump() |
protected static OAThreadLocal |
getThreadLocal(boolean bCreateIfNull) |
static OATransaction |
getTransaction() |
static boolean |
hasLock() |
static boolean |
hasLock(Object obj) |
static boolean |
hasSentCalcPropertyChange(Hub thisHub,
OAObject thisObj,
String propertyName) |
static boolean |
hasSiblingHelpers() |
static void |
incrOASyncEventCount() |
static void |
initialize(OAThreadLocal tl) |
static boolean |
isAdmin() |
static boolean |
isCreatingCompoundUndoable() |
static boolean |
isDeleting()
Is this thread currently deleting.
|
protected static boolean |
isDeleting(OAThreadLocal ti,
Object obj) |
static boolean |
isDeleting(Object obj)
Is any thread currently deleting an object.
|
static boolean |
isFastLoadingHub(Hub h) |
protected static boolean |
isFlag(OAThreadLocal ti,
Object obj) |
static boolean |
isFlag(Object obj)
getFlag ----------------------- Flag used for generic/misc purposes
|
static boolean |
isHubMergerChanging() |
protected static boolean |
isHubMergerChanging(OAThreadLocal ti) |
static boolean |
isLoading() |
protected static boolean |
isLoading(OAThreadLocal ti) |
static boolean |
isLocked(Object object) |
static boolean |
isLockOwner(Object object) |
static boolean |
isOpenHubEvent(HubEvent he) |
static boolean |
isRefreshing() |
protected static boolean |
isRefreshing(OAThreadLocal ti) |
static boolean |
isSendingEvent() |
protected static boolean |
isSendingEvent(OAThreadLocal ti) |
static boolean |
isSuppressCSMessages() |
static boolean |
isSuppressCSMessages(OAThreadLocal ti) |
static boolean |
isSyncThread() |
static boolean |
isThreadDeleting(Object obj)
Is this thread currently deleting an object/hub.
|
protected static void |
lock(OAThreadLocal tiThis,
Object thisLockObject,
int maxWaitTries) |
static void |
lock(Object object) |
static void |
lock(Object object,
int maxWaitTries)
This locking was created to prevent deadlocks.
|
static void |
notifyWaitingThread() |
static void |
releaseAllLocks() |
static void |
removeDontAdjustHub(Hub hub) |
protected static void |
removeFlag(OAThreadLocal ti,
Object obj) |
static void |
removeFlag(Object obj) |
static void |
removeHubEvent(HubEvent he) |
static void |
removeSiblingHelper(OASiblingHelper sh) |
protected static void |
removeSiblingHelper(OAThreadLocal ti,
OASiblingHelper sh) |
static boolean |
setAdmin(boolean b) |
static void |
setContext(Object context)
Sets the context that is being used for this Thread.
|
static void |
setCreateUndoablePropertyChanges(boolean b)
Flag to know if property changes should be adding undoable events.
|
protected static void |
setCreateUndoablePropertyChanges(OAThreadLocal ti,
boolean b) |
protected static void |
setDeleting(OAThreadLocal ti,
Object obj,
boolean b) |
static void |
setDeleting(Object obj,
boolean b) |
static void |
setFastLoadingHub(Hub hub) |
protected static void |
setFastLoadingHub(OAThreadLocal ti,
Hub hub) |
protected static void |
setFlag(OAThreadLocal ti,
Object obj) |
static void |
setFlag(Object obj) |
static void |
setHubListenerTree(boolean b) |
protected static void |
setHubListenerTree(OAThreadLocal ti,
boolean b) |
static void |
setHubMergerChanging(boolean b) |
protected static void |
setHubMergerChanging(OAThreadLocal ti,
boolean b) |
static void |
setIgnoreTreeListenerProperty(String prop) |
static boolean |
setIsAdmin(boolean b) |
static boolean |
setIsAdmin(OAThreadLocal ti,
boolean b) |
static boolean |
setLoading(boolean b) |
protected static boolean |
setLoading(OAThreadLocal ti,
boolean b) |
static void |
setNotifyObject(Object obj) |
static OAJson |
setOAJackson(OAJson jackson) |
static void |
setObjectCacheAddMode(int mode) |
static void |
setObjectSerializer(OAObjectSerializer si) |
protected static void |
setObjectSerializer(OAThreadLocal ti,
OAObjectSerializer si) |
static void |
setProcess(OAProcess process) |
protected static void |
setProcess(OAThreadLocal ti,
OAProcess process) |
static void |
setRecursiveTriggerCount(int x) |
protected static void |
setRecursiveTriggerCount(OAThreadLocal ti,
int x) |
static void |
setRefreshing(boolean b) |
protected static boolean |
setRefreshing(OAThreadLocal ti,
boolean b) |
static void |
setRemoteRequestInfo(RequestInfo ri) |
static boolean |
setSendMessages(boolean b)
Flag that can be set to allow messages from OARemoteThread to be sent to other clients/server.
|
static void |
setStatus(String msg) |
static void |
setSuppressCSMessages(boolean b) |
static void |
setSuppressCSMessages(OAThreadLocal ti,
boolean b) |
static boolean |
setSyncThread(boolean b) |
static void |
setTransaction(OATransaction t)
Called by OATransaction.start() Used internally by classes that work with the transaction.
|
static void |
startCompoundUndoable(String compoundName) |
protected static void |
startUndoable(OAThreadLocal ti,
String compoundName) |
static void |
startUndoable(String compoundName)
Start a compound undoable.
|
static long |
throttleLOG(String msg,
long msLast) |
protected static void |
unlock(OAThreadLocal ti,
Object object) |
static void |
unlock(Object object) |
public static final HashMap<Object,OAThreadLocal[]> hmLock
protected static ReentrantReadWriteLock rwLock
public static int cntDeadlock
protected static OAThreadLocal getThreadLocal(boolean bCreateIfNull)
public static void setTransaction(OATransaction t)
public static OATransaction getTransaction()
public static boolean isLoading()
OAThreadLocal.loading
protected static boolean isLoading(OAThreadLocal ti)
public static boolean setLoading(boolean b)
protected static boolean setLoading(OAThreadLocal ti, boolean b)
public static int getObjectCacheAddMode()
public static void setObjectCacheAddMode(int mode)
protected static int getObjectCacheAddMode(OAThreadLocal ti)
public static OAObjectSerializer getObjectSerializer()
protected static OAObjectSerializer getObjectSerializer(OAThreadLocal ti)
public static void setObjectSerializer(OAObjectSerializer si)
protected static void setObjectSerializer(OAThreadLocal ti, OAObjectSerializer si)
public static boolean isSuppressCSMessages()
public static boolean isSuppressCSMessages(OAThreadLocal ti)
public static void setSuppressCSMessages(boolean b)
public static void setSuppressCSMessages(OAThreadLocal ti, boolean b)
public static boolean isDeleting()
public static boolean isDeleting(Object obj)
public static boolean isThreadDeleting(Object obj)
protected static boolean isDeleting(OAThreadLocal ti, Object obj)
public static void setDeleting(Object obj, boolean b)
protected static void setDeleting(OAThreadLocal ti, Object obj, boolean b)
public static boolean isFlag(Object obj)
protected static boolean isFlag(OAThreadLocal ti, Object obj)
public static void setFlag(Object obj)
protected static void setFlag(OAThreadLocal ti, Object obj)
public static void removeFlag(Object obj)
protected static void removeFlag(OAThreadLocal ti, Object obj)
public static void lock(Object object, int maxWaitTries)
maxWaitTries
- (default=10) max number of waits (each 50 ms) to wait before taking the lock - 0 to wait until notified. This
will only be used if the current threadLocal has 1+ locks already and object is locked by another threadLocal.public static void lock(Object object)
public static boolean hasLock()
public static boolean hasLock(Object obj)
public static Object[] getLocks()
public static boolean isLocked(Object object)
public static boolean isLockOwner(Object object)
public static OAThreadLocal getOAThreadLocal()
protected static void lock(OAThreadLocal tiThis, Object thisLockObject, int maxWaitTries)
public static int getDeadlockCount()
public static void releaseAllLocks()
public static void unlock(Object object)
protected static void unlock(OAThreadLocal ti, Object object)
public static boolean isHubMergerChanging()
protected static boolean isHubMergerChanging(OAThreadLocal ti)
public static void setHubMergerChanging(boolean b)
protected static void setHubMergerChanging(OAThreadLocal ti, boolean b)
public static void addHubMergerCallback(OAThreadLocalHubMergerCallback cb)
protected static void addHubMergerCallback(OAThreadLocal ti, OAThreadLocalHubMergerCallback cb)
public static void setCreateUndoablePropertyChanges(boolean b)
OAUndoManager
protected static void setCreateUndoablePropertyChanges(OAThreadLocal ti, boolean b)
public static boolean getCreateUndoablePropertyChanges()
protected static boolean getCreateUndoablePropertyChanges(OAThreadLocal ti)
public static void startUndoable(String compoundName)
public static void startCompoundUndoable(String compoundName)
public static boolean isCreatingCompoundUndoable()
protected static void startUndoable(OAThreadLocal ti, String compoundName)
public static void endUndoable()
public static void endCompoundUndoable()
protected static void endUndoable(OAThreadLocal ti)
public static boolean addSiblingHelper(OASiblingHelper sh)
public static void removeSiblingHelper(OASiblingHelper sh)
public static ArrayList<OASiblingHelper> getSiblingHelpers()
public static ArrayList<OASiblingHelper> getSiblingHelpers(OAThreadLocal ti)
public static boolean hasSiblingHelpers()
public static void clearSiblingHelpers()
protected static boolean addSiblingHelper(OAThreadLocal ti, OASiblingHelper sh)
protected static void removeSiblingHelper(OAThreadLocal ti, OASiblingHelper sh)
public static long throttleLOG(String msg, long msLast)
public static String getAllStackTraces()
public static String getThreadDump()
public static void setStatus(String msg)
public static void setRemoteRequestInfo(RequestInfo ri)
public static RequestInfo getRemoteRequestInfo()
public static boolean setSendMessages(boolean b)
public static void setNotifyObject(Object obj)
public static void notifyWaitingThread()
public static int getRecursiveTriggerCount()
protected static int getRecursiveTriggerCount(OAThreadLocal ti)
public static void setRecursiveTriggerCount(int x)
protected static void setRecursiveTriggerCount(OAThreadLocal ti, int x)
public static int getHubListenerTreeCount()
protected static int getHubListenerTreeCount(OAThreadLocal ti)
public static void setHubListenerTree(boolean b)
protected static void setHubListenerTree(OAThreadLocal ti, boolean b)
public static void setIgnoreTreeListenerProperty(String prop)
public static String getIgnoreTreeListenerProperty()
public static int getOASyncEventCount()
public static void incrOASyncEventCount()
public static HubEvent getCurrentHubEvent()
public static boolean isOpenHubEvent(HubEvent he)
public static HubEvent getOldestHubEvent()
public static void addHubEvent(HubEvent he)
public static void removeHubEvent(HubEvent he)
public static boolean isSendingEvent()
protected static boolean isSendingEvent(OAThreadLocal ti)
public static boolean hasSentCalcPropertyChange(Hub thisHub, OAObject thisObj, String propertyName)
public static Object getContext()
public static void setContext(Object context)
OAContext.getContextObject()
public static boolean setAdmin(boolean b)
public static boolean setIsAdmin(boolean b)
public static boolean setIsAdmin(OAThreadLocal ti, boolean b)
public static boolean isAdmin()
public static boolean getIsAdmin()
public static boolean getIsAdmin(OAThreadLocal ti)
public static void initialize(OAThreadLocal tl)
public static OAJson getOAJackson()
public static void addDontAdjustHub(Hub hub)
public static void removeDontAdjustHub(Hub hub)
public static boolean getCanAdjustHub(Hub hub)
public static boolean isSyncThread()
public static boolean setSyncThread(boolean b)
public static boolean isRefreshing()
protected static boolean isRefreshing(OAThreadLocal ti)
public static void setRefreshing(boolean b)
protected static boolean setRefreshing(OAThreadLocal ti, boolean b)
public static Hub getFastLoadingHub()
OAThreadLocal#fastLoading
protected static Hub getFastLoadingHub(OAThreadLocal ti)
public static boolean isFastLoadingHub(Hub h)
public static void setFastLoadingHub(Hub hub)
protected static void setFastLoadingHub(OAThreadLocal ti, Hub hub)
public static OAProcess getProcess()
OAThreadLocal.process
protected static OAProcess getProcess(OAThreadLocal ti)
public static void setProcess(OAProcess process)
protected static void setProcess(OAThreadLocal ti, OAProcess process)
Copyright © 1999–2025 ViaOA. All rights reserved.