/** * Read-release the local-map and the entire cache. */ protected void releaseReadLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite()) { getCacheMutex().releaseReadLock(); } }
/** * PERF: Used to micro optimize cache access. * Avoid the readLock and profile checks if not required. */ public void checkIsCacheAccessPreCheckRequired() { if ((this.session.getProfiler() != null) || ((this.session.getDatasourceLogin() != null) && this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite())) { this.isCacheAccessPreCheckRequired = true; } else { this.isCacheAccessPreCheckRequired = false; } }
/** * Read-release the local-map and the entire cache. */ protected void releaseReadLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite()) { getCacheMutex().releaseReadLock(); } }
/** * Read-release the local-map and the entire cache. */ protected void releaseReadLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite()) { getCacheMutex().releaseReadLock(); } }
public IsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy) { super(parent, connectionPolicy); // PERF: Cache the write-lock check to avoid cost of checking in every register/clone. this.shouldCheckWriteLock = getDatasourceLogin().shouldSynchronizedReadOnWrite() || getDatasourceLogin().shouldSynchronizeWrites(); }
public IsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy, Map properties) { super(parent, connectionPolicy, properties); // PERF: Cache the write-lock check to avoid cost of checking in every register/clone. this.shouldCheckWriteLock = getDatasourceLogin().shouldSynchronizedReadOnWrite() || getDatasourceLogin().shouldSynchronizeWrites(); }
/** * PERF: Used to micro optimize cache access. * Avoid the readLock and profile checks if not required. */ public void checkIsCacheAccessPreCheckRequired() { if ((this.session.getProfiler() != null) || ((this.session.getDatasourceLogin() != null) && this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite())) { this.isCacheAccessPreCheckRequired = true; } else { this.isCacheAccessPreCheckRequired = false; } }
/** * PERF: Used to micro optimize cache access. * Avoid the readLock and profile checks if not required. */ protected boolean isCacheAccessPreCheckRequired() { if (this.isCacheAccessPreCheckRequired == null) { if ((getSession().getProfiler() != null) || getSession().getDatasourceLogin().shouldSynchronizedReadOnWrite()) { this.isCacheAccessPreCheckRequired = Boolean.TRUE; } else { this.isCacheAccessPreCheckRequired = Boolean.FALSE; } } return this.isCacheAccessPreCheckRequired.booleanValue(); }
public IsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy, Map properties) { super(parent, connectionPolicy, properties); // PERF: Cache the write-lock check to avoid cost of checking in every register/clone. this.shouldCheckWriteLock = getDatasourceLogin().shouldSynchronizedReadOnWrite() || getDatasourceLogin().shouldSynchronizeWrites(); }
public IsolatedClientSession(ServerSession parent, ConnectionPolicy connectionPolicy) { super(parent, connectionPolicy); // PERF: Cache the write-lock check to avoid cost of checking in every register/clone. this.shouldCheckWriteLock = getDatasourceLogin().shouldSynchronizedReadOnWrite() || getDatasourceLogin().shouldSynchronizeWrites(); }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public boolean acquireWriteLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite() || this.session.getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().acquire(); return true; } return false; }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public void releaseWriteLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite() || this.session.getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().release(); } }
/** * Provides access for setting a concurrency lock on an IdentityMap. */ public void acquireReadLock() { this.session.startOperationProfile(SessionProfiler.Caching); if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite()) { getCacheMutex().acquireReadLock(); } this.session.endOperationProfile(SessionProfiler.Caching); }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public boolean acquireWriteLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite() || this.session.getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().acquire(); return true; } return false; }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public void releaseWriteLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite() || this.session.getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().release(); } }
/** * Provides access for setting a concurrency lock on an IdentityMap. */ public void acquireReadLock() { this.session.startOperationProfile(SessionProfiler.Caching); if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite()) { getCacheMutex().acquireReadLock(); } this.session.endOperationProfile(SessionProfiler.Caching); }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public void releaseWriteLock() { if (this.session.getDatasourceLogin().shouldSynchronizedReadOnWrite() || this.session.getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().release(); } }
/** * Lock the entire cache if the cache isolation requires. * By default concurrent reads and writes are allowed. * By write, unit of work merge is meant. */ public boolean acquireWriteLock() { if (getSession().getDatasourceLogin().shouldSynchronizedReadOnWrite() || getSession().getDatasourceLogin().shouldSynchronizeWrites()) { getCacheMutex().acquire(); return true; } return false; }
/** * Provides access for setting a concurrency lock on an IdentityMap. */ public void acquireReadLock() { getSession().startOperationProfile(SessionProfiler.CACHE); if (getSession().getDatasourceLogin().shouldSynchronizedReadOnWrite()) { getCacheMutex().acquireReadLock(); } getSession().endOperationProfile(SessionProfiler.CACHE); }
this.shouldCheckWriteLock = parent.getDatasourceLogin().shouldSynchronizedReadOnWrite() || parent.getDatasourceLogin().shouldSynchronizeWrites(); this.isNestedUnitOfWork = parent.isUnitOfWork();