Java 类org.apache.hadoop.util.IntrusiveCollection.Element 实例源码

项目:hadoop    文件:CacheDirective.java   
@SuppressWarnings("unchecked")
@Override // IntrusiveCollection.Element
public void insertInternal(IntrusiveCollection<? extends Element> list,
    Element prev, Element next) {
  assert this.pool == null;
  this.pool = ((CachePool.DirectiveList)list).getCachePool();
  this.prev = prev;
  this.next = next;
}
项目:hadoop    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public void removeInternal(IntrusiveCollection<? extends Element> list) {
  assert list == pool.getDirectiveList();
  this.pool = null;
  this.prev = null;
  this.next = null;
}
项目:hadoop    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getPrev(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.prev;
}
项目:hadoop    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getNext(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.next;
}
项目:hadoop    文件:CachedBlock.java   
@Override
public void insertInternal(IntrusiveCollection<? extends Element> list, Element prev,
    Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      throw new RuntimeException("Trying to re-insert an element that " +
          "is already in the list.");
    }
  }
  Object newTriplets[] = Arrays.copyOf(triplets, triplets.length + 3);
  newTriplets[triplets.length] = list;
  newTriplets[triplets.length + 1] = prev;
  newTriplets[triplets.length + 2] = next;
  triplets = newTriplets;
}
项目:hadoop    文件:CachedBlock.java   
@Override
public void setPrev(IntrusiveCollection<? extends Element> list, Element prev) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 1] = prev;
      return;
    }
  }
  throw new RuntimeException("Called setPrev on an element that wasn't " +
      "in the list.");
}
项目:hadoop    文件:CachedBlock.java   
@Override
public void setNext(IntrusiveCollection<? extends Element> list, Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 2] = next;
      return;
    }
  }
  throw new RuntimeException("Called setNext on an element that wasn't " +
      "in the list.");
}
项目:hadoop    文件:CachedBlock.java   
@Override
public void removeInternal(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      Object[] newTriplets = new Object[triplets.length - 3];
      System.arraycopy(triplets, 0, newTriplets, 0, i);
      System.arraycopy(triplets, i + 3, newTriplets, i,
          triplets.length - (i + 3));
      triplets = newTriplets;
      return;
    }
  }
  throw new RuntimeException("Called remove on an element that wasn't " +
      "in the list.");
}
项目:hadoop    文件:CachedBlock.java   
@Override
public Element getPrev(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return (Element)triplets[i + 1];
    }
  }
  throw new RuntimeException("Called getPrev on an element that wasn't " +
      "in the list.");
}
项目:hadoop    文件:CachedBlock.java   
@Override
public Element getNext(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return (Element)triplets[i + 2];
    }
  }
  throw new RuntimeException("Called getNext on an element that wasn't " +
      "in the list.");
}
项目:hadoop    文件:CachedBlock.java   
@Override
public boolean isInList(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return true;
    }
  }
  return false;
}
项目:aliyun-oss-hadoop-fs    文件:CacheDirective.java   
@SuppressWarnings("unchecked")
@Override // IntrusiveCollection.Element
public void insertInternal(IntrusiveCollection<? extends Element> list,
    Element prev, Element next) {
  assert this.pool == null;
  this.pool = ((CachePool.DirectiveList)list).getCachePool();
  this.prev = prev;
  this.next = next;
}
项目:aliyun-oss-hadoop-fs    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public void removeInternal(IntrusiveCollection<? extends Element> list) {
  assert list == pool.getDirectiveList();
  this.pool = null;
  this.prev = null;
  this.next = null;
}
项目:aliyun-oss-hadoop-fs    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getPrev(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.prev;
}
项目:aliyun-oss-hadoop-fs    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getNext(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.next;
}
项目:aliyun-oss-hadoop-fs    文件:CachedBlock.java   
@Override
public void insertInternal(IntrusiveCollection<? extends Element> list, Element prev,
    Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      throw new RuntimeException("Trying to re-insert an element that " +
          "is already in the list.");
    }
  }
  Object newTriplets[] = Arrays.copyOf(triplets, triplets.length + 3);
  newTriplets[triplets.length] = list;
  newTriplets[triplets.length + 1] = prev;
  newTriplets[triplets.length + 2] = next;
  triplets = newTriplets;
}
项目:aliyun-oss-hadoop-fs    文件:CachedBlock.java   
@Override
public void setPrev(IntrusiveCollection<? extends Element> list, Element prev) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 1] = prev;
      return;
    }
  }
  throw new RuntimeException("Called setPrev on an element that wasn't " +
      "in the list.");
}
项目:aliyun-oss-hadoop-fs    文件:CachedBlock.java   
@Override
public void setNext(IntrusiveCollection<? extends Element> list, Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 2] = next;
      return;
    }
  }
  throw new RuntimeException("Called setNext on an element that wasn't " +
      "in the list.");
}
项目:aliyun-oss-hadoop-fs    文件:CachedBlock.java   
@Override
public void removeInternal(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      Object[] newTriplets = new Object[triplets.length - 3];
      System.arraycopy(triplets, 0, newTriplets, 0, i);
      System.arraycopy(triplets, i + 3, newTriplets, i,
          triplets.length - (i + 3));
      triplets = newTriplets;
      return;
    }
  }
  throw new RuntimeException("Called remove on an element that wasn't " +
      "in the list.");
}
项目:aliyun-oss-hadoop-fs    文件:CachedBlock.java   
@Override
public Element getPrev(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return (Element)triplets[i + 1];
    }
  }
  throw new RuntimeException("Called getPrev on an element that wasn't " +
      "in the list.");
}
项目:aliyun-oss-hadoop-fs    文件:CachedBlock.java   
@Override
public Element getNext(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return (Element)triplets[i + 2];
    }
  }
  throw new RuntimeException("Called getNext on an element that wasn't " +
      "in the list.");
}
项目:aliyun-oss-hadoop-fs    文件:CachedBlock.java   
@Override
public boolean isInList(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return true;
    }
  }
  return false;
}
项目:big-c    文件:CacheDirective.java   
@SuppressWarnings("unchecked")
@Override // IntrusiveCollection.Element
public void insertInternal(IntrusiveCollection<? extends Element> list,
    Element prev, Element next) {
  assert this.pool == null;
  this.pool = ((CachePool.DirectiveList)list).getCachePool();
  this.prev = prev;
  this.next = next;
}
项目:big-c    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public void removeInternal(IntrusiveCollection<? extends Element> list) {
  assert list == pool.getDirectiveList();
  this.pool = null;
  this.prev = null;
  this.next = null;
}
项目:big-c    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getPrev(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.prev;
}
项目:big-c    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getNext(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.next;
}
项目:big-c    文件:CachedBlock.java   
@Override
public void insertInternal(IntrusiveCollection<? extends Element> list, Element prev,
    Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      throw new RuntimeException("Trying to re-insert an element that " +
          "is already in the list.");
    }
  }
  Object newTriplets[] = Arrays.copyOf(triplets, triplets.length + 3);
  newTriplets[triplets.length] = list;
  newTriplets[triplets.length + 1] = prev;
  newTriplets[triplets.length + 2] = next;
  triplets = newTriplets;
}
项目:big-c    文件:CachedBlock.java   
@Override
public void setPrev(IntrusiveCollection<? extends Element> list, Element prev) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 1] = prev;
      return;
    }
  }
  throw new RuntimeException("Called setPrev on an element that wasn't " +
      "in the list.");
}
项目:big-c    文件:CachedBlock.java   
@Override
public void setNext(IntrusiveCollection<? extends Element> list, Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 2] = next;
      return;
    }
  }
  throw new RuntimeException("Called setNext on an element that wasn't " +
      "in the list.");
}
项目:big-c    文件:CachedBlock.java   
@Override
public void removeInternal(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      Object[] newTriplets = new Object[triplets.length - 3];
      System.arraycopy(triplets, 0, newTriplets, 0, i);
      System.arraycopy(triplets, i + 3, newTriplets, i,
          triplets.length - (i + 3));
      triplets = newTriplets;
      return;
    }
  }
  throw new RuntimeException("Called remove on an element that wasn't " +
      "in the list.");
}
项目:big-c    文件:CachedBlock.java   
@Override
public Element getPrev(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return (Element)triplets[i + 1];
    }
  }
  throw new RuntimeException("Called getPrev on an element that wasn't " +
      "in the list.");
}
项目:big-c    文件:CachedBlock.java   
@Override
public Element getNext(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return (Element)triplets[i + 2];
    }
  }
  throw new RuntimeException("Called getNext on an element that wasn't " +
      "in the list.");
}
项目:big-c    文件:CachedBlock.java   
@Override
public boolean isInList(IntrusiveCollection<? extends Element> list) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      return true;
    }
  }
  return false;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CacheDirective.java   
@SuppressWarnings("unchecked")
@Override // IntrusiveCollection.Element
public void insertInternal(IntrusiveCollection<? extends Element> list,
    Element prev, Element next) {
  assert this.pool == null;
  this.pool = ((CachePool.DirectiveList)list).getCachePool();
  this.prev = prev;
  this.next = next;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public void removeInternal(IntrusiveCollection<? extends Element> list) {
  assert list == pool.getDirectiveList();
  this.pool = null;
  this.prev = null;
  this.next = null;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getPrev(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.prev;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CacheDirective.java   
@Override // IntrusiveCollection.Element
public Element getNext(IntrusiveCollection<? extends Element> list) {
  if (list != pool.getDirectiveList()) {
    return null;
  }
  return this.next;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CachedBlock.java   
@Override
public void insertInternal(IntrusiveCollection<? extends Element> list, Element prev,
    Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      throw new RuntimeException("Trying to re-insert an element that " +
          "is already in the list.");
    }
  }
  Object newTriplets[] = Arrays.copyOf(triplets, triplets.length + 3);
  newTriplets[triplets.length] = list;
  newTriplets[triplets.length + 1] = prev;
  newTriplets[triplets.length + 2] = next;
  triplets = newTriplets;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CachedBlock.java   
@Override
public void setPrev(IntrusiveCollection<? extends Element> list, Element prev) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 1] = prev;
      return;
    }
  }
  throw new RuntimeException("Called setPrev on an element that wasn't " +
      "in the list.");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:CachedBlock.java   
@Override
public void setNext(IntrusiveCollection<? extends Element> list, Element next) {
  for (int i = 0; i < triplets.length; i += 3) {
    if (triplets[i] == list) {
      triplets[i + 2] = next;
      return;
    }
  }
  throw new RuntimeException("Called setNext on an element that wasn't " +
      "in the list.");
}