Set the low and high watermarks for the read buffer.
1315
def set_buffer_limits(self, high=None, low=None):
        """"""
        if high is None:
            high = self.default_buffer_size
        if low is None:
            low = high // 2
        self._buffer_high = high
        self._buffer_low = low
145118
public void setData(ByteBuffer buffer) {
        buffer.rewind();
        this.buffer = CausticUtil.createByteBuffer(buffer.capacity());
        this.buffer.put(buffer);
    }
586526
private void handleWaterMarkEvent(Event<T> event) {
    long watermarkTs = event.getTimestamp();
    long windowEndTs = nextWindowEndTs;
    LOG.fine(String.format("Window end ts %d Watermark ts %d", windowEndTs, watermarkTs));
    while (windowEndTs <= watermarkTs) {
      long currentCount = windowManager.getEventCount(windowEndTs);
      evictionPolicy.setContext(new DefaultEvictionContext(windowEndTs, currentCount));
      if (handler.onTrigger()) {
        windowEndTs += slidingIntervalMs;
      } else {
                /*
                 * No events were found in the previous window interval.
                 * Scan through the events in the queue to find the next
                 * window intervals based on event ts.
                 */
        long ts = getNextAlignedWindowTs(windowEndTs, watermarkTs);
        LOG.fine(String.format("Next aligned window end ts %d", ts));
        if (ts == Long.MAX_VALUE) {
          LOG.fine(String.format("No events to process between %d and watermark ts %d",
              windowEndTs, watermarkTs));
          break;
        }
        windowEndTs = ts;
      }
    }
    nextWindowEndTs = windowEndTs;
  }
438520
public synchronized void mark(int limit)
        throws IllegalArgumentException
    {
        if (limit>_buf.length)
        {
            byte[] new_buf=new byte[limit];
            System.arraycopy(_buf,_pos,new_buf,_pos,_avail-_pos);
            _buf=new_buf;
            if (_byteBuffer!=null)
                _byteBuffer.setBuffer(_buf);
        }
        _mark=_pos;
    }
260078
ByteBuffer writeView(int position, int needs) throws IOException
    {
        int waterMark = position+needs;
        if (waterMark > content.capacity())
        {
            if (refSet.containsKey(content))
            {
                throw new IOException("cannot grow file because of writable mapping for content. (non carbage collected mapping?)");
            }
            int blockSize = fileStore.getBlockSize();
            int newCapacity = Math.max(((waterMark / blockSize) + 1) * blockSize, 2*content.capacity());
            ByteBuffer newBB = ByteBuffer.allocateDirect(newCapacity);
            newBB.put(content);
            newBB.flip();
            content = newBB;
        }
        ByteBuffer bb = content.duplicate();
        refSet.add(content, bb);
        bb.limit(waterMark).position(position);
        return bb;
    }
617174
public Rowtime watermarksPeriodicBounded(long delay) {
		internalProperties.putString(ROWTIME_WATERMARKS_TYPE, ROWTIME_WATERMARKS_TYPE_VALUE_PERIODIC_BOUNDED);
		internalProperties.putLong(ROWTIME_WATERMARKS_DELAY, delay);
		return this;
	}
308828
def SetRaw(self, name, value):
    """"""
    if self.writeback is None:
      logging.warning("Attempting to modify a read only config object.")
    if name in self.constants:
      raise ConstModificationError(
          "Attempting to modify constant value %s" % name)

    self.writeback_data[name] = value
    self.FlushCache()
1368499
public void setRefreshViewPadding(int left, int top, int right, int bottom) {
        mRefreshView.setPadding(left, top, right, bottom);
    }
1083190
public void reset() {
		nextWindow = null;
		watermark = Long.MIN_VALUE;
		triggerWindowStartIndex = 0;
		emptyWindowTriggered = true;
		resetBuffer();
	}
1340005
@Override
    public void mark(int readlimit) {
        abortIfNeeded();
        if ( !isAtStart )
            throw new UnsupportedOperationException("Chunk-encoded stream only supports mark() at the start of the stream.");
        if (is.markSupported()) {
            if (log.isDebugEnabled()) {
                log.debug("AwsChunkedEncodingInputStream marked at the start of the stream "
                        + "(will directly mark the wrapped stream since it's mark-supported).");
            }
            is.mark(readlimit);
        }
        else {
            if (log.isDebugEnabled()) {
                log.debug("AwsChunkedEncodingInputStream marked at the start of the stream "
                        + "(initializing the buffer since the wrapped stream is not mark-supported).");
            }
            decodedStreamBuffer = new DecodedStreamBuffer(maxBufferSize);
        }
    }
115722
public function flushBuffer() {
        $content = $this->format($this->buffer->flush());

        if ( ! $this->is(OutputVerbosity::SILENT)) {
            fwrite($this->getOutputStream(), $content);
        }
    }
638706
public void mark(int readlimit) {
        abortIfNeeded();
        if (log.isDebugEnabled()) {
            log.debug("Input stream marked at " + bytesReadPastMark + " bytes");
        }
        if (bytesReadPastMark <= bufferSize && buffer != null) {
            /*
             * Clear buffer of already-read data to make more space. It's safe
             * to cast bytesReadPastMark to an int because it is known to be
             * less than bufferSize, which is an int.
             */
            byte[] newBuffer = new byte[this.bufferSize];
            System.arraycopy(buffer, bufferOffset, newBuffer, 0, (int)(bytesReadPastMark - bufferOffset));
            this.buffer = newBuffer;
            this.bytesReadPastMark -= bufferOffset;
            this.bufferOffset = 0;
        } else {
            // If mark is called after the buffer was already exceeded, create a new buffer.
            this.bufferOffset = 0;
            this.bytesReadPastMark = 0;
            this.buffer = new byte[this.bufferSize];
        }
    }
771242
public void set(long lowWaterMark, long highWaterMark, long current, double integral,
                    long startTime, long lastSampleTime) {
        this.current = current;
        this.integral = integral;
        this.lowWaterMark = lowWaterMark;
        this.highWaterMark = highWaterMark;
        this.startTime = startTime;
        this.lastSampleTime = lastSampleTime;
    }
434945
public boolean syncWaterMarks(String source, long lwmScn, long hwmScn) {
        setWaterMarks(source, lwmScn, hwmScn);
        return flush();
    }
998214
@Override
    protected void setWatermarks(long nextLowWatermark, long nextHighWatermark)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "setWatermarks",
                        new Object[] { new Long(nextLowWatermark), new Long(nextHighWatermark), new Long(referenceStreamCount) });

        super.setWatermarks(nextLowWatermark + referenceStreamCount, nextHighWatermark + referenceStreamCount);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setWatermarks");
    }
168077
public function markAsRead()
    {
        if (is_null($this->read_at)) {
            $this->forceFill(array(
                'read_at' => $this->freshTimestamp()
            ));

            $this->save();
        }
    }
1176906
public void setWaterMark(long curTime, long val) {
        lastSampleTime = curTime;

        if (!initWaterMark) {
            lowWaterMark = highWaterMark = val;
            initWaterMark = true;
        } else {
            if (val < lowWaterMark)
                lowWaterMark = val;

            if (val > highWaterMark)
                highWaterMark = val;
        }
        /*
         * if(val < lowWaterMark || lowWaterMark < 0)
         * lowWaterMark = val;
         * 
         * if(val > highWaterMark)
         * highWaterMark = val;
         */
        current = val;
    }