@Override public int numChanges() { if (this.closeConnectionIds != null) { return this.closeConnectionIds.size(); } return 1; }
@Override public int numChanges() { if (this.closeConnectionIds != null) { return this.closeConnectionIds.size(); } return 1; }
@Override public int numChanges() { if (this.closeConnectionIds != null) { return this.closeConnectionIds.size(); } return 1; }
/** * Compares this list to another list, value by value. * * @param other the object to compare against * @return true if other is a TLongArrayList and has exactly the * same values. */ @Override // GemStoneAddition public boolean equals(Object other) { if (other == this) { return true; } else if (other instanceof TLongArrayList) { TLongArrayList that = (TLongArrayList)other; if (that.size() != this.size()) { return false; } else { for (int i = _pos; i-- > 0;) { if (this._data[i] != that._data[i]) { return false; } } return true; } } else { return false; } }
/** * Finds the maximum value in the list. * * @return the largest value in the list. * @exception IllegalStateException if the list is empty */ public long max() { if (size() == 0) { throw new IllegalStateException("cannot find maximum of an empty list"); } long max = _data[_pos - 1]; for (int i = _pos - 1; i-- > 0;) { if (_data[i] > max) { max = _data[i]; } } return max; }
/** * Finds the minimum value in the list. * * @return the smallest value in the list. * @exception IllegalStateException if the list is empty */ public long min() { if (size() == 0) { throw new IllegalStateException("cannot find minimum of an empty list"); } long min = _data[_pos - 1]; for (int i = _pos - 1; i-- > 0;) { if (_data[i] < min) { min = _data[i]; } } return min; }
/** * Returns a String representation of the list, front to back. * * @return a <code>String</code> value */ @Override // GemStoneAddition public String toString() { StringBuilder buf = new StringBuilder("{"); for (int i = 0, end = _pos - 1; i < end; i++) { buf.append(_data[i]); buf.append(", "); } if (size() > 0) { buf.append(_data[_pos - 1]); } buf.append("}"); return buf.toString(); } } // TLongArrayList
/** Get rid of the merge runs, if there are any. Must not cause any errors because it's called during error processing. **/ void dropMergeRuns(TransactionManager tran) { if (mergeRuns != null) { //Enumeration e = mergeRuns.elements(); try { Transaction rawTran = tran.getRawStoreXact(); long segmentId = StreamContainerHandle.TEMPORARY_SEGMENT; for (int i = 0; i < mergeRuns.size(); i++) { //long containerId = ((Long) e.nextElement()).longValue(); long containerId = mergeRuns.getQuick(i); rawTran.dropStreamContainer(segmentId, containerId); } } catch (StandardException se) { // Ignore problems with dropping, worst case // the raw store will clean up at reboot. } mergeRuns = null; } }
/** Get rid of the merge runs, if there are any. Must not cause any errors because it's called during error processing. **/ void dropMergeRuns(TransactionManager tran) { if (mergeRuns != null) { //Enumeration e = mergeRuns.elements(); try { Transaction rawTran = tran.getRawStoreXact(); long segmentId = StreamContainerHandle.TEMPORARY_SEGMENT; for (int i = 0; i < mergeRuns.size(); i++) { //long containerId = ((Long) e.nextElement()).longValue(); long containerId = mergeRuns.getQuick(i); rawTran.dropStreamContainer(segmentId, containerId); } } catch (StandardException se) { // Ignore problems with dropping, worst case // the raw store will clean up at reboot. } mergeRuns = null; } }
/** Get rid of the merge runs, if there are any. Must not cause any errors because it's called during error processing. **/ void dropMergeRuns(TransactionManager tran) { if (mergeRuns != null) { //Enumeration e = mergeRuns.elements(); try { Transaction rawTran = tran.getRawStoreXact(); long segmentId = StreamContainerHandle.TEMPORARY_SEGMENT; for (int i = 0; i < mergeRuns.size(); i++) { //long containerId = ((Long) e.nextElement()).longValue(); long containerId = mergeRuns.getQuick(i); rawTran.dropStreamContainer(segmentId, containerId); } } catch (StandardException se) { // Ignore problems with dropping, worst case // the raw store will clean up at reboot. } mergeRuns = null; } }
ikey.writeKeyBytes(dos); TLongArrayList entryKeyIds = (TLongArrayList)value; int numKeyIds = entryKeyIds.size(); assert numKeyIds > 0; InternalDataSerializer.writeUnsignedVL(numKeyIds, dos);