summaryrefslogtreecommitdiff
path: root/gnu/java/nio/EpollSelectionKeyImpl.java
diff options
context:
space:
mode:
authorCasey Marshall <csm@gnu.org>2006-09-30 05:19:12 +0000
committerCasey Marshall <csm@gnu.org>2006-09-30 05:19:12 +0000
commit7c2fa5fc198d857672592740a91f30418ef32687 (patch)
tree0bfdbf45967a16cb5f73890c6716ae167160afe7 /gnu/java/nio/EpollSelectionKeyImpl.java
parent4bf4895593deadf01bc48466c8adf6d3dc90767a (diff)
downloadclasspath-7c2fa5fc198d857672592740a91f30418ef32687.tar.gz
2006-09-29 Casey Marshall <csm@gnu.org>
PR 29190 * gnu/java/nio/EpollSelectionKeyImpl.java: extend `AbstractSelectionKey.' (cancel, isValid): removed. * gnu/java/nio/EpollSelectorImpl.java (cancelledKeys): removed. (events): new field. (INITIAL_CAPACITY, MAX_DOUBLING_CAPACITY, CAPACITY_INCREMENT): new fields. (<clinit>): initialize those constants. (<init>): don't initialize `cancelledKeys;' initialize `events.' (doSelect): deregister cancelled keys; remove keys attached to closed channels; wrap `epoll_wait' in `begin' and `end' calls; use `events' buffer; reallocate `events' buffer if needed. (register): reallocate `events' buffer if needed. (reallocateBuffer): new method. (cancel): removed.
Diffstat (limited to 'gnu/java/nio/EpollSelectionKeyImpl.java')
-rw-r--r--gnu/java/nio/EpollSelectionKeyImpl.java20
1 files changed, 2 insertions, 18 deletions
diff --git a/gnu/java/nio/EpollSelectionKeyImpl.java b/gnu/java/nio/EpollSelectionKeyImpl.java
index e163e731d..11113f397 100644
--- a/gnu/java/nio/EpollSelectionKeyImpl.java
+++ b/gnu/java/nio/EpollSelectionKeyImpl.java
@@ -43,11 +43,12 @@ import java.nio.channels.CancelledKeyException;
import java.nio.channels.SelectableChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
+import java.nio.channels.spi.AbstractSelectionKey;
/**
* @author Casey Marshall (csm@gnu.org)
*/
-public class EpollSelectionKeyImpl extends SelectionKey
+public class EpollSelectionKeyImpl extends AbstractSelectionKey
{
final int fd;
private final EpollSelectorImpl selector;
@@ -67,15 +68,6 @@ public class EpollSelectionKeyImpl extends SelectionKey
}
/* (non-Javadoc)
- * @see java.nio.channels.SelectionKey#cancel()
- */
- public void cancel()
- {
- cancelled = true;
- selector.cancel(this);
- }
-
- /* (non-Javadoc)
* @see java.nio.channels.SelectionKey#channel()
*/
public SelectableChannel channel()
@@ -113,14 +105,6 @@ public class EpollSelectionKeyImpl extends SelectionKey
}
/* (non-Javadoc)
- * @see java.nio.channels.SelectionKey#isValid()
- */
- public boolean isValid()
- {
- return valid;
- }
-
- /* (non-Javadoc)
* @see java.nio.channels.SelectionKey#readyOps()
*/
public int readyOps()