com.faunos.skwish.sys.filters
Class AppendProtectedFilterSegment

java.lang.Object
  extended by com.faunos.skwish.Segment
      extended by com.faunos.skwish.sys.filters.FilterSegment
          extended by com.faunos.skwish.sys.filters.AppendProtectedFilterSegment
All Implemented Interfaces:
Range
Direct Known Subclasses:
DeleteSetFilterSegment, SubSegment

public class AppendProtectedFilterSegment
extends FilterSegment

A filter that prevents appending entries to an underlying Segment.

Author:
Babak Farhang

Field Summary
 
Fields inherited from class com.faunos.skwish.sys.filters.FilterSegment
inner
 
Fields inherited from class com.faunos.skwish.Segment
validator
 
Constructor Summary
AppendProtectedFilterSegment(Segment inner)
          Creates a new instance with the underlying inner segment.
 
Method Summary
 long insertEntry(ByteBuffer entry)
          Unsupported operation.
 long insertEntry(ReadableByteChannel entry)
          Unsupported operation.
 long killNext(int count)
          Unsupported operation.
 
Methods inherited from class com.faunos.skwish.sys.filters.FilterSegment
delete, getBaseId, getEntry, getEntryChannel, getEntryCount, getEntryPart, getEntrySize, getNextId, isReadOnly
 
Methods inherited from class com.faunos.skwish.Segment
contains, delete, delete, getEntry, getEntrySize, getEntryStream, hi, isDeleted, isDeleted, killNext, lo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppendProtectedFilterSegment

public AppendProtectedFilterSegment(Segment inner)
Creates a new instance with the underlying inner segment.

Method Detail

insertEntry

public long insertEntry(ByteBuffer entry)
                 throws IOException
Unsupported operation. Throws UnsupportedOperationException.

Overrides:
insertEntry in class FilterSegment
Parameters:
entry - they contents of the entry
Returns:
the ID assigned to the entry
Throws:
IOException

insertEntry

public long insertEntry(ReadableByteChannel entry)
                 throws IOException
Unsupported operation. Throws UnsupportedOperationException.

Overrides:
insertEntry in class FilterSegment
Throws:
IOException

killNext

public long killNext(int count)
              throws IOException
Unsupported operation. Throws UnsupportedOperationException.

Overrides:
killNext in class FilterSegment
Parameters:
count - the number of entries to kill (must be greater than 1)
Returns:
the value that getNextId() returns after this method has completed
Throws:
IOException


SourceForge.net Logo