org.apache.http.annotation.Experimental Java Examples

The following examples show how to use org.apache.http.annotation.Experimental. 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: TypesREST.java    From atlas with Apache License 2.0 6 votes vote down vote up
/**
 * Bulk update API for all types, changes detected in the type definitions would be persisted
 * @param typesDef A composite object that captures all type definition changes
 * @return A composite object with lists of type definitions that were updated
 * @throws Exception
 * @HTTP 200 On successful update of requested type definitions
 * @HTTP 400 On validation failure for any type definitions
 */
@PUT
@Path("/typedefs")
@Experimental
public AtlasTypesDef updateAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
    AtlasPerfTracer perf = null;

    try {
        if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
            perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.updateAtlasTypeDefs(" +
                                                           AtlasTypeUtil.toDebugString(typesDef) + ")");
        }

        return typeDefStore.updateTypesDef(typesDef);
    } finally {
        AtlasPerfTracer.log(perf);
    }
}
 
Example #2
Source File: TypesREST.java    From atlas with Apache License 2.0 6 votes vote down vote up
/**
 * Bulk delete API for all types
 * @param typesDef A composite object that captures all types to be deleted
 * @throws Exception
 * @HTTP 204 On successful deletion of the requested type definitions
 * @HTTP 400 On validation failure for any type definitions
 */
@DELETE
@Path("/typedefs")
@Experimental
public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
    AtlasPerfTracer perf = null;

    try {
        if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
            perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.deleteAtlasTypeDefs(" +
                                                           AtlasTypeUtil.toDebugString(typesDef) + ")");
        }



        typeDefStore.deleteTypesDef(typesDef);
    } finally {
        AtlasPerfTracer.log(perf);
    }
}
 
Example #3
Source File: SolrCores.java    From lucene-solr with Apache License 2.0 6 votes vote down vote up
/** This method is currently experimental.
 *
 * @return a Collection of the names that a specific core object is mapped to, there are more than one.
 */
@Experimental
List<String> getNamesForCore(SolrCore core) {
  List<String> lst = new ArrayList<>();

  synchronized (modifyLock) {
    for (Map.Entry<String, SolrCore> entry : cores.entrySet()) {
      if (core == entry.getValue()) {
        lst.add(entry.getKey());
      }
    }
    if (getTransientCacheHandler() != null) {
      lst.addAll(getTransientCacheHandler().getNamesForCore(core));
    }
  }
  return lst;
}
 
Example #4
Source File: TypesREST.java    From incubator-atlas with Apache License 2.0 6 votes vote down vote up
/**
 * Bulk update API for all types, changes detected in the type definitions would be persisted
 * @param typesDef A composite object that captures all type definition changes
 * @return A composite object with lists of type definitions that were updated
 * @throws Exception
 * @HTTP 200 On successful update of requested type definitions
 * @HTTP 400 On validation failure for any type definitions
 */
@PUT
@Path("/typedefs")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
@Experimental
public AtlasTypesDef updateAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
    AtlasPerfTracer perf = null;

    try {
        if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
            perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.updateAtlasTypeDefs(" +
                                                           AtlasTypeUtil.toDebugString(typesDef) + ")");
        }

        return typeDefStore.updateTypesDef(typesDef);
    } finally {
        AtlasPerfTracer.log(perf);
    }
}
 
Example #5
Source File: TypesREST.java    From incubator-atlas with Apache License 2.0 6 votes vote down vote up
/**
 * Bulk delete API for all types
 * @param typesDef A composite object that captures all types to be deleted
 * @throws Exception
 * @HTTP 204 On successful deletion of the requested type definitions
 * @HTTP 400 On validation failure for any type definitions
 */
@DELETE
@Path("/typedefs")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
@Experimental
public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
    AtlasPerfTracer perf = null;

    try {
        if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
            perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "TypesREST.deleteAtlasTypeDefs(" +
                                                           AtlasTypeUtil.toDebugString(typesDef) + ")");
        }

        typeDefStore.deleteTypesDef(typesDef);
    } finally {
        AtlasPerfTracer.log(perf);
    }
}
 
Example #6
Source File: TransientSolrCoreCache.java    From lucene-solr with Apache License 2.0 4 votes vote down vote up
@Experimental
public List<String> getNamesForCore(SolrCore core) {
  return Collections.emptyList();
}
 
Example #7
Source File: SendMessageAction.java    From supbot with MIT License 2 votes vote down vote up
/**
 * Use this to tag the user using phonenumber
 *
 * @param phoneRegex Regular expression for phone number
 */
@Experimental
public void tagPhoneNumbers(String phoneRegex){
    this.phoneRegex = phoneRegex;
}