jetty-9 renamed ReadInterest to fillInterest
This commit is contained in:
parent
7df281bb16
commit
40d4e1070f
|
@ -150,7 +150,7 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
{
|
||||
_in = in;
|
||||
if (in == null || BufferUtil.hasContent(in))
|
||||
_fillInterest.readable();
|
||||
_fillInterest.fillable();
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -356,7 +356,7 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
*/
|
||||
public void reset()
|
||||
{
|
||||
_fillInterest.close();
|
||||
_fillInterest.onClose();
|
||||
_writeFlusher.onClose();
|
||||
_ishut=false;
|
||||
_oshut=false;
|
||||
|
@ -435,7 +435,7 @@ public class ByteArrayEndPoint extends AbstractEndPoint
|
|||
LOG.debug("{} idle timeout expired", this);
|
||||
|
||||
TimeoutException timeout = new TimeoutException("Idle timeout expired: " + idleElapsed + "/" + idleTimeout + " ms");
|
||||
_fillInterest.failed(timeout);
|
||||
_fillInterest.onFail(timeout);
|
||||
_writeFlusher.onFail(timeout);
|
||||
|
||||
if (isOutputShutdown())
|
||||
|
|
|
@ -28,7 +28,7 @@ public abstract class FillInterest
|
|||
/* ------------------------------------------------------------ */
|
||||
/** Call to register interest in a callback when a read is possible.
|
||||
* The callback will be called either immediately if {@link #needsFill()}
|
||||
* returns true or eventually once {@link #readable()} is called.
|
||||
* returns true or eventually once {@link #fillable()} is called.
|
||||
* @param context
|
||||
* @param callback
|
||||
* @throws ReadPendingException
|
||||
|
@ -42,18 +42,18 @@ public abstract class FillInterest
|
|||
try
|
||||
{
|
||||
if (needsFill())
|
||||
readable();
|
||||
fillable();
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
failed(e);
|
||||
onFail(e);
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** Call to signal that a read is now possible.
|
||||
*/
|
||||
public void readable()
|
||||
public void fillable()
|
||||
{
|
||||
if (_interested.compareAndSet(true,false))
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ public abstract class FillInterest
|
|||
/* ------------------------------------------------------------ */
|
||||
/** Call to signal a failure to a registered interest
|
||||
*/
|
||||
public void failed(Throwable cause)
|
||||
public void onFail(Throwable cause)
|
||||
{
|
||||
if (_interested.compareAndSet(true,false))
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ public abstract class FillInterest
|
|||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public void close()
|
||||
public void onClose()
|
||||
{
|
||||
if (_interested.compareAndSet(true,false))
|
||||
{
|
||||
|
@ -106,14 +106,14 @@ public abstract class FillInterest
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("ReadInterest@%x{%b,%s,%s}",hashCode(),_interested.get(),_callback,_context);
|
||||
return String.format("FillInterest@%x{%b,%s,%s}",hashCode(),_interested.get(),_callback,_context);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/** Register the read interest
|
||||
* Abstract method to be implemented by the Specific ReadInterest to
|
||||
* enquire if a read is immediately possible and if not to schedule a future
|
||||
* call to {@link #readable()} or {@link #failed(Throwable)}
|
||||
* call to {@link #fillable()} or {@link #onFail(Throwable)}
|
||||
* @return true if a read is possible
|
||||
* @throws IOException
|
||||
*/
|
||||
|
|
|
@ -178,7 +178,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements SelectorMa
|
|||
setKeyInterests(oldInterestOps, newInterestOps);
|
||||
updateLocalInterests(readyOps, false);
|
||||
if (_key.isReadable())
|
||||
_fillInterest.readable();
|
||||
_fillInterest.fillable();
|
||||
if (_key.isWritable())
|
||||
_writeFlusher.completeWrite();
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements SelectorMa
|
|||
LOG.debug("{} idle timeout expired", this);
|
||||
|
||||
TimeoutException timeout = new TimeoutException("Idle timeout expired: " + idleElapsed + "/" + idleTimeout + " ms");
|
||||
_fillInterest.failed(timeout);
|
||||
_fillInterest.onFail(timeout);
|
||||
_writeFlusher.onFail(timeout);
|
||||
|
||||
if (isOutputShutdown())
|
||||
|
@ -269,7 +269,7 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements SelectorMa
|
|||
{
|
||||
super.onClose();
|
||||
_writeFlusher.onClose();
|
||||
_fillInterest.close();
|
||||
_fillInterest.onClose();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -139,7 +139,7 @@ public class SslConnection extends AbstractConnection
|
|||
// wake up whoever is doing the fill or the flush so they can
|
||||
// do all the filling, unwrapping ,wrapping and flushing
|
||||
if (_decryptedEndPoint._fillInterest.isInterested())
|
||||
_decryptedEndPoint._fillInterest.readable();
|
||||
_decryptedEndPoint._fillInterest.fillable();
|
||||
|
||||
// If we are handshaking, then wake up any waiting write as well as it may have been blocked on the read
|
||||
if ( _decryptedEndPoint._flushRequiresFillToProgress)
|
||||
|
@ -165,7 +165,7 @@ public class SslConnection extends AbstractConnection
|
|||
synchronized(_decryptedEndPoint)
|
||||
{
|
||||
if (_decryptedEndPoint._fillInterest.isInterested())
|
||||
_decryptedEndPoint._fillInterest.failed(cause);
|
||||
_decryptedEndPoint._fillInterest.onFail(cause);
|
||||
|
||||
if (_decryptedEndPoint._flushRequiresFillToProgress)
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ public class SslConnection extends AbstractConnection
|
|||
if (_fillRequiresFlushToProgress)
|
||||
{
|
||||
_fillRequiresFlushToProgress = false;
|
||||
_fillInterest.readable();
|
||||
_fillInterest.fillable();
|
||||
}
|
||||
|
||||
if (_writeFlusher.isInProgress())
|
||||
|
@ -241,7 +241,7 @@ public class SslConnection extends AbstractConnection
|
|||
if (_fillRequiresFlushToProgress)
|
||||
{
|
||||
_fillRequiresFlushToProgress = false;
|
||||
_fillInterest.failed(x);
|
||||
_fillInterest.onFail(x);
|
||||
}
|
||||
|
||||
if (_writeFlusher.isInProgress())
|
||||
|
|
Loading…
Reference in New Issue