1 23 24 28 50 package com.sun.jts.CosTransactions; 51 52 54 import java.io.*; 55 56 64 71 class LogControlDescriptor implements Serializable { 72 74 final static int SIZEOF = 3*LogLSN.SIZEOF; 75 76 LogLSN headLSN = new LogLSN(); 77 LogLSN tailLSN = new LogLSN(); 78 LogLSN nextLSN = new LogLSN(); 79 80 88 LogControlDescriptor() { 89 headLSN = new LogLSN(); 90 tailLSN = new LogLSN(); 91 nextLSN = new LogLSN(); 92 } 93 94 103 LogControlDescriptor( byte[] bytes, 104 int index ) { 105 headLSN = new LogLSN(bytes,index); index += LogLSN.SIZEOF; 106 tailLSN = new LogLSN(bytes,index); index += LogLSN.SIZEOF; 107 nextLSN = new LogLSN(bytes,index); index += LogLSN.SIZEOF; 108 } 109 110 119 final int toBytes( byte[] bytes, 120 int index ) { 121 index += headLSN.toBytes(bytes,index); 122 index += tailLSN.toBytes(bytes,index); 123 index += nextLSN.toBytes(bytes,index); 124 125 return SIZEOF; 126 } 127 128 136 public final String toString() { 137 return "LCD(head="+headLSN+",tail="+tailLSN+",next="+nextLSN+")"; 138 } 139 } 140 | Popular Tags |