Java Code Examples for com.intellij.util.io.EnumeratorIntegerDescriptor#INSTANCE

The following examples show how to use com.intellij.util.io.EnumeratorIntegerDescriptor#INSTANCE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VcsLogFullDetailsIndex.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Nonnull
private MyMapReduceIndex createMapReduceIndex(@Nonnull DataExternalizer<T> dataExternalizer, int version) throws IOException {
  MyIndexExtension extension = new MyIndexExtension(myIndexer, dataExternalizer, getVersion());
  Pair<ForwardIndex, ForwardIndexAccessor<Integer, T>> pair = createdForwardIndex();
  ForwardIndex forwardIndex = pair != null ? pair.getFirst() : null;
  ForwardIndexAccessor<Integer, T> forwardIndexAccessor = pair != null ? pair.getSecond() : null;

  MyMapIndexStorage myMapIndexStorage = new MyMapIndexStorage(getStorageFile(myName, myLogId), EnumeratorIntegerDescriptor.INSTANCE, dataExternalizer, 5000, false);

  return new MyMapReduceIndex(extension, myMapIndexStorage, forwardIndex, forwardIndexAccessor);
}
 
Example 2
Source File: PersistentMapBasedForwardIndex.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Nonnull
protected PersistentHashMap<Integer, ByteArraySequence> createMap(File file) throws IOException {
  Boolean oldHasNoChunksValue = PersistentHashMapValueStorage.CreationTimeOptions.HAS_NO_CHUNKS.get();
  PersistentHashMapValueStorage.CreationTimeOptions.HAS_NO_CHUNKS.set(!myUseChunks);
  try {
    return new PersistentHashMap<>(file, EnumeratorIntegerDescriptor.INSTANCE, ByteSequenceDataExternalizer.INSTANCE);
  }
  finally {
    PersistentHashMapValueStorage.CreationTimeOptions.HAS_NO_CHUNKS.set(oldHasNoChunksValue);
  }
}
 
Example 3
Source File: ContainerIdUsagesStubIndex.java    From idea-php-symfony2-plugin with MIT License 4 votes vote down vote up
@NotNull
@Override
public DataExternalizer<Integer> getValueExternalizer() {
    return EnumeratorIntegerDescriptor.INSTANCE;
}
 
Example 4
Source File: SingleEntryFileBasedIndexExtension.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public final KeyDescriptor<Integer> getKeyDescriptor() {
  return EnumeratorIntegerDescriptor.INSTANCE;
}
 
Example 5
Source File: VcsLogFullDetailsIndex.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public KeyDescriptor<Integer> getKeyDescriptor() {
  return EnumeratorIntegerDescriptor.INSTANCE;
}
 
Example 6
Source File: IntStubIndexExtension.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public KeyDescriptor<Integer> getKeyDescriptor() {
  return EnumeratorIntegerDescriptor.INSTANCE;
}
 
Example 7
Source File: StubProvidedIndexExtension.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public KeyDescriptor<Integer> createKeyDescriptor() {
  return EnumeratorIntegerDescriptor.INSTANCE;
}
 
Example 8
Source File: TrigramIndex.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public KeyDescriptor<Integer> getKeyDescriptor() {
  return EnumeratorIntegerDescriptor.INSTANCE;
}
 
Example 9
Source File: HashIdForwardIndexAccessor.java    From consulo with Apache License 2.0 4 votes vote down vote up
HashIdForwardIndexAccessor(@Nonnull UpdatableSnapshotInputMappingIndex<Key, Value, Input> snapshotInputMappingIndex) {
  super(EnumeratorIntegerDescriptor.INSTANCE);
  mySnapshotInputMappingIndex = snapshotInputMappingIndex;
}
 
Example 10
Source File: TracingData.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static PersistentHashMap<Integer, Integer> createOrOpenMap() throws IOException {
  return new PersistentHashMap<>(new File(tracingDataLocation), EnumeratorIntegerDescriptor.INSTANCE,
                                 EnumeratorIntegerDescriptor.INSTANCE);
}
 
Example 11
Source File: DuplicatesIndex.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
@Override
public KeyDescriptor<Integer> getKeyDescriptor() {
  return EnumeratorIntegerDescriptor.INSTANCE;
}