Package org.jboss.cache.optimistic

Examples of org.jboss.cache.optimistic.DataVersion


/* 137 */       this.cache.getInvocationContext().setOptionOverrides(option);
/* 138 */       this.cache.remove(new Fqn(this.regionFqn, new Object[] { key }), "ITEM");
/*     */
/* 140 */       option = new Option();
/* 141 */       option.setFailSilently(true);
/* 142 */       DataVersion dv = (this.source != null) && (this.source.isVersioned()) ? new DataVersionAdapter(currentVersion, currentVersion, this.source.getVersionComparator(), this.source.toString()) : NonLockingDataVersion.INSTANCE;
/*     */
/* 145 */       option.setDataVersion(dv);
/* 146 */       option.setCacheModeLocal(this.localWritesOnly);
/* 147 */       this.cache.getInvocationContext().setOptionOverrides(option);
/* 148 */       this.cache.put(new Fqn(this.regionFqn, new Object[] { key }), "item", value);
View Full Code Here


  }

  public void writeUpdate(Object key, Object value, Object currentVersion, Object previousVersion) {
    try {
      Option option = new Option();
      DataVersion dv = ( source != null && source.isVersioned() )
                       ? new DataVersionAdapter( currentVersion, previousVersion, source.getVersionComparator(), source.toString() )
                       : NonLockingDataVersion.INSTANCE;
      option.setDataVersion( dv );
            option.setCacheModeLocal(localWritesOnly);
            cache.getInvocationContext().setOptionOverrides(option);
View Full Code Here

            cache.getInvocationContext().setOptionOverrides(option);
      cache.remove( new Fqn( regionFqn, key ), "ITEM" );

      option = new Option();
      option.setFailSilently( true );
      DataVersion dv = ( source != null && source.isVersioned() )
                       ? new DataVersionAdapter( currentVersion, currentVersion, source.getVersionComparator(), source.toString() )
                       : NonLockingDataVersion.INSTANCE;
      option.setDataVersion( dv );
            option.setCacheModeLocal(localWritesOnly);
            cache.getInvocationContext().setOptionOverrides(option);
View Full Code Here

        return true;
    }

    private Option getDataVersionOption(Object currentVersion, Object previousVersion) {
       
        DataVersion dv = (dataDescription != null && dataDescription.isVersioned()) ? new DataVersionAdapter(
                currentVersion, previousVersion, dataDescription.getVersionComparator(), dataDescription.toString())
                : NonLockingDataVersion.INSTANCE;
        Option opt = new Option();
        opt.setDataVersion(dv);
        return opt;
View Full Code Here

TOP

Related Classes of org.jboss.cache.optimistic.DataVersion

Copyright © 2018 www.massapicom. 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.