Skip navigation links

Oracle® Database XML Java API Reference
12c Release 1 (12.1)

E15981-09


oracle.xml.scalable
Interface PageManager

All Known Implementing Classes:
FilePageManager

public interface PageManager

Interface for managing pages


Nested Class Summary
static interface PageManager.PageId
          PageId Interface

 

Method Summary
 void close()
          Closes the PageManager.
 void deletePage(PageManager.PageId id)
          Delete the page for the given page id.
 PageManager.PageId pageIdFromBytes(byte[] buf, int start)
          Create pageId from a byte representation in the byte buffer starting at 'start' index.
 byte pageIdToBytes(PageManager.PageId pageid, byte[] buf, int start)
          Write a byte representation of the PageId into the byte buffer starting at 'start' index.
 int pageLength(PageManager.PageId id)
          Gets the page length.
 int readPage(PageManager.PageId id, byte[] buffer, int start)
          Fill the buffer for the given page id.
 PageManager.PageId writePage(byte[] buffer, int start, int length)
          Writes/Stores a page.
 PageManager.PageId writePage(PageManager.PageId id, byte[] buffer, int start, int length)
          Updates a page for the given page id.

 

Method Detail

writePage

PageManager.PageId writePage(byte[] buffer,
                             int start,
                             int length)
Writes/Stores a page. Returns the page Id.
Parameters:
buffer - - byte buffer containing a page to be stored.
start - - start of the page in the buffer.
length - - the length of the page.
Returns:
- an Object containing the page Id.

writePage

PageManager.PageId writePage(PageManager.PageId id,
                             byte[] buffer,
                             int start,
                             int length)
Updates a page for the given page id.
Parameters:
id - - an Object containing the page Id.
buffer - - byte buffer containing a page to be stored.
start - - start of the page in the buffer.
length - - the length of the page.
Returns:
- an Object containing the page Id.

readPage

int readPage(PageManager.PageId id,
             byte[] buffer,
             int start)
Fill the buffer for the given page id.
Parameters:
id - - an Object containing the page Id.
buffer - - byte buffer containing a page to be stored.
start - - start of the page in the buffer.
Returns:
- the length of the page.

deletePage

void deletePage(PageManager.PageId id)
Delete the page for the given page id.
Parameters:
id - - an Object containing the page Id.

pageLength

int pageLength(PageManager.PageId id)
Gets the page length.
Parameters:
id - - an Object containing the page Id.
Returns:
- the length of the page.

close

void close()
Closes the PageManager.

pageIdToBytes

byte pageIdToBytes(PageManager.PageId pageid,
                   byte[] buf,
                   int start)
Write a byte representation of the PageId into the byte buffer starting at 'start' index.
Parameters:
pageId - - pageId to be converted to bytes
buf - - byte array to write into
start - - start index
Returns:
number of bytes written, or -1 if buffer size is not sufficient

pageIdFromBytes

PageManager.PageId pageIdFromBytes(byte[] buf,
                                   int start)
Create pageId from a byte representation in the byte buffer starting at 'start' index.
Parameters:
buf - - byte array to read from
start - - start index
Returns:
pageId - pageId converted from bytes in buf or null if bytes in the buf are invalid

Skip navigation links

Oracle® Database XML Java API Reference
12c Release 1 (12.1)

E15981-09


Copyright © 2003, 2014, Oracle and/or its affiliates. All rights reserved.