Top Description Inners Fields Constructors Methods
com.amazon.ion.impl

pack-priv final Class UnifiedSavePointManagerX

extends Object
Class Inheritance

These classes (UnifiedSavePointManager and the contained SavePoint) isolate the save point handing. Its effect spans both the input stream and the underlying buffer - so the manager keeps it's own reference to these. By doing so this should make save points easier to use. It grabs the buffer from the stream since it need a reference to the UnifiedInputBuffer on most calls and doesn't need an extra de-ref (mostly for code clarity) The general life time of a save point is: . allocate a save point . . start the save point, which sets the start idx and pos - and pins the buffer pages with a use count . . mark_end the save point, which sets the end idx and pos . . . activate the save point, which sets the input streams pos to the start . . . deactivate the save point, which pops the save point stack and restores the stream to its previous position . . clear the save point. this clears its internal values and releases its use counter on the buffer. As the buffers in use count goes to zero it may release any unnecessary pages. . free the save point this order of operation, as nested above, is enforced by checking the state of the save points and member values like the end position. if the end position is not set it is treated as "to end of file"

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
pack-priv UnifiedSavePointManagerX.SavePoint
pack-priv UnifiedInputBufferX
pack-priv UnifiedSavePointManagerX.SavePoint
pack-priv int
pack-priv UnifiedSavePointManagerX.SavePoint
pack-priv int
pack-priv UnifiedInputStreamX
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private final void
end_point_too_far(int curr_idx)

public final boolean
public final long
private void
private final void
private final UnifiedSavePointManagerX.SavePoint
save_point_start(UnifiedSavePointManagerX.SavePoint sp, long line_number, long line_start)

private final void
public final UnifiedSavePointManagerX.SavePoint
public final UnifiedSavePointManagerX.SavePoint
public final void
public final void
public final void
savePointPushActive(UnifiedSavePointManagerX.SavePoint sp, long line_number, long line_start)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_active_stackback to summary
pack-priv UnifiedSavePointManagerX.SavePoint _active_stack
_bufferback to summary
pack-priv UnifiedInputBufferX _buffer
_freeback to summary
pack-priv UnifiedSavePointManagerX.SavePoint _free
_free_countback to summary
pack-priv int _free_count
_inuseback to summary
pack-priv UnifiedSavePointManagerX.SavePoint _inuse
_open_save_pointsback to summary
pack-priv int _open_save_points
_streamback to summary
pack-priv UnifiedInputStreamX _stream
FREE_LIST_LIMITback to summary
private static final int FREE_LIST_LIMIT

Constructor Detail

UnifiedSavePointManagerXback to summary
public UnifiedSavePointManagerX(UnifiedInputStreamX stream)

Method Detail

end_point_too_farback to summary
private final void end_point_too_far(int curr_idx)
isSavePointOpenback to summary
public final boolean isSavePointOpen()
lengthOfback to summary
public final long lengthOf(UnifiedSavePointManagerX.SavePoint sp)
save_point_clearback to summary
private void save_point_clear(UnifiedSavePointManagerX.SavePoint sp)
save_point_mark_endback to summary
private final void save_point_mark_end(UnifiedSavePointManagerX.SavePoint sp, int offset)
save_point_startback to summary
private final UnifiedSavePointManagerX.SavePoint save_point_start(UnifiedSavePointManagerX.SavePoint sp, long line_number, long line_start)
save_point_unpinback to summary
private final void save_point_unpin(UnifiedSavePointManagerX.SavePoint sp)
savePointActiveTopback to summary
public final UnifiedSavePointManagerX.SavePoint savePointActiveTop()
savePointAllocateback to summary
public final UnifiedSavePointManagerX.SavePoint savePointAllocate()
savePointFreeback to summary
public final void savePointFree(UnifiedSavePointManagerX.SavePoint sp)
savePointPopActiveback to summary
public final void savePointPopActive(UnifiedSavePointManagerX.SavePoint sp)
savePointPushActiveback to summary
public final void savePointPushActive(UnifiedSavePointManagerX.SavePoint sp, long line_number, long line_start)
com.amazon.ion.impl back to summary

public Class UnifiedSavePointManagerX.SavePoint

extends Object
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private int
private int
private UnifiedSavePointManagerX.SavePoint
private UnifiedSavePointManagerX.SavePoint
private UnifiedSavePointManagerX
private UnifiedSavePointManagerX.SavePoint
private int
private int
private long
private long
private int
private int
private long
private long
private int
private UnifiedSavePointManagerX.SavePoint.SavePointState

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public final void
public final void
free()

public final long
public final int
public final int
public final int
public final int
public final long
public final long
public final int
public final long
public final int
public final long
public final long
public final int
public final boolean
public final boolean
public final boolean
public final long
public final void
public final void
markEnd(int offset)

public final void
private final void
set_end_pos(int idx, int pos)

public final void
private final void
set_prev_pos(int idx, int pos, int limit, long line_count, long line_start)

private final void
set_start_pos(int idx, int pos, long line_count, long line_start)

public final void
start(long line_number, long line_start)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_end_idxback to summary
private int _end_idx
_end_posback to summary
private int _end_pos
_nextback to summary
private UnifiedSavePointManagerX.SavePoint _next
_next_activeback to summary
private UnifiedSavePointManagerX.SavePoint _next_active
_ownerback to summary
private UnifiedSavePointManagerX _owner
_prevback to summary
private UnifiedSavePointManagerX.SavePoint _prev
_prev_idxback to summary
private int _prev_idx
_prev_limitback to summary
private int _prev_limit
_prev_line_countback to summary
private long _prev_line_count
_prev_line_startback to summary
private long _prev_line_start
_prev_posback to summary
private int _prev_pos
_start_idxback to summary
private int _start_idx
_start_line_countback to summary
private long _start_line_count
_start_line_startback to summary
private long _start_line_start
_start_posback to summary
private int _start_pos
_stateback to summary
private UnifiedSavePointManagerX.SavePoint.SavePointState _state

Constructor Detail

SavePointback to summary
pack-priv SavePoint(UnifiedSavePointManagerX owner)

Method Detail

clearback to summary
public final void clear()
freeback to summary
public final void free()
getEndFilePositionback to summary
public final long getEndFilePosition()
getEndIdxback to summary
public final int getEndIdx()
getEndPosback to summary
public final int getEndPos()
getPrevIdxback to summary
public final int getPrevIdx()
getPrevLimitback to summary
public final int getPrevLimit()
getPrevLineNumberback to summary
public final long getPrevLineNumber()
getPrevLineStartback to summary
public final long getPrevLineStart()
getPrevPosback to summary
public final int getPrevPos()
getStartFilePositionback to summary
public final long getStartFilePosition()
getStartIdxback to summary
public final int getStartIdx()
getStartLineNumberback to summary
public final long getStartLineNumber()
getStartLineStartback to summary
public final long getStartLineStart()
getStartPosback to summary
public final int getStartPos()
isActiveback to summary
public final boolean isActive()
isClearback to summary
public final boolean isClear()
isDefinedback to summary
public final boolean isDefined()
lengthback to summary
public final long length()
markEndback to summary
public final void markEnd()
markEndback to summary
public final void markEnd(int offset)
set_activeback to summary
public final void set_active()
set_end_posback to summary
private final void set_end_pos(int idx, int pos)
set_inactiveback to summary
public final void set_inactive()
set_prev_posback to summary
private final void set_prev_pos(int idx, int pos, int limit, long line_count, long line_start)
set_start_posback to summary
private final void set_start_pos(int idx, int pos, long line_count, long line_start)
startback to summary
public final void start(long line_number, long line_start)
com.amazon.ion.impl back to summary

public final Enum UnifiedSavePointManagerX.SavePoint.SavePointState

extends Enum<UnifiedSavePointManagerX.SavePoint.SavePointState>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final UnifiedSavePointManagerX.SavePoint.SavePointState
public static final UnifiedSavePointManagerX.SavePoint.SavePointState
public static final UnifiedSavePointManagerX.SavePoint.SavePointState

Constructor Summary

AccessConstructor and Description
private

Constructor Detail

SavePointStateback to summary
private SavePointState()

Method Detail

valueOfback to summary
public static UnifiedSavePointManagerX.SavePoint.SavePointState valueOf(String name)
valuesback to summary
public static UnifiedSavePointManagerX.SavePoint.SavePointState[] values()