org.exist.storage.dom
Class DOMFile.DOMPage

java.lang.Object
  extended byorg.exist.storage.dom.DOMFile.DOMPage
All Implemented Interfaces:
Cacheable
Enclosing class:
DOMFile

protected final class DOMFile.DOMPage
extends java.lang.Object
implements Cacheable


Field Summary
 
Fields inherited from interface org.exist.storage.cache.Cacheable
MAX_REF
 
Constructor Summary
DOMFile.DOMPage()
           
DOMFile.DOMPage(long pos)
           
DOMFile.DOMPage(Paged.Page page)
           
 
Method Summary
 boolean allowUnload()
          Is it safe to unload the Cacheable from the cache? Called before an object is actually removed.
 void cleanUp()
          Walk through the page after records have been removed.
 int decReferenceCount()
          Decrease the reference count of this object by one and return it.
 java.lang.String dumpPage()
           
 boolean equals(java.lang.Object obj)
           
 DOMFile.RecordPos findRecord(short targetId)
           
 long getKey()
          Get a unique key for the object.
 DOMFile.DOMFilePageHeader getPageHeader()
           
 long getPageNum()
           
 int getReferenceCount()
          Get the current reference count.
 int getTimestamp()
          Get the current timestamp marker.
 int incReferenceCount()
          Increase the reference count of this object by one and return it.
 void invalidate()
           
 boolean isDirty()
           
 boolean isInvalidated()
           
 void setDirty(boolean dirty)
           
 void setReferenceCount(int count)
          Set the reference count of this object.
 void setTimestamp(int timestamp)
          Set the timestamp marker.
 boolean sync(boolean syncJournal)
          Called before the object is released by the cache.
 void write()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMFile.DOMPage

public DOMFile.DOMPage()

DOMFile.DOMPage

public DOMFile.DOMPage(long pos)

DOMFile.DOMPage

public DOMFile.DOMPage(Paged.Page page)
Method Detail

findRecord

public DOMFile.RecordPos findRecord(short targetId)

getKey

public long getKey()
Description copied from interface: Cacheable
Get a unique key for the object. Usually this is the page number.

Specified by:
getKey in interface Cacheable
Returns:
unique key

getReferenceCount

public int getReferenceCount()
Description copied from interface: Cacheable
Get the current reference count.

Specified by:
getReferenceCount in interface Cacheable
Returns:

decReferenceCount

public int decReferenceCount()
Description copied from interface: Cacheable
Decrease the reference count of this object by one and return it.

Specified by:
decReferenceCount in interface Cacheable
Returns:
the reference count

incReferenceCount

public int incReferenceCount()
Description copied from interface: Cacheable
Increase the reference count of this object by one and return it.

Specified by:
incReferenceCount in interface Cacheable
Returns:
the reference count

setReferenceCount

public void setReferenceCount(int count)
Description copied from interface: Cacheable
Set the reference count of this object.

Specified by:
setReferenceCount in interface Cacheable
Parameters:
count -

setTimestamp

public void setTimestamp(int timestamp)
Description copied from interface: Cacheable
Set the timestamp marker.

Specified by:
setTimestamp in interface Cacheable
Parameters:
timestamp -

getTimestamp

public int getTimestamp()
Description copied from interface: Cacheable
Get the current timestamp marker.

Specified by:
getTimestamp in interface Cacheable
Returns:
timestamp marker

getPageHeader

public DOMFile.DOMFilePageHeader getPageHeader()

getPageNum

public long getPageNum()

isDirty

public boolean isDirty()
Specified by:
isDirty in interface Cacheable

setDirty

public void setDirty(boolean dirty)

write

public void write()

dumpPage

public java.lang.String dumpPage()

sync

public boolean sync(boolean syncJournal)
Description copied from interface: Cacheable
Called before the object is released by the cache. The object should prepare to be garbage collected. All unwritten data should be flushed to disk.

Specified by:
sync in interface Cacheable

allowUnload

public boolean allowUnload()
Description copied from interface: Cacheable
Is it safe to unload the Cacheable from the cache? Called before an object is actually removed. Return false to avoid being removed.

Specified by:
allowUnload in interface Cacheable
Returns:

equals

public boolean equals(java.lang.Object obj)

invalidate

public void invalidate()

isInvalidated

public boolean isInvalidated()

cleanUp

public void cleanUp()
Walk through the page after records have been removed. Set the tid counter to the next spare id that can be used for following insertions.



<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.