private long getViewId(DM dm) { MembershipManager mm = dm.getMembershipManager(); return mm != null ? mm.getViewId() : -1; }
private void cleanupPrepStatementAwareMemberList() { // if there has been a view change then cleanup prepStmntAwareMembers final long lastViewId = this.lastUpdatedViewId; final long viewId; if (this.membershipManager != null && (viewId = this.membershipManager.getViewId()) != lastViewId) { final Set<DistributedMember> members = this.prepStmntAwareMembers; synchronized (members) { // TODO KN: check if instead of passing null we can just pass the // server groups of the tables to which this prep statement goes Set<DistributedMember> liveMembers = GemFireXDUtils.getGfxdAdvisor() .adviseDataStores(null); if (liveMembers != null) { members.retainAll(liveMembers); } else { // This really should not happen. members.clear(); } this.lastUpdatedViewId = viewId; } } }
private void cleanupPrepStatementAwareMemberList() { // if there has been a view change then cleanup prepStmntAwareMembers final long lastViewId = this.lastUpdatedViewId; final long viewId; if (this.membershipManager != null && (viewId = this.membershipManager.getViewId()) != lastViewId) { final Set<DistributedMember> members = this.prepStmntAwareMembers; synchronized (members) { // TODO KN: check if instead of passing null we can just pass the // server groups of the tables to which this prep statement goes Set<DistributedMember> liveMembers = GemFireXDUtils.getGfxdAdvisor() .adviseDataStores(null); if (liveMembers != null) { members.retainAll(liveMembers); } else { // This really should not happen. members.clear(); } this.lastUpdatedViewId = viewId; } } }
private void cleanupPrepStatementAwareMemberList() { // if there has been a view change then cleanup prepStmntAwareMembers final long lastViewId = this.lastUpdatedViewId; final long viewId; if (this.membershipManager != null && (viewId = this.membershipManager.getViewId()) != lastViewId) { final Set<DistributedMember> members = this.prepStmntAwareMembers; synchronized (members) { // TODO KN: check if instead of passing null we can just pass the // server groups of the tables to which this prep statement goes Set<DistributedMember> liveMembers = GemFireXDUtils.getGfxdAdvisor() .adviseDataStores(null); if (liveMembers != null) { members.retainAll(liveMembers); } else { // This really should not happen. members.clear(); } this.lastUpdatedViewId = viewId; } } }
@SuppressWarnings("unchecked") public AbstractGemFireDistributionActivation(ExecPreparedStatement st, LanguageConnectionContext _lcc, DMLQueryInfo qi) throws StandardException { super(st, _lcc, qi); this.prepStmntAwareMembers = new THashSet(); this.orderedReplies = (qi.getQueryFlag() & (QueryInfo.HAS_DISTINCT | QueryInfo.HAS_DISTINCT_SCAN | QueryInfo.HAS_ORDERBY)) != 0 || ((qi.getQueryFlag() & QueryInfo.HAS_GROUPBY) != 0 && ((SelectQueryInfo)qi) .getGroupByQI().doReGrouping()); this.connectionID = _lcc.getConnectionId(); this.membershipManager = Misc.getDistributedSystem().getDM() .getMembershipManager(); this.lastUpdatedViewId = membershipManager != null ? membershipManager .getViewId() : -1; }
@SuppressWarnings("unchecked") public AbstractGemFireDistributionActivation(ExecPreparedStatement st, LanguageConnectionContext _lcc, DMLQueryInfo qi) throws StandardException { super(st, _lcc, qi); this.prepStmntAwareMembers = new THashSet(); this.orderedReplies = (qi.getQueryFlag() & (QueryInfo.HAS_DISTINCT | QueryInfo.HAS_DISTINCT_SCAN | QueryInfo.HAS_ORDERBY)) != 0 || ((qi.getQueryFlag() & QueryInfo.HAS_GROUPBY) != 0 && ((SelectQueryInfo)qi) .getGroupByQI().doReGrouping()); this.connectionID = _lcc.getConnectionId(); this.membershipManager = Misc.getDistributedSystem().getDM() .getMembershipManager(); this.lastUpdatedViewId = membershipManager != null ? membershipManager .getViewId() : -1; }
@SuppressWarnings("unchecked") public AbstractGemFireDistributionActivation(ExecPreparedStatement st, LanguageConnectionContext _lcc, DMLQueryInfo qi) throws StandardException { super(st, _lcc, qi); this.prepStmntAwareMembers = new THashSet(); this.orderedReplies = (qi.getQueryFlag() & (QueryInfo.HAS_DISTINCT | QueryInfo.HAS_DISTINCT_SCAN | QueryInfo.HAS_ORDERBY)) != 0 || ((qi.getQueryFlag() & QueryInfo.HAS_GROUPBY) != 0 && ((SelectQueryInfo)qi) .getGroupByQI().doReGrouping()); this.connectionID = _lcc.getConnectionId(); this.membershipManager = Misc.getDistributedSystem().getDM() .getMembershipManager(); this.lastUpdatedViewId = membershipManager != null ? membershipManager .getViewId() : -1; }