KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > iapi > store > raw > LogicalUndoable


1 /*
2
3    Derby - Class org.apache.derby.iapi.store.raw.LogicalUndoable
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.iapi.store.raw;
23
24 import org.apache.derby.iapi.error.StandardException;
25
26 import org.apache.derby.iapi.store.access.conglomerate.LogicalUndo;
27
28 import org.apache.derby.iapi.types.DataValueDescriptor;
29
30 import org.apache.derby.iapi.services.io.LimitObjectInput;
31 import java.io.IOException JavaDoc;
32
33 /**
34     A LogicalUndoable is a log operation that operates on the content of a page
35     and the log operation needs logical undo. This interface is used by
36     LogicalUndo to extract information out of the log record, and to pass back
37     to the logging system the real location where the roll back should happen.
38     <P>
39     It has specific page information such as its segment Id, container Id, page
40     number, and it knows how to restore a storable row from the information
41     stored in the log record.
42
43     @see org.apache.derby.iapi.store.access.conglomerate.LogicalUndo
44 */

45 public interface LogicalUndoable extends Undoable
46 {
47     /**
48         Return the containerHandle used by this log operation. Logical cannot
49         change container identity between roll forward and roll back. This
50         method should only be called by LogicalUndo to extract information from
51         the log record.
52
53         @exception StandardException Standard Cloudscape error policy
54     */

55     public ContainerHandle getContainer() throws StandardException;
56
57     /**
58         Return the recordHandle stored in the log operation that correspond to
59         the record that was changed in the rollforward. This method should
60         only be called by LogicalUndo to extract information from the log
61         record.
62
63     */

64     public RecordHandle getRecordHandle();
65
66     /**
67         Restore the row stored in the log operation. This method should only
68         be called by LogicalUndo to extract information from the log record.
69
70         @param row an IN/OUT parameter, caller passed in the row with
71         the correct column number and type, the log operation will restore the
72         row with the optional data stored in the log record.
73
74         @exception StandardException Standard Cloudscape error policy
75         @exception IOException Method may read from in
76
77         @see LogicalUndo
78     */

79     public void restoreLoggedRow(Object JavaDoc[] row, LimitObjectInput in)
80         throws StandardException, IOException JavaDoc;
81
82     /**
83         If the row has moved, reset the record handle that the undo should be applied on.
84
85         @param rh the RecordHandle that represents the row's new location
86     */

87     public void resetRecordHandle(RecordHandle rh);
88 }
89
Popular Tags