KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > core > storage > gammaStore > ObjectLocation


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Core License version 1 published by ozone-db.org.
3
//
4
// Copyright (C) 2003-@year@, Leo Mekenkamp. All rights reserved.
5
//
6
// $Id$
7

8 package org.ozoneDB.core.storage.gammaStore;
9
10 import java.io.IOException JavaDoc;
11 import java.io.ObjectInputStream JavaDoc;
12 import java.io.ObjectOutputStream JavaDoc;
13 import java.io.Serializable JavaDoc;
14
15 /**
16  * Holds information on where exactly object data has been (or can be)
17  * persisted. Objects are written to clusters, where the position has the
18  * offset of where within a cluster the serialized object data starts.
19  *
20  * @author <a HREF="mailto:leoATmekenkampD0Tcom">Leo Mekenkamp (mind the anti sp@m)</a>
21  * @version $Id$
22  */

23 final class ObjectLocation implements Serializable JavaDoc {
24
25     private long oldClusterId;
26     private long oldPosition;
27
28     private long newClusterId;
29     private long newPosition;
30     
31     ObjectLocation() {
32     }
33     
34     public String JavaDoc toString() {
35         return super.toString() +
36                 "; oldClusterId: " + oldClusterId +
37                 ", oldPosition: " + oldPosition +
38                 ", newClusterId: " + newClusterId +
39                 ", newPosition: " + newPosition;
40     }
41
42     final long getOldClusterId() {
43         return oldClusterId;
44     }
45
46     final void setOldClusterId(long oldClusterId) {
47         this.oldClusterId = oldClusterId;
48     }
49
50     final long getOldPosition() {
51         return oldPosition;
52     }
53
54     final void setOldPosition(long oldPosition) {
55         this.oldPosition = oldPosition;
56     }
57
58     final long getNewClusterId() {
59         return newClusterId;
60     }
61
62     final void setNewClusterId(long newClusterId) {
63         this.newClusterId = newClusterId;
64     }
65
66     final long getNewPosition() {
67         return newPosition;
68     }
69
70     final void setNewPosition(long newPosition) {
71         this.newPosition = newPosition;
72     }
73
74 }
75
Popular Tags