Codota Logo
BagCollection
Code IndexAdd Codota to your IDE (free)

How to use
BagCollection
in
com.oberasoftware.jasdb.rest.model

Best Java code snippets using com.oberasoftware.jasdb.rest.model.BagCollection (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: oberasoftware/jasdb

private ResponseEntity<RestEntity> handleList(String instanceId) throws RestException {
  LOG.debug("Retrieving full list of bags on storage instance: {}", instanceId);
  List<RestBag> bags = new ArrayList<>();
  try {
    DBInstance instance = getInstance(instanceFactory, instanceId);
    for(Bag bag : instance.getBags()) {
      StorageService storageService = storageServiceFactory.getStorageService(instance.getInstanceId(), bag.getName());
      bags.add(new RestBag(instance.getInstanceId(), bag.getName(), storageService.getSize(), storageService.getDiskSize()));
    }
  } catch(JasDBStorageException e) {
    throw new RestException("Unable to load bags", e);
  }
  
  return ok(new BagCollection(bags));
}
origin: oberasoftware/jasdb

@Override
public List<RemoteBag> getBags(RemotingContext context, String instance) throws RemoteException {
  String connectionString = new RestConnectionBuilder().instance(instance).bags().getConnectionString();
  ClientResponse clientResponse = doRequest(context, connectionString);
  try {
    BagCollection bagCollection = new JsonRestResponseHandler().deserialize(BagCollection.class, clientResponse.getEntityInputStream());
    List<RemoteBag> mappedBags = new ArrayList<>();
    for(RestBag bag : bagCollection.getBags()) {
      mappedBags.add(new RemoteBag(bag.getInstanceId(), bag.getName(), new ArrayList<>(), bag.getSize(), bag.getDiskSize()));
    }
    return mappedBags;
  } catch(RestException e) {
    throw new RemoteException("Unable to parse remote bag data", e);
  } finally {
    clientResponse.close();
  }
}
com.oberasoftware.jasdb.rest.modelBagCollection

Most used methods

  • <init>
  • getBags

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Kernel (java.awt.image)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • BoxLayout (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now