use of org.jkiss.dbeaver.model.admin.locks.DBAServerLockManager in project dbeaver by dbeaver.
the class ExasolLockEditor method createLockViewer.
@SuppressWarnings("unchecked")
@Override
protected LockManagerViewer createLockViewer(DBCExecutionContext executionContext, Composite parent) {
@SuppressWarnings("rawtypes") DBAServerLockManager<DBAServerLock, DBAServerLockItem> lockManager = (DBAServerLockManager) new ExasolLockManager((ExasolDataSource) executionContext.getDataSource());
return new LockManagerViewer(this, parent, lockManager) {
@Override
protected void contributeToToolbar(DBAServerLockManager<DBAServerLock, DBAServerLockItem> sessionManager, IContributionManager contributionManager) {
contributionManager.add(new Separator());
}
@SuppressWarnings("serial")
@Override
protected void onLockSelect(final DBAServerLock lock) {
super.onLockSelect(lock);
if (lock != null) {
final ExasolLock pLock = (ExasolLock) lock;
super.refreshDetail(new HashMap<String, Object>() {
{
put(sidHold, BigInteger.valueOf(pLock.getHold_sid()));
put(sidWait, BigInteger.valueOf(pLock.getWait_sid().longValue()));
}
});
}
}
};
}
use of org.jkiss.dbeaver.model.admin.locks.DBAServerLockManager in project dbeaver by dbeaver.
the class PostgreLockEditor method createLockViewer.
@SuppressWarnings("unchecked")
@Override
protected LockManagerViewer createLockViewer(DBCExecutionContext executionContext, Composite parent) {
DBAServerLockManager<DBAServerLock, DBAServerLockItem> lockManager = (DBAServerLockManager) new PostgreLockManager((PostgreDataSource) executionContext.getDataSource());
return new LockManagerViewer(this, parent, lockManager) {
@Override
protected void contributeToToolbar(DBAServerLockManager<DBAServerLock, DBAServerLockItem> sessionManager, IContributionManager contributionManager) {
contributionManager.add(new Separator());
}
@Override
protected void onLockSelect(final DBAServerLock lock) {
super.onLockSelect(lock);
if (lock != null) {
final PostgreLock pLock = (PostgreLock) lock;
super.refreshDetail(new HashMap<String, Object>() {
{
put(pidHold, pLock.getHold_pid());
put(pidWait, pLock.getWait_pid());
}
});
}
}
};
}
use of org.jkiss.dbeaver.model.admin.locks.DBAServerLockManager in project dbeaver by dbeaver.
the class OracleLockEditor method createLockViewer.
@Override
protected LockManagerViewer createLockViewer(DBCExecutionContext executionContext, Composite parent) {
DBAServerLockManager<DBAServerLock, DBAServerLockItem> lockManager = (DBAServerLockManager) new OracleLockManager((OracleDataSource) executionContext.getDataSource());
return new LockManagerViewer(this, parent, lockManager) {
@Override
protected void contributeToToolbar(DBAServerLockManager<DBAServerLock, DBAServerLockItem> sessionManager, IContributionManager contributionManager) {
contributionManager.add(new Separator());
}
@Override
protected void onLockSelect(final DBAServerLock lock) {
super.onLockSelect(lock);
if (lock != null) {
final OracleLock pLock = (OracleLock) lock;
super.refreshDetail(new HashMap<String, Object>() {
{
put(sidHold, pLock.getHold_sid());
put(sidWait, pLock.getWait_sid());
}
});
}
}
};
}
use of org.jkiss.dbeaver.model.admin.locks.DBAServerLockManager in project dbeaver by serge-rider.
the class ExasolLockEditor method createLockViewer.
@SuppressWarnings("unchecked")
@Override
protected LockManagerViewer createLockViewer(DBCExecutionContext executionContext, Composite parent) {
@SuppressWarnings("rawtypes") DBAServerLockManager<DBAServerLock, DBAServerLockItem> lockManager = (DBAServerLockManager) new ExasolLockManager((ExasolDataSource) executionContext.getDataSource());
return new LockManagerViewer(this, parent, lockManager) {
@Override
protected void contributeToToolbar(DBAServerLockManager<DBAServerLock, DBAServerLockItem> sessionManager, IContributionManager contributionManager) {
contributionManager.add(new Separator());
}
@SuppressWarnings("serial")
@Override
protected void onLockSelect(final DBAServerLock lock) {
super.onLockSelect(lock);
if (lock != null) {
final ExasolLock pLock = (ExasolLock) lock;
super.refreshDetail(new HashMap<String, Object>() {
{
put(sidHold, BigInteger.valueOf(pLock.getHold_sid()));
put(sidWait, BigInteger.valueOf(pLock.getWait_sid().longValue()));
}
});
}
}
};
}
use of org.jkiss.dbeaver.model.admin.locks.DBAServerLockManager in project dbeaver by serge-rider.
the class PostgreLockEditor method createLockViewer.
@SuppressWarnings("unchecked")
@Override
protected LockManagerViewer createLockViewer(DBCExecutionContext executionContext, Composite parent) {
DBAServerLockManager<DBAServerLock, DBAServerLockItem> lockManager = (DBAServerLockManager) new PostgreLockManager((PostgreDataSource) executionContext.getDataSource());
return new LockManagerViewer(this, parent, lockManager) {
@Override
protected void contributeToToolbar(DBAServerLockManager<DBAServerLock, DBAServerLockItem> sessionManager, IContributionManager contributionManager) {
contributionManager.add(new Separator());
}
@Override
protected void onLockSelect(final DBAServerLock lock) {
super.onLockSelect(lock);
if (lock != null) {
final PostgreLock pLock = (PostgreLock) lock;
super.refreshDetail(new HashMap<String, Object>() {
{
put(PostgreLockManager.pidHold, pLock.getHold_pid());
put(PostgreLockManager.pidWait, pLock.getWait_pid());
}
});
}
}
};
}
Aggregations