01: /*
02:
03: Derby - Class org.apache.derbyTesting.unitTests.store.T_DaemonService
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to You under the Apache License, Version 2.0
09: (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.derbyTesting.unitTests.store;
23:
24: import org.apache.derby.iapi.store.raw.*;
25:
26: import org.apache.derby.iapi.services.io.FormatIdUtil;
27: import org.apache.derby.iapi.services.io.Formatable;
28: import org.apache.derby.iapi.services.io.StoredFormatIds;
29: import org.apache.derby.iapi.error.StandardException;
30: import org.apache.derby.iapi.store.raw.log.LogInstant;
31: import org.apache.derby.iapi.util.ByteArray;
32: import java.io.IOException;
33: import java.io.OutputStream;
34: import java.io.ObjectInput;
35: import java.io.ObjectOutput;
36: import org.apache.derby.iapi.services.io.LimitObjectInput;
37:
38: public class T_Compensation implements Compensation {
39: // no-arg constructor, required by Formatable
40: public T_Compensation() {
41: super ();
42: }
43:
44: /*
45: Loggable methods
46: */
47: public void doMe(Transaction xact, LogInstant instant,
48: LimitObjectInput in) {
49: //System.out.println("Loggable.doMe("+toString()+")");
50: return;
51: }
52:
53: /*
54: methods to support prepared log
55: the following two methods should not be called during recover
56: */
57:
58: public ByteArray getPreparedLog() {
59: return (ByteArray) null;
60: }
61:
62: public boolean needsRedo(Transaction xact) {
63: return false;
64: }
65:
66: public void releaseResource(Transaction xact) {
67: return;
68: }
69:
70: public int group() {
71: return Loggable.COMPENSATION | Loggable.RAWSTORE;
72: }
73:
74: /*
75: Compensation methods.
76: */
77: public void setUndoOp(Undoable op) {
78: return;
79: }
80:
81: /*
82: Formatable methods
83: */
84: public void writeExternal(ObjectOutput out) throws IOException {
85: return;
86: }
87:
88: public void readExternal(ObjectInput in) throws IOException,
89: ClassNotFoundException {
90: return;
91: }
92:
93: public int getTypeFormatId() {
94: return StoredFormatIds.SERIALIZABLE_FORMAT_ID;
95: }
96: }
|