Package net.sf.joafip.store.entity.garbage

Examples of net.sf.joafip.store.entity.garbage.ReferenceLink


  public List<DataRecordIdentifier> getReferencingForReferenced(
      final DataRecordIdentifier referencedDataRecordIdentifier)
      throws GarbageException, ReferenceLinkGarbageException {
    final List<DataRecordIdentifier> list;
    try {
      ReferenceLink referenceLink = new ReferenceLink(
          referencedDataRecordIdentifier);
      final GarbageReferenceLinkRBTNode node =
      /**/(GarbageReferenceLinkRBTNode) garbageReferenceLinkTree
          .search(referenceLink);
      if (node == null) {
        list = EMPTY_LIST;
        if (LOGGER.debugEnabled) {
          LOGGER.debug("not referencing of data record #"
              + referencedDataRecordIdentifier);
        }
      } else {
        referenceLink = node.getElement();
        list = referenceLink.getRefencingDataRecordIdentifier();
        if (LOGGER.debugEnabled) {
          LOGGER.debug("referencing of data record #"
              + referencedDataRecordIdentifier + " is " + list);
        }
      }
View Full Code Here


      final DataRecordIdentifier referencingDataRecordIdentifier,
      final DataRecordIdentifier referencedDataRecordIdentifier,
      final int count) throws GarbageException,
      ReferenceLinkGarbageException {

    final ReferenceLink referenceLink = linkRecordManager
        .searchByReferenced(referencedDataRecordIdentifier);

    /*
     * to store resulting link count between referencing and referenced
     * after update
     */
    final int updatedCount;
    if (referenceLink == null) {
      /* not found */
      assertNotRemoveLink(referencingDataRecordIdentifier,
          referencedDataRecordIdentifier, count);
      /* record creation */
      final ReferenceLink newReferenceLink = new ReferenceLink(
          referencedDataRecordIdentifier);
      updatedCount = newReferenceLink.updateLinkCount(
          referencingDataRecordIdentifier, count);
      linkRecordManager.appendNewReferenceLink(newReferenceLink);
      /* link added => can not be a garbage candidate */
      garbageManager
          .removeFromCandidateAndOrFromToGarbage(referencedDataRecordIdentifier);
 
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.entity.garbage.ReferenceLink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.