public class DefragmentServicesImpl extends java.lang.Object implements DefragmentServices
| Modifier and Type | Class and Description |
|---|---|
static class |
DefragmentServicesImpl.DbSelector |
| Modifier and Type | Field and Description |
|---|---|
static DefragmentServicesImpl.DbSelector |
SOURCEDB |
static DefragmentServicesImpl.DbSelector |
TARGETDB |
| Constructor and Description |
|---|
DefragmentServicesImpl(DefragmentConfig defragConfig,
DefragmentListener listener) |
public static final DefragmentServicesImpl.DbSelector SOURCEDB
public static final DefragmentServicesImpl.DbSelector TARGETDB
public DefragmentServicesImpl(DefragmentConfig defragConfig, DefragmentListener listener) throws java.io.IOException
java.io.IOExceptionpublic int mappedID(int oldID,
int defaultID)
public int strictMappedID(int oldID)
throws MappingNotFoundException
strictMappedID in interface IDMappingMappingNotFoundException - if the given id does not refer to a system handler or the empty reference (0) and if no mapping is foundpublic int mappedID(int id)
mappedID in interface DefragmentServicespublic void mapIDs(int oldID,
int newID,
boolean isClassID)
public void close()
public ByteArrayBuffer bufferByID(DefragmentServicesImpl.DbSelector selector, int id)
public ByteArrayBuffer sourceBufferByAddress(int address, int length) throws java.io.IOException
sourceBufferByAddress in interface DefragmentServicesjava.io.IOExceptionpublic ByteArrayBuffer targetBufferByAddress(int address, int length) throws java.io.IOException
targetBufferByAddress in interface DefragmentServicesjava.io.IOExceptionpublic ByteArrayBuffer bufferByAddress(DefragmentServicesImpl.DbSelector selector, int address, int length)
public StatefulBuffer targetStatefulBufferByAddress(int address, int length) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic Slot allocateTargetSlot(int length)
allocateTargetSlot in interface DefragmentServicespublic void targetWriteBytes(DefragmentContextImpl context, int address)
targetWriteBytes in interface DefragmentServicespublic void targetWriteBytes(ByteArrayBuffer reader, int address)
targetWriteBytes in interface DefragmentServicespublic StoredClass[] storedClasses(DefragmentServicesImpl.DbSelector selector)
public LatinStringIO stringIO()
public void targetCommit()
public TypeHandler4 sourceHandler(int id)
public int sourceClassCollectionID()
public int classIndexID(ClassMetadata classMetadata)
public void traverseAll(ClassMetadata classMetadata, Visitor4 command)
public void traverseAllIndexSlots(ClassMetadata classMetadata, Visitor4 command)
public void traverseAllIndexSlots(BTree btree, Visitor4 command)
traverseAllIndexSlots in interface DefragmentServicespublic void registerBTreeIDs(BTree btree, IDMappingCollector collector)
registerBTreeIDs in interface DefragmentServicespublic int databaseIdentityID(DefragmentServicesImpl.DbSelector selector)
public Transaction systemTrans()
systemTrans in interface DefragmentServicespublic void copyIdentity()
public void replaceClassMetadataRepository()
public void defragIdToTimestampBtree()
public ByteArrayBuffer sourceBufferByID(int sourceID)
sourceBufferByID in interface DefragmentServicespublic BTree sourceUuidIndex()
public void targetUuidIndexID(int id)
public int sourceUuidIndexID()
public int sourceIdToTimestampIndexID()
public ClassMetadata classMetadataForId(int id)
classMetadataForId in interface DefragmentServicespublic void registerUnindexed(int id)
registerUnindexed in interface DefragmentServicespublic IdSource unindexedIDs()
unindexedIDs in interface DefragmentServicespublic ObjectHeader sourceObjectHeader(ByteArrayBuffer buffer)
public int blockSize()
public int sourceAddressByID(int sourceID)
sourceAddressByID in interface DefragmentServicespublic int targetAddressByID(int sourceID)
targetAddressByID in interface DefragmentServicespublic boolean accept(StoredClass klass)
public int targetNewId()
targetNewId in interface DefragmentServicespublic IdMapping mapping()
mapping in interface DefragmentServicespublic void commitIds()
commitIds in interface DefragmentServices