Package org.jgroups.protocols

Examples of org.jgroups.protocols.S3_PING$ListEntry


 
  private static ListEntry[] toListEntry(S3ListBucketObjectEntry[] engineEntries) {
    if(engineEntries != null) {
      ListEntry[] entries = new ListEntry[engineEntries.length];
      for(int i = 0; i < engineEntries.length; i++) {
        entries[i] = new ListEntry();
        entries[i].setETag(engineEntries[i].getETag());
        entries[i].setKey(engineEntries[i].getKey());
        entries[i].setLastModified(engineEntries[i].getLastModified());
        entries[i].setSize(engineEntries[i].getSize());
        entries[i].setStorageClass(StorageClass.STANDARD);
View Full Code Here


    private static ListEntry[] toListEntry(S3ListBucketObjectEntry[] engineEntries) {
        if (engineEntries != null) {
            ListEntry[] entries = new ListEntry[engineEntries.length];
            for (int i = 0; i < engineEntries.length; i++) {
                entries[i] = new ListEntry();
                entries[i].setETag(engineEntries[i].getETag());
                entries[i].setKey(engineEntries[i].getKey());
                entries[i].setLastModified(engineEntries[i].getLastModified());
                entries[i].setSize(engineEntries[i].getSize());
                entries[i].setStorageClass(StorageClass.STANDARD);
View Full Code Here

 
  private static ListEntry[] toListEntry(S3ListBucketObjectEntry[] engineEntries) {
    if(engineEntries != null) {
      ListEntry[] entries = new ListEntry[engineEntries.length];
      for(int i = 0; i < engineEntries.length; i++) {
        entries[i] = new ListEntry();
        entries[i].setETag(engineEntries[i].getETag());
        entries[i].setKey(engineEntries[i].getKey());
        entries[i].setLastModified(engineEntries[i].getLastModified());
        entries[i].setSize(engineEntries[i].getSize());
        entries[i].setStorageClass(StorageClass.STANDARD);
View Full Code Here

  output.setPrefix( bucket.getPrefix( ) );
 
  List<ListEntry> outputContents = output.getContents( );
  for ( Metadata meta : contents )
  {
      ListEntry entry = new ListEntry( );
      entry.setETag( String.valueOf( meta.getMd5( ) ) );
      entry.setKey( meta.getKey( ) );
      try
      {
    entry.setLastModified( DatatypeFactory.newInstance( )
      .newXMLGregorianCalendar(
              meta
      .getLastModified( ).toGregorianCalendar( ) ) );
      }
      catch ( DatatypeConfigurationException e )
      {
    throw new CloudStoreException( e );
      }
      entry.setSize( meta.getSize( ) );
      entry.setStorageClass( StorageClass
        .valueOf( meta.getStorageClass( ) ) );
      outputContents.add( entry );
  }
  return output;
    }
View Full Code Here

                S3Object[] partialObjects = new S3Object[
                   (entries == null? 0 : entries.length)];
               
                log.debug("Found " + partialObjects.length + " objects in one batch");
                for (int i = 0; entries != null && i < entries.length; i++) {
                    ListEntry entry = entries[i];
                    S3Object object = new S3Object(entry.getKey());
                    object.setLastModifiedDate(entry.getLastModified().getTime());
                    object.setETag(entry.getETag());
                    object.setContentLength(entry.getSize());
                    object.setStorageClass(entry.getStorageClass().toString());
                    object.setOwner(convertOwner(entry.getOwner()));
                    partialObjects[i] = object;
                   
                    // This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
                    priorLastKey = object.getKey();
                }
               
                objects.addAll(Arrays.asList(partialObjects));
               
                PrefixEntry[] prefixEntries = result.getCommonPrefixes();
                if (prefixEntries != null) {
                    log.debug("Found " + prefixEntries.length + " common prefixes in one batch");                   
                }
                for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
                    PrefixEntry entry = prefixEntries[i];
                    commonPrefixes.add(entry.getPrefix());
                }
               
                incompleteListing = result.isIsTruncated();
                if (incompleteListing) {
                  if (result.getNextMarker() != null) {
View Full Code Here

               
                if (log.isDebugEnabled()) {
                  log.debug("Found " + partialObjects.length + " objects in one batch");
                }
                for (int i = 0; entries != null && i < entries.length; i++) {
                    ListEntry entry = entries[i];
                    S3Object object = new S3Object(entry.getKey());
                    object.setLastModifiedDate(entry.getLastModified().getTime());
                    object.setETag(entry.getETag());
                    object.setContentLength(entry.getSize());
                    object.setStorageClass(entry.getStorageClass().toString());
                    object.setOwner(convertOwner(entry.getOwner()));
                    partialObjects[i] = object;
                   
                    // This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
                    priorLastKey = object.getKey();
                }
               
                objects.addAll(Arrays.asList(partialObjects));
               
                PrefixEntry[] prefixEntries = result.getCommonPrefixes();
                if (prefixEntries != null) {
                  if (log.isDebugEnabled()) {
                    log.debug("Found " + prefixEntries.length + " common prefixes in one batch");
                  }
                }
                for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
                    PrefixEntry entry = prefixEntries[i];
                    commonPrefixes.add(entry.getPrefix());
                }
               
                incompleteListing = result.isIsTruncated();
                if (incompleteListing) {
                  if (result.getNextMarker() != null) {
View Full Code Here

               
                if (log.isDebugEnabled()) {
                  log.debug("Found " + partialObjects.length + " objects in one batch");
                }
                for (int i = 0; entries != null && i < entries.length; i++) {
                    ListEntry entry = entries[i];
                    S3Object object = new S3Object(entry.getKey());
                    object.setLastModifiedDate(entry.getLastModified().getTime());
                    object.setETag(entry.getETag());
                    object.setContentLength(entry.getSize());
                    object.setStorageClass(entry.getStorageClass().toString());
                    object.setOwner(convertOwner(entry.getOwner()));
                    partialObjects[i] = object;
                   
                    // This shouldn't be necessary, but result.getNextMarker() doesn't work as expected.
                    priorLastKey = object.getKey();
                }
               
                objects.addAll(Arrays.asList(partialObjects));
               
                PrefixEntry[] prefixEntries = result.getCommonPrefixes();
                if (prefixEntries != null) {
                  if (log.isDebugEnabled()) {
                    log.debug("Found " + prefixEntries.length + " common prefixes in one batch");
                  }
                }
                for (int i = 0; prefixEntries != null && i < prefixEntries.length; i++ ) {
                    PrefixEntry entry = prefixEntries[i];
                    commonPrefixes.add(entry.getPrefix());
                }
               
                incompleteListing = result.isIsTruncated();
                if (incompleteListing) {
                  if (result.getNextMarker() != null) {
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.S3_PING$ListEntry

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.