Examples of Store


Examples of bm.storage.Store

     * @noinspection FieldRepeatedlyAccessedInMethod
     */
    public synchronized Node getNode( final Node parent, final int recordId )
            throws DBException
    {
        final Store rs = this.rs;
        Node node = null;

        byte[] buffer = this.buffer;
        try
        {
            if( sendProgressEvents )
            {
                event.dispatch();
            }
            rs.open();
            final int recordSize = rs.getRecordSize( recordId );
            if( buffer == null || recordSize > buffer.length )
            {
                buffer = Tools.secureAlloc( recordSize + GROWTH_FACTOR );
                this.buffer = buffer;
            }
            rs.getRecord( recordId, buffer, 0 );
            if( sendProgressEvents )
            {
                event.dispatch();
            }
            node = new Node( this, order, parent );
            node.setRecordId( new Integer( recordId ) );
            node.deserialize( new SerializerInputStream( new ByteArrayInputStream(
                    buffer,
                    0,
                    recordSize
            )));
        }
        catch( InvalidRecordIDException e )
        {
            return null;
        }
        catch( Exception e )
        {
            ErrorLog.addError(
                    "Index",
                    "doGetNode",
                    new Object[] { new Integer( recordId ), parent },
                    null,
                    e
            );
            throw new DBException( Constants.ERR_IDX_GET_NODE, e );
        }
        finally
        {
            try
            {
                rs.close();
            }
            catch( RSException e )
            {
                ErrorLog.addError(
                        "Index",
View Full Code Here

Examples of br.net.woodstock.rockframework.security.store.Store

            String signName = pk.getSignName();
            Date date = pk.getSignDate().getTime();
            Boolean valid = Boolean.TRUE;
            Signatory signatory = this.toSignatory(certificate);

            Store store = new JCAStore(KeyStoreType.JKS);
            store.add(new CertificateEntry(new Alias(certificate.getSerialNumber().toString()), certificate));

            if (pk.verify()) {
              valid = Boolean.FALSE;
            }
View Full Code Here

Examples of cn.wensiqun.asmsupport.operators.asmdirect.Store

        getExecuteBlock().setWhetherCheckUnreachableCode(false);
       
        new Marker(this.getExecuteBlock(), implicitCatchStartLbl);
       
        LocalVariable exception = getLocalAnonymousVariableModel(AClass.THROWABLE_ACLASS);
        implicitCatchThrowableStore = new Store(getExecuteBlock(), exception);
       
        finallyBlock.clonerGenerate(getExecuteBlock());
       
        //throwException(exception);
       
View Full Code Here

Examples of co.paralleluniverse.galaxy.Store

    }

    public void run() throws ExecutionException, InterruptedException {
        switch (SCENARIO.testGenEvent) {
            case test:
                final Store store = Grid.getInstance().store();
                if (i == 1) {
                    StoreTransaction tx = store.beginTransaction();
                    try {
                        long root = store.getRoot("root", tx);
                        byte buf[] = null;//"hello".getBytes();
                        store.set(root, buf, tx);
                        store.commit(tx);
                    } catch (TimeoutException ex) {
                        throw new RuntimeException("set failed");
                    }
                    Thread.sleep(20000);
                } else {
                    StoreTransaction tx = store.beginTransaction();
                    byte[] get;
                    try {
                        long root = store.getRoot("root", tx);
                        get = store.get(root);
                        store.commit(tx);
                    } catch (TimeoutException ex) {
                        throw new RuntimeException("get failed");
                    }
                    System.out.println(get);
                }
View Full Code Here

Examples of co.paralleluniverse.galaxy.quasar.Store

    public Object register(ActorRef<?> actor) throws SuspendExecution {
        final String rootName = actor.getName();

        LOG.info("Registering actor {} at root {}", actor, rootName);

        final Store store = grid.store();
        StoreTransaction txn = store.beginTransaction();
        serlock.lock();
        try {
            try {
                final long root = store.getRoot(rootName, txn);
                store.getx(root, txn);
                store.set(root, ser.write(actor), txn);
                LOG.debug("commit Registering actor {} at rootId  {}", actor, root);
                store.commit(txn);
                RemoteChannelReceiver.getReceiver(LocalActor.getMailbox(actor), true).handleRefMessage(new GlxRemoteChannel.RefMessage(true, grid.cluster().getMyNodeId()));
                return root; // root is the global id
            } catch (TimeoutException e) {
                LOG.error("Registering actor {} at root {} failed due to timeout", actor, rootName);
                store.rollback(txn);
                store.abort(txn);
                throw new RuntimeException("Actor registration failed");
            }
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        } finally {
View Full Code Here

Examples of com.adaptrex.core.ext.data.Store

      /*
       * Create the store
       */
      AdaptrexSession session = new AdaptrexSession(persistence);
      Store store = new Store(session, config);


      /*
       * Set the model name
       */
      String modelName = namespace + ".model." + (name != null ? name : className);
      config.setNamespace(namespace);
      config.setModelName(modelName);

      /*
       * If our store doesn't have a class drop out
       */
      if (clazz == null) {
        write("<!-- Error creating store: Could not find entity for " + className + " -->\n");
        return;
      }


      /*
       * Various store options
       */
      if (pageSize != null) {
        config.setPageSize(Integer.valueOf(pageSize));
      }
      if (include != null) {
        config.include(include);
      }
      if (exclude != null) {
        config.exclude(exclude);
      }

      if (clearOnPageLoad != null && clearOnPageLoad.equals("true")) {
        config.setClearOnPageLoad(true);
      }
      if (clearRemovedOnLoad != null && clearRemovedOnLoad.equals("true")) {
        config.setClearRemovedOnLoad(true);
      }
      if (autoSync != null && autoSync.equals("true")) {
        config.setAutoSync(true);
      }
      if (autoLoad != null && autoLoad.equals("true")) {
        config.setAutoLoad(true);
      }
      if (remoteGroup != null && remoteGroup.equals("true")) {
        config.setRemoteGroup(true);
      }
      if (remoteSort != null && remoteSort.equals("true")) {
        config.setRemoteSort(true);
      }
      if (remoteFilter != null && remoteFilter.equals("true")) {
        config.setRemoteFilter(true);
      }
      if (sortOnFilter != null && sortOnFilter.equals("true")) {
        config.setSortOnFilter(true);
      }


      /*
       * Filtering
       */
      if (filter != null) {
        for (String filterItem : filter.split(",")) {
          String[] parts = filterItem.split("=");
          String property = parts[0];
          String value = parts.length > 1 ? parts[1] : null;
          config.filter(property, value);
        }
      }


      /*
       * Grouping
       */
      if (group != null) {
        for (String groupItem : group.split(",")) {
          String[] parts = groupItem.split(":");
          String property = parts[0];
          String direction = parts.length > 1 ? parts[1] : null;
          String root = parts.length > 2 ? parts[2] : null;
          config.group(property, direction, root);
        }
      }

      /*
       * Sorting
       */
      if (sort != null) {
        for (String sortItem : sort.split(",")) {
          String[] parts = sortItem.split(":");
          String property = parts[0];
          String direction = parts.length > 1 ? parts[1] : "ASC";
          String root = parts.length > 2 ? parts[2] : null;

          config.sort(property, direction, root);
        }
      }

      /*
       * Buffering
       */
      if (buffered != null && buffered.contains("false")) {
        config.setBuffered(true);
        if (!buffered.equals("true")) {
          String[] parts = buffered.split(":");
          config.setTrailingBufferZone(Integer.valueOf(parts[0]));
          if (parts.length > 1) {
            config.setLeadingBufferZone(Integer.valueOf(parts[1]));
          }
          if (parts.length > 1) {
            config.setPurgePageCount(Integer.valueOf(parts[2]));
          }
        }
      }


      /*
       * Add associations
       */
      if (associations != null) {
        config.associations(associations);
      }


      /*
       * Load inline data?
       */
      if (inline != null && inline.equals("true")) {
        config.setInline(true);
      }


      if (where != null) {
        config.setWhere(where);
      }

      if (param != null) {
        for (String p : param.split(",")) {
          String[] parts = p.split(":");
          config.param(parts[0], parts[1]);
        }
      }

      if (start != null) {
        config.setStart(Integer.valueOf(start));
      }
     
     

      /*
       * The proxy needs additinoal information from the store.  We shouldn't create
       * the proxy until the store has been fully configured
       */
      if (rest != null) {
        String restPath = getRequest().getContextPath() + "/rest/"
            + (rest.equals("true") ? clazz.getSimpleName().toLowerCase() : rest);
        config.setProxy(new RestProxy(restPath, config));
      }


      StoreDefinition storeDefinition = store.getStoreDefinition();
      ModelDefinition baseModelDefinition = store.getModelDefinition();

      /*
       * Write the javascript for this store/model.
       *
       * During development using Ext.Loader, we need to syncRequire Ext.data.Model.
View Full Code Here

Examples of com.bah.lucene.blockcache_v2.BaseCache.STORE

        cacheBlockSizeMap.put(fieldType, cacheBlockSizeForFile);
        LOG.info(MessageFormat.format("{0}={1} for file type [{2}]", key, cacheBlockSizeForFile, fieldType));
      }
    }

    final STORE store = STORE.valueOf(configuration.get(BLUR_SHARD_BLOCK_CACHE_V2_STORE, OFF_HEAP));
    LOG.info(MessageFormat.format("{0}={1}", BLUR_SHARD_BLOCK_CACHE_V2_STORE, store));

    final Set<String> cachingFileExtensionsForRead = getSet(configuration.get(
        BLUR_SHARD_BLOCK_CACHE_V2_READ_CACHE_EXT, DEFAULT_VALUE));
    LOG.info(MessageFormat.format("{0}={1}", BLUR_SHARD_BLOCK_CACHE_V2_READ_CACHE_EXT, cachingFileExtensionsForRead));
View Full Code Here

Examples of com.buschmais.jqassistant.core.store.api.Store

        try {
          descriptorTypes = pluginManager.getDescriptorTypes();
        } catch (PluginReaderException e) {
          throw new MojoExecutionException("Cannot get descriptor mappers.", e);
        }
        Store store = getStore(baseProject);
        try {
          store.start(descriptorTypes);
          AbstractAnalysisAggregatorMojo.this.aggregate(baseProject, projects, store);
        } finally {
          store.stop();
        }
      }
    }, currentProject, reactorProjects);
  }
View Full Code Here

Examples of com.cloudloop.generated.CloudloopConfig.Stores.Store

 
  Stores stores = new Stores( );
  config.setStores( stores );
  List<Store> storeList = stores.getStore( );
 
  Store s3Store = new Store( );
  s3Store.setAdapter( "amazonS3" );
  s3Store.setEncrypted( Boolean.TRUE );
  s3Store.setName( "s3" );
  List<PropertyType> s3Props = s3Store.getProperty( );
  for ( Object propName : amazonProperties.keySet( ) )
  {
      PropertyType prop = new PropertyType( );
      prop.setName( (String) propName );
      prop.setValue( amazonProperties.getProperty( (String) propName ) );
      s3Props.add( prop );
  }
  storeList.add( s3Store );
 
  Store jS3Store = new Store( );
  jS3Store.setAdapter( "jS3" );
  jS3Store.setEncrypted( Boolean.TRUE );
  jS3Store.setName( "s3" );
  List<PropertyType> jS3Props = jS3Store.getProperty( );
  for ( Object propName : amazonProperties.keySet( ) )
  {
      PropertyType prop = new PropertyType( );
      prop.setName( (String) propName );
      prop.setValue( amazonProperties.getProperty( (String) propName ) );
      jS3Props.add( prop );
  }
  storeList.add( jS3Store );
 
  Store nirvanixStore = new Store( );
  nirvanixStore.setAdapter( "nirvanix" );
  nirvanixStore.setEncrypted( Boolean.TRUE );
  nirvanixStore.setName( "nirvanix" );
  List<PropertyType> nirvanixProps = nirvanixStore.getProperty( );
  for ( Object propName : nirvanixProperties.keySet( ) )
  {
      PropertyType prop = new PropertyType( );
      prop.setName( (String) propName );
      prop.setValue( nirvanixProperties.getProperty( (String) propName ) );
      nirvanixProps.add( prop );
  }
  storeList.add( nirvanixStore );
 
  Store rackspaceStore = new Store( );
  rackspaceStore.setAdapter( "rackspace" );
  rackspaceStore.setEncrypted( Boolean.TRUE );
  rackspaceStore.setName( "rackspace" );
  List<PropertyType> rackspaceProps = rackspaceStore.getProperty( );
  for ( Object propName : rackspaceProperties.keySet( ) )
  {
      PropertyType prop = new PropertyType( );
      prop.setName( (String) propName );
      prop
        .setValue( rackspaceProperties
        .getProperty( (String) propName ) );
      rackspaceProps.add( prop );
  }
  storeList.add( rackspaceStore );
 
  Store localStore = new Store( );
  localStore.setAdapter( "local" );
  localStore.setEncrypted( Boolean.FALSE );
  localStore.setName( "local" );
  List<PropertyType> localProps = localStore.getProperty( );
  PropertyType localRoot = new PropertyType( );
  for ( Object propName : localProperties.keySet( ) )
  {
      PropertyType prop = new PropertyType( );
      prop.setName( (String) propName );
View Full Code Here

Examples of com.eclipsesource.tabris.Store

public class SwipeContext {

  private final Store store;

  public SwipeContext() {
    store = new Store();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.