From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/storage/store Modified Files: BFile.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: BFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/BFile.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** BFile.java 2 Feb 2004 15:30:37 -0000 1.14 --- BFile.java 25 Mar 2004 12:50:50 -0000 1.15 *************** *** 1523,1527 **** } ! public final long getAddress() { return address_; } --- 1523,1527 ---- } ! public long getAddress() { return address_; } *************** *** 1530,1543 **** * @see java.io.InputStream#read() */ ! public final int read() throws IOException { ! if (pageLen_ < 0) ! return -1; if (offset_ == pageLen_) { ! final long next = nextPage_.getPageHeader().getNextInChain(); ! if (next < 1) { ! pageLen_ = -1; ! offset_ = 0; ! return -1; ! } try { lock.acquire(Lock.READ_LOCK); --- 1530,1546 ---- * @see java.io.InputStream#read() */ ! public int read() throws IOException { if (offset_ == pageLen_) { ! advance(); ! } ! return pageLen_ == -1 ? -1 : (int) (nextPage_.data[offset_++] & 0xFF); ! } ! ! private void advance() throws IOException { ! long next = nextPage_.getPageHeader().getNextInChain(); ! if (next < 1) { ! pageLen_ = -1; ! offset_ = 0; ! } else { try { lock.acquire(Lock.READ_LOCK); *************** *** 1553,1559 **** } } - return (int) (nextPage_.data[offset_++] & 0xFF); } ! /* (non-Javadoc) * @see java.io.InputStream#available() --- 1556,1561 ---- } } } ! /* (non-Javadoc) * @see java.io.InputStream#available() |