You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <ji...@apache.org> on 2008/11/05 12:01:44 UTC

[jira] Created: (DERBY-3935) Introduce interface for a position aware stream

Introduce interface for a position aware stream
-----------------------------------------------

                 Key: DERBY-3935
                 URL: https://issues.apache.org/jira/browse/DERBY-3935
             Project: Derby
          Issue Type: Sub-task
          Components: JDBC
    Affects Versions: 10.5.0.0
            Reporter: Kristian Waagan
            Assignee: Kristian Waagan
            Priority: Minor


Add an interface for streams that are aware of their position and that can reposition itself on request.
Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.

The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3935:
-----------------------------------

    Derby Info:   (was: [Patch Available])

Removing the patch available flag, as it is very likely that a new patch will be attached soon.
I need to consider the options, and the throws clause needs to be fixed anyway.

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3935-1a-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645782#action_12645782 ] 

Knut Anders Hatlen commented on DERBY-3935:
-------------------------------------------

The patch looks fine to me. +1 to commit.

(Tiny nit: LOBInputStream.reposition() doesn't need to be declared as throws EOFException since it's also declared to throw IOException. Keeping both the @throws tags in the comment is fine, though.)

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3935-1a-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645785#action_12645785 ] 

Knut Anders Hatlen commented on DERBY-3935:
-------------------------------------------

By the way, would it make sense at some point to merge the PositionedStream interface with Resetable? Or perhaps make PositionedStream extend Resetable? Resetable.resetStream() is just a special case of PositionedStream.reposition(), and it seems like both PositionStoreStream and LOBInputStream have methods that match the functionality defined by Resetable (PSS actually implements Resetable).

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3935-1a-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3935:
-----------------------------------

    Attachment: derby-3935-1a-PositionedStream.diff

'derby-3935-1a-PositionedStream.diff' is the first revision of the PositionedStream interface.
Two streams implement the interface: PositionedStoreStream and LOBInputStream.

The interface has the following methods:
 - asInputStream() : convenience method to return a reference to the stream as InputStream.
 - getPosition() : returns the current position of the stream.
 - reposition(long) : repositions the stream to the requested position.

Patch ready for review.

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3935-1a-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3935:
-----------------------------------

    Attachment: derby-3935-1b-PositionedStream.diff

Regarding Resetable and PositionedStream (PS), the former is more tightly bound to store.
For instance, initStream handles locking, which is probably not required for data streams outside of store. I don't see any immediate need to add the three methods resetStream, initStream and closeStream to LOBInputStream.
I'm opting for committing what I have now, and look at combining the interfaces later if it turns out that is the best thing to do.

I attached revision 1b, which adds two debug blocks (checking for a negative requested position), removed the throws clause for EOFException and fixed some errors in the JavaDoc.
After rerunning the tests, I intend to commit patch 1b.

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3935-1a-PositionedStream.diff, derby-3935-1b-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan closed DERBY-3935.
----------------------------------


Closing issue, no more required changes have been identified. If the interface still needs to be changed, it will happen under the issue requiring the change.

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3935-1a-PositionedStream.diff, derby-3935-1b-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3935:
-----------------------------------

    Derby Info: [Patch Available]

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3935-1a-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3935:
-----------------------------------

    Fix Version/s: 10.5.0.0

Committed patch 1b (with one modification) to trunk with revision 720517.
I removed the final keyword from the method signature of reposition in the interface.

I'm keeping the issue open for a while, as there might be more changes to be done.

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3935-1a-PositionedStream.diff, derby-3935-1b-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-3935) Introduce interface for a position aware stream

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan resolved DERBY-3935.
------------------------------------

    Resolution: Fixed

I don't expect to work more on this issue, but I filed DERBY-4002 for the task of merging the two interfaces.

> Introduce interface for a position aware stream
> -----------------------------------------------
>
>                 Key: DERBY-3935
>                 URL: https://issues.apache.org/jira/browse/DERBY-3935
>             Project: Derby
>          Issue Type: Sub-task
>          Components: JDBC
>    Affects Versions: 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>             Fix For: 10.5.0.0
>
>         Attachments: derby-3935-1a-PositionedStream.diff, derby-3935-1b-PositionedStream.diff
>
>
> Add an interface for streams that are aware of their position and that can reposition itself on request.
> Initially there will be two such stream objects; PositionedStoreStream and LOBInputStream.
> The interface will be used to allow the Clob implementation (including UTF8Reader) to handle the various internal Clob representations in a consistent manner when it comes to positioning the underlying byte stream.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.