Package com.shop.cache.api.common

Examples of com.shop.cache.api.common.SCDataSpec


  private void  processPut(PutWrapper wrapper)
  {
    try
    {
      ChunkedByteArray     data = fSerializer.serialize(wrapper.block);
      SCDataSpec spec = new SCDataSpec(data, wrapper.block.getTTL());
      if ( wrapper.withBackup )
      {
        fManager.putWithBackup(wrapper.block.getKey(), spec, wrapper.block.getGroups());
      }
      else
View Full Code Here


  }

  @Override
  public long getTTL(String key) throws Exception
  {
    SCDataSpec   entry = getEntry(key, true);
    return (entry != null) ? entry.ttl : 0;
  }
View Full Code Here

  public ChunkedByteArray get(String key, boolean ignoreTTL)
  {
    TrackerTimer    timer = new TrackerTimer(fGetTimerData);
    timer.start();

    SCDataSpec   entry = getEntry(key, ignoreTTL);

    int     getTime = timer.end("get()");
    String     timingMessage;
    if ( (entry != null) && (entry.data != null) )
    {
View Full Code Here

    }
  }

  private SCDataSpec getEntry(String key, boolean ignoreTTL)
  {
    SCDataSpec entry = null;
    try
    {
      entry = fDatabase.get(key);

      if ( entry != null )
View Full Code Here

    }

    if ( ccdb2Spec != null )
    {
      fSuccessfulGetQty.incrementAndGet();
      return new SCDataSpec(ccdb2Spec.data, ccdb2Spec.ttl);
    }

    return null;
  }
View Full Code Here

      }

      @Override
      public void executeCommand(SCServer server, SCConnection connection) throws Exception
      {
        server.put(key, new SCDataSpec(object, ttl), makeGroupSpec(groups));
      }

      private String        key = "";
      private long        ttl = 0;
      private List<SCGroup>    groups = null;
View Full Code Here

TOP

Related Classes of com.shop.cache.api.common.SCDataSpec

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.