Package com.netflix.exhibitor.core.backup.s3

Examples of com.netflix.exhibitor.core.backup.s3.S3BackupProvider


    @Test
    public void  testGCOldLockFiles() throws Exception
    {
        final BlockingQueue<String>   queue = new ArrayBlockingQueue<String>(1);
        ActivityLog                   mockLog = Mockito.mock(ActivityLog.class);
        MockS3Client                  client = new MockS3Client(null, null)
        {
            @Override
            public void deleteObject(String bucket, String key) throws Exception
            {
                queue.put(key);
View Full Code Here


        final int       POLLING_MS = 1;

        final AtomicBoolean             isLocked = new AtomicBoolean(false);
        final AtomicInteger             lockCount = new AtomicInteger(0);

        final MockS3Client              client = new MockS3Client(null, null);
        final ActivityLog               mockLog = Mockito.mock(ActivityLog.class);

        ExecutorCompletionService<Void> completionService = new ExecutorCompletionService<Void>(Executors.newFixedThreadPool(QTY));
        for ( int i = 0; i < QTY; ++i )
        {
View Full Code Here

        ActivityLog     mockLog = Mockito.mock(ActivityLog.class);

        List<S3PseudoLock>  locks = Lists.newArrayList();
        for ( int i = 0; i < QTY; ++i )
        {
            MockS3Client        client = new MockS3Client();
            S3PseudoLock        lock = new S3PseudoLock(client, "foo", "-prefix-", 10000, POLLING_MS, 0);
            locks.add(lock);
        }

        for ( S3PseudoLock lock : locks )
View Full Code Here

    }

    @Test
    public void         testSingle() throws Exception
    {
        MockS3Client        client = new MockS3Client();
        ActivityLog         mockLog = Mockito.mock(ActivityLog.class);

        S3PseudoLock        lock = new S3PseudoLock(client, "foo", "bar", 10000, 1, 0);
        Assert.assertTrue(lock.lock(mockLog, 5, TimeUnit.SECONDS));
        lock.unlock();
View Full Code Here

        }

        BackupProvider backupProvider = null;
        if ( "true".equalsIgnoreCase(commandLine.getOptionValue(S3_BACKUP)) )
        {
            backupProvider = new S3BackupProvider(new S3ClientFactoryImpl(), awsCredentials, awsClientConfig, s3Region);
        }
        else if ( "true".equalsIgnoreCase(commandLine.getOptionValue(FILESYSTEMBACKUP)) )
        {
            backupProvider = new FileSystemBackupProvider();
        }
View Full Code Here

TOP

Related Classes of com.netflix.exhibitor.core.backup.s3.S3BackupProvider

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.