IndexingContext.updateTimestamp
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.apache.maven.index.context.IndexingContext.updateTimestamp(Showing top 15 results out of 315)

  • Common ways to obtain IndexingContext
private void myMethod () {
IndexingContext i =
  • Indexer indexer;indexer.createIndexingContext(id, repositoryId, repository, indexDirectory, repositoryUrl, indexUpdateUrl, true, true, indexers)
  • Smart code suggestions by Codota
}
origin: apache/archiva

@Override
public void updateTimestamp(boolean save) throws IOException {
  delegate.updateTimestamp(save);
}
origin: apache/archiva

@Override
public void updateTimestamp(boolean save, ZonedDateTime time) throws IOException {
  delegate.updateTimestamp(save, Date.from(time.toInstant()));
}
origin: org.jboss.windup.org.apache.maven.indexer/indexer-core

public void index( IndexingContext context, ArtifactContext ac )
  throws IOException
{
  // skip artifacts not obeying repository layout (whether m1 or m2)
  if ( ac != null && ac.getGav() != null )
  {
    Document d = ac.createDocument( context );
    if ( d != null )
    {
      context.getIndexWriter().addDocument( d );
      context.updateTimestamp();
    }
  }
}
origin: org.jboss.windup.org.apache.maven.indexer/indexer-core

public void remove( IndexingContext context, ArtifactContext ac )
  throws IOException
{
  if ( ac != null )
  {
    final String uinfo = ac.getArtifactInfo().getUinfo();
    // add artifact deletion marker
    final Document doc = new Document();
    doc.add( new Field( ArtifactInfo.DELETED, uinfo, Field.Store.YES, Field.Index.NO ) );
    doc.add( new Field( ArtifactInfo.LAST_MODIFIED, //
      Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) );
    IndexWriter w = context.getIndexWriter();
    w.addDocument( doc );
    w.deleteDocuments( new Term( ArtifactInfo.UINFO, uinfo ) );
    context.updateTimestamp();
  }
}
origin: org.apache.maven.indexer/indexer-core

public void update( IndexingContext context, ArtifactContext ac )
  throws IOException
{
  if ( ac != null && ac.getGav() != null )
  {
    Document d = ac.createDocument( context );
    if ( d != null )
    {
      Document old = getOldDocument( context, ac );
      if ( !equals( d, old ) )
      {
        IndexWriter w = context.getIndexWriter();
        w.updateDocument( new Term( ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo() ), d );
        updateGroups( context, ac );
        context.updateTimestamp();
      }
    }
  }
}
origin: org.jboss.windup.org.apache.maven.indexer/indexer-core

context.updateTimestamp( true );
origin: apache/archiva

context.updateTimestamp( true );
origin: org.apache.maven.indexer/indexer-core

                                update, listener ), fromPath ) );
tmpContext.updateTimestamp( true );
context.replace( tmpContext.getIndexDirectory() );
origin: apache/archiva

indexingContext.updateTimestamp( true );
origin: org.netbeans.modules/org-netbeans-modules-maven-indexer

                                update, listener ), fromPath ) );
tmpContext.updateTimestamp( true );
context.replace( tmpContext.getIndexDirectory() );
origin: org.jboss.windup.org.apache.maven.indexer/indexer-core

                                update, listener ), fromPath ) );
tmpContext.updateTimestamp( true );
context.replace( tmpContext.getIndexDirectory() );
origin: org.apache.maven.indexer/indexer-core

public void remove( IndexingContext context, ArtifactContext ac )
  throws IOException
{
  if ( ac != null )
  {
    final String uinfo = ac.getArtifactInfo().getUinfo();
    // add artifact deletion marker
    final Document doc = new Document();
    doc.add( new Field( ArtifactInfo.DELETED, uinfo, Field.Store.YES, Field.Index.NO ) );
    doc.add( new Field( ArtifactInfo.LAST_MODIFIED, //
      Long.toString( System.currentTimeMillis() ), Field.Store.YES, Field.Index.NO ) );
    IndexWriter w = context.getIndexWriter();
    w.addDocument( doc );
    w.deleteDocuments( new Term( ArtifactInfo.UINFO, uinfo ) );
    context.updateTimestamp();
  }
}
origin: org.apache.maven.indexer/indexer-core

public void index( IndexingContext context, ArtifactContext ac )
  throws IOException
{
  // skip artifacts not obeying repository layout (whether m1 or m2)
  if ( ac != null && ac.getGav() != null )
  {
    Document d = ac.createDocument( context );
    if ( d != null )
    {
      context.getIndexWriter().addDocument( d );
      context.updateTimestamp();
    }
  }
}
origin: org.jboss.windup.org.apache.maven.indexer/indexer-core

public void update( IndexingContext context, ArtifactContext ac )
  throws IOException
{
  if ( ac != null && ac.getGav() != null )
  {
    Document d = ac.createDocument( context );
    if ( d != null )
    {
      Document old = getOldDocument( context, ac );
      if ( !equals( d, old ) )
      {
        IndexWriter w = context.getIndexWriter();
        w.updateDocument( new Term( ArtifactInfo.UINFO, ac.getArtifactInfo().getUinfo() ), d );
        updateGroups( context, ac );
        context.updateTimestamp();
      }
    }
  }
}
origin: org.apache.maven.indexer/indexer-core

context.updateTimestamp( true );
org.apache.maven.index.contextIndexingContextupdateTimestamp

Popular methods of IndexingContext

  • getId
    Returns this indexing context id.
  • getIndexDirectoryFile
  • acquireIndexSearcher
    Acquires a fresh instance of IndexSearcher. You have to release the received instance with #releaseI
  • getIndexDirectory
  • close
    Shuts down this context.
  • commit
    Commits changes to context, eventually refreshing readers/searchers too.
  • getIndexUpdateUrl
    Returns url for the index update
  • optimize
    Optimizes index. According to Lucene 3.6+ Javadoc, there is no more sense to optimize, so this metho
  • getAllGroups
    Gets all group names stored in the current indexing context
  • getIndexCreators
    List of IndexCreators used in this context.
  • getRepository
    Returns location for the local repository.
  • getRepositoryId
    Returns repository id.
  • getRepository,
  • getRepositoryId,
  • getRepositoryUrl,
  • isSearchable,
  • merge,
  • releaseIndexSearcher,
  • replace,
  • setSearchable,
  • getAnalyzer

Popular classes and methods

  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
    Sets the value of the specified request header field. The value will only be used by the current URL
  • File (java.io)
    LocalStorage based File implementation for GWT. Should probably have used Harmony as a starting poin
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedHashMap (java.util)
    Hash table implementation of the Map interface with predictable iteration order. [Sun docs] [http:/
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)