APIdia Launch Partner
Top Description Fields Constructors Methods
sun.net.www.http

pack-priv Class KeepAliveStreamCleaner

extends LinkedList<KeepAliveCleanerEntry>
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable
Annotations
@SuppressWarnings:serial
Imports
java.io.IOException, java.util.LinkedList, sun.net.NetProperties, java.util.concurrent.TimeUnit, java.util.concurrent.locks.Condition, .ReentrantLock

This class is used to clean up any remaining data that may be on a KeepAliveStream so that the connection can be cached in the KeepAliveCache. Instances of this class can be used as a FIFO queue for KeepAliveCleanerEntry objects. Executing this Runnable removes each KeepAliveCleanerEntry from the Queue, reads the remaining bytes on its KeepAliveStream, and if successful puts the connection in the KeepAliveCache.
Author
Chris Hegarty

Field Summary

Modifier and TypeField and Description
protected static final int
protected static final long
private static final int
private final ReentrantLock
protected static final int
private final Condition

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv final void
lock()

public boolean
offer(KeepAliveCleanerEntry e)

Overrides java.util.LinkedList.offer.

Implements java.util.Deque.offer.

Adds the specified element as the tail (last element) of this list.

public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

pack-priv final void
pack-priv final void
Inherited from java.util.LinkedList:
addaddaddAlladdAlladdFirstaddLastclearclonecontainsdescendingIteratorelementgetgetFirstgetLastindexOflastIndexOflistIteratorofferFirstofferLastpeekpeekFirstpeekLastpollpollFirstpollLastpoppushremoveremoveremoveremoveFirstremoveFirstOccurrenceremoveLastremoveLastOccurrencereversedsetsizespliteratortoArraytoArray

Field Detail

MAX_CAPACITYback to summary
protected static final int MAX_CAPACITY
MAX_DATA_REMAININGback to summary
protected static final long MAX_DATA_REMAINING
MAX_RETRIESback to summary
private static final int MAX_RETRIES
queueLockback to summary
private final ReentrantLock queueLock
TIMEOUTback to summary
protected static final int TIMEOUT
waiterback to summary
private final Condition waiter

Constructor Detail

KeepAliveStreamCleanerback to summary
pack-priv KeepAliveStreamCleaner()

Method Detail

lockback to summary
pack-priv final void lock()
offerback to summary
public boolean offer(KeepAliveCleanerEntry e)

Overrides java.util.LinkedList.offer.

Implements java.util.Deque.offer.

Doc from java.util.LinkedList.offer.

Adds the specified element as the tail (last element) of this list.

Annotations
@Override
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
signalAllback to summary
pack-priv final void signalAll()
unlockback to summary
pack-priv final void unlock()