target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testHandleResponse() throws Exception { final AuthenticationResult result = _negotiator.handleResponse(VALID_RESPONSE.getBytes(US_ASCII)); verify(_authenticationProvider).authenticate(eq(VALID_USERNAME), eq(VALID_PASSWORD)); assertEquals("Unexpected authentication result", _successfulResult, result); ...
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_state == State.INITIAL && (response == null ||...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
@Test public void testMultipleAuthenticationAttempts() throws Exception { final AuthenticationResult firstResult = _negotiator.handleResponse(VALID_RESPONSE.getBytes(US_ASCII)); assertEquals("Unexpected first authentication result", _successfulResult, firstResult); final AuthenticationResult secondResult = _negotiator....
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_state == State.INITIAL && (response == null ||...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
@Test public void testHandleInvalidUser() throws Exception { final AuthenticationResult result = _negotiator.handleResponse(String.format(RESPONSE_FORMAT_STRING, "invalidUser", VALID_PASSWORD).getBytes(US_ASCII)); assertEquals("Unexpected authentication result", _errorResult, result); }
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_state == State.INITIAL && (response == null ||...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
@Test public void testHandleInvalidPassword() throws Exception { final AuthenticationResult result = _negotiator.handleResponse(String.format(RESPONSE_FORMAT_STRING, VALID_USERNAME, "invalidPassword").getBytes(US_ASCII)); assertEquals("Unexpected authentication result", _errorResult, result); }
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_state == State.INITIAL && (response == null ||...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
@Test public void testHandleNeverSendAResponse() throws Exception { final AuthenticationResult firstResult = _negotiator.handleResponse(new byte[0]); assertEquals("Unexpected authentication status", AuthenticationResult.AuthenticationStatus.CONTINUE, firstResult.getStatus()); assertArrayEquals("Unexpected authenticatio...
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_state == State.INITIAL && (response == null ||...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
@Test public void testHandleNoInitialResponse() throws Exception { final AuthenticationResult result = _negotiator.handleResponse(new byte[0]); assertEquals("Unexpected authentication status", AuthenticationResult.AuthenticationStatus.CONTINUE, result.getStatus()); assertArrayEquals("Unexpected authentication challenge...
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_state == State.INITIAL && (response == null ||...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
@Test public void testHandleNoInitialResponseNull() throws Exception { final AuthenticationResult result = _negotiator.handleResponse(null); assertEquals("Unexpected authentication status", AuthenticationResult.AuthenticationStatus.CONTINUE, result.getStatus()); assertArrayEquals("Unexpected authentication challenge", ...
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_state == State.INITIAL && (response == null ||...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
PlainNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_state == State.COMPLETE) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException("Multiple Authentications not permitted.")); } else if (_st...
@Test public void testHandleResponse() throws Exception { final AuthenticationResult result = mock(AuthenticationResult.class); AnonymousNegotiator negotiator = new AnonymousNegotiator(result); final Object actual = negotiator.handleResponse(new byte[0]); assertEquals("Unexpected result", result, actual); Authenticatio...
@Override public AuthenticationResult handleResponse(final byte[] response) { if (_isComplete) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException( "Multiple Authentications not permitted.")); } else { _isComplete = true; } return _anonymousAuthenticationResult; ...
AnonymousNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_isComplete) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException( "Multiple Authentications not permitted.")); } else { _isComplete =...
AnonymousNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_isComplete) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException( "Multiple Authentications not permitted.")); } else { _isComplete =...
AnonymousNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_isComplete) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException( "Multiple Authentications not permitted.")); } else { _isComplete =...
AnonymousNegotiator implements SaslNegotiator { @Override public AuthenticationResult handleResponse(final byte[] response) { if (_isComplete) { return new AuthenticationResult(AuthenticationResult.AuthenticationStatus.ERROR, new IllegalStateException( "Multiple Authentications not permitted.")); } else { _isComplete =...
@Test public void testSaslAuthenticationSuccessReturnsSubjectWithUserAndGroupPrincipals() throws Exception { when(_testSaslNegotiator.handleResponse(_saslResponseBytes)).thenReturn(_authenticationResult); SubjectAuthenticationResult result = _subjectCreator.authenticate(_testSaslNegotiator, _saslResponseBytes); final S...
public SubjectAuthenticationResult authenticate(SaslNegotiator saslNegotiator, byte[] response) { AuthenticationResult authenticationResult = saslNegotiator.handleResponse(response); if(authenticationResult.getStatus() == AuthenticationStatus.SUCCESS) { return createResultWithGroups(authenticationResult); } else { if (...
SubjectCreator { public SubjectAuthenticationResult authenticate(SaslNegotiator saslNegotiator, byte[] response) { AuthenticationResult authenticationResult = saslNegotiator.handleResponse(response); if(authenticationResult.getStatus() == AuthenticationStatus.SUCCESS) { return createResultWithGroups(authenticationResul...
SubjectCreator { public SubjectAuthenticationResult authenticate(SaslNegotiator saslNegotiator, byte[] response) { AuthenticationResult authenticationResult = saslNegotiator.handleResponse(response); if(authenticationResult.getStatus() == AuthenticationStatus.SUCCESS) { return createResultWithGroups(authenticationResul...
SubjectCreator { public SubjectAuthenticationResult authenticate(SaslNegotiator saslNegotiator, byte[] response) { AuthenticationResult authenticationResult = saslNegotiator.handleResponse(response); if(authenticationResult.getStatus() == AuthenticationStatus.SUCCESS) { return createResultWithGroups(authenticationResul...
SubjectCreator { public SubjectAuthenticationResult authenticate(SaslNegotiator saslNegotiator, byte[] response) { AuthenticationResult authenticationResult = saslNegotiator.handleResponse(response); if(authenticationResult.getStatus() == AuthenticationStatus.SUCCESS) { return createResultWithGroups(authenticationResul...
@Test public void testGetFilesAsZippedContent() throws Exception { String[] fileNames = createTestRolledFilesAndNotifyWatcher(); String[] requestedFiles = new String[]{ fileNames[0], fileNames[2] }; ZippedContent content = _rolloverWatcher.getFilesAsZippedContent(new HashSet<>(Arrays.asList(requestedFiles))); assertZip...
public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = getPath(name); if (filePath != null) { paths.put(name, filePath); } }...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
@Test public void testAmqpValueWithNullWithObjectMessageAnnotation() throws Exception { final Object expected = null; final AmqpValue amqpValue = new AmqpValue(expected); Message_1_0 sourceMessage = createTestMessage(OBJECT_MESSAGE_MESSAGE_ANNOTATION, amqpValue.createEncodingRetainingSection()); final InternalMessage c...
@Override public InternalMessage convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace) { Object bodyObject = MessageConverter_from_1_0.convertBodyToObject(serverMessage); final AMQMessageHeader convertHeader = convertHeader(serverMessage, addressSpace, bodyObject); return InternalMessage.convert(serverMess...
MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage> { @Override public InternalMessage convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace) { Object bodyObject = MessageConverter_from_1_0.convertBodyToObject(serverMessage); final AMQMessageHeader convertHeader = con...
MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage> { @Override public InternalMessage convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace) { Object bodyObject = MessageConverter_from_1_0.convertBodyToObject(serverMessage); final AMQMessageHeader convertHeader = con...
MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage> { @Override public InternalMessage convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace) { Object bodyObject = MessageConverter_from_1_0.convertBodyToObject(serverMessage); final AMQMessageHeader convertHeader = con...
MessageConverter_v1_0_to_Internal implements MessageConverter<Message_1_0, InternalMessage> { @Override public InternalMessage convert(Message_1_0 serverMessage, NamedAddressSpace addressSpace) { Object bodyObject = MessageConverter_from_1_0.convertBodyToObject(serverMessage); final AMQMessageHeader convertHeader = con...
@Test public void testGetGroupPrincipals() { getAndAssertGroupPrincipals(_group1, _group2); }
Set<Principal> getGroupPrincipals(Principal userPrincipal) { Set<Principal> principals = new HashSet<Principal>(); for (GroupProvider groupProvider : _groupProviders) { Set<Principal> groups = groupProvider.getGroupPrincipalsForUser(userPrincipal); if (groups != null) { principals.addAll(groups); } } return Collections...
SubjectCreator { Set<Principal> getGroupPrincipals(Principal userPrincipal) { Set<Principal> principals = new HashSet<Principal>(); for (GroupProvider groupProvider : _groupProviders) { Set<Principal> groups = groupProvider.getGroupPrincipalsForUser(userPrincipal); if (groups != null) { principals.addAll(groups); } } r...
SubjectCreator { Set<Principal> getGroupPrincipals(Principal userPrincipal) { Set<Principal> principals = new HashSet<Principal>(); for (GroupProvider groupProvider : _groupProviders) { Set<Principal> groups = groupProvider.getGroupPrincipalsForUser(userPrincipal); if (groups != null) { principals.addAll(groups); } } r...
SubjectCreator { Set<Principal> getGroupPrincipals(Principal userPrincipal) { Set<Principal> principals = new HashSet<Principal>(); for (GroupProvider groupProvider : _groupProviders) { Set<Principal> groups = groupProvider.getGroupPrincipalsForUser(userPrincipal); if (groups != null) { principals.addAll(groups); } } r...
SubjectCreator { Set<Principal> getGroupPrincipals(Principal userPrincipal) { Set<Principal> principals = new HashSet<Principal>(); for (GroupProvider groupProvider : _groupProviders) { Set<Principal> groups = groupProvider.getGroupPrincipalsForUser(userPrincipal); if (groups != null) { principals.addAll(groups); } } r...
@Test public void testReadByteByByte_MultipleStreams() throws Exception { InputStream bis1 = new ByteArrayInputStream("ab".getBytes()); InputStream bis2 = new ByteArrayInputStream("cd".getBytes()); CompositeInputStream cis = new CompositeInputStream(Arrays.asList(bis1, bis2)); assertEquals("1st read byte unexpected", '...
@Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count; }
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
@Test public void testReadByteArray_MultipleStreams() throws Exception { InputStream bis1 = new ByteArrayInputStream("ab".getBytes()); InputStream bis2 = new ByteArrayInputStream("cd".getBytes()); CompositeInputStream cis = new CompositeInputStream(Arrays.asList(bis1, bis2)); byte[] buf = new byte[3]; int read1 = cis.r...
@Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count; }
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
@Test public void testReadsMixed_SingleStream() throws Exception { InputStream bis = new ByteArrayInputStream("abcd".getBytes()); CompositeInputStream cis = new CompositeInputStream(Arrays.asList(bis)); byte[] buf = new byte[3]; int read1 = cis.read(buf); assertEquals("Unexpected return value from 1st array read", 3, r...
@Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count; }
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
CompositeInputStream extends InputStream { @Override public int read() throws IOException { int count = -1; if (_current != null) { count = _current.read(); } if (count == -1 && _inputStreams.size() > 0) { if (_current != null) { _current.close(); } _current = _inputStreams.removeFirst(); count = read(); } return count...
@Test public void testClose() throws Exception { InputStream bis1 = mock(InputStream.class); InputStream bis2 = mock(InputStream.class); CompositeInputStream cis = new CompositeInputStream(Arrays.asList(bis1, bis2)); cis.close(); verify(bis1).close(); verify(bis1).close(); when(bis1.read()).thenThrow(new IOException("m...
@Override public void close() throws IOException { IOException ioException = null; try { if (_current != null) { try { _current.close(); _current = null; } catch (IOException e) { ioException = e; } } for (InputStream is : _inputStreams) { try { is.close(); } catch (IOException e) { if (ioException != null) { ioExcepti...
CompositeInputStream extends InputStream { @Override public void close() throws IOException { IOException ioException = null; try { if (_current != null) { try { _current.close(); _current = null; } catch (IOException e) { ioException = e; } } for (InputStream is : _inputStreams) { try { is.close(); } catch (IOExceptio...
CompositeInputStream extends InputStream { @Override public void close() throws IOException { IOException ioException = null; try { if (_current != null) { try { _current.close(); _current = null; } catch (IOException e) { ioException = e; } } for (InputStream is : _inputStreams) { try { is.close(); } catch (IOExceptio...
CompositeInputStream extends InputStream { @Override public void close() throws IOException { IOException ioException = null; try { if (_current != null) { try { _current.close(); _current = null; } catch (IOException e) { ioException = e; } } for (InputStream is : _inputStreams) { try { is.close(); } catch (IOExceptio...
CompositeInputStream extends InputStream { @Override public void close() throws IOException { IOException ioException = null; try { if (_current != null) { try { _current.close(); _current = null; } catch (IOException e) { ioException = e; } } for (InputStream is : _inputStreams) { try { is.close(); } catch (IOExceptio...
@Test public void getOpenConnectionCount() { final ConnectionPrincipalStatistics stats = new ConnectionPrincipalStatisticsImpl(1, Collections.singletonList(System.currentTimeMillis())); assertEquals(1, stats.getConnectionCount()); }
@Override public int getConnectionCount() { return _connectionCount; }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionCount() { return _connectionCount; } }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionCount() { return _connectionCount; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionCount() { return _connectionCount; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); @Override int getConnectionCount(); @Override int getConnection...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionCount() { return _connectionCount; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); @Override int getConnectionCount(); @Override int getConnection...
@Test public void getOpenConnectionFrequency() { final long connectionCreatedTime = System.currentTimeMillis(); final ConnectionPrincipalStatistics stats = new ConnectionPrincipalStatisticsImpl(1, Arrays.asList(connectionCreatedTime - 1000, connectionCreatedTime)); assertEquals(2, stats.getConnectionFrequency()); }
@Override public int getConnectionFrequency() { return _latestConnectionCreatedTimes.size(); }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionFrequency() { return _latestConnectionCreatedTimes.size(); } }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionFrequency() { return _latestConnectionCreatedTimes.size(); } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionFrequency() { return _latestConnectionCreatedTimes.size(); } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); @Override int getConnectionCount(); @Ov...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int getConnectionFrequency() { return _latestConnectionCreatedTimes.size(); } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); @Override int getConnectionCount(); @Ov...
@Test public void getLatestConnectionCreatedTimes() { final long connectionCreatedTime = System.currentTimeMillis(); final List<Long> connectionCreatedTimes = Arrays.asList(connectionCreatedTime - 1000, connectionCreatedTime); final ConnectionPrincipalStatisticsImpl stats = new ConnectionPrincipalStatisticsImpl(1, conn...
List<Long> getLatestConnectionCreatedTimes() { return _latestConnectionCreatedTimes; }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { List<Long> getLatestConnectionCreatedTimes() { return _latestConnectionCreatedTimes; } }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { List<Long> getLatestConnectionCreatedTimes() { return _latestConnectionCreatedTimes; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { List<Long> getLatestConnectionCreatedTimes() { return _latestConnectionCreatedTimes; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); @Override int getConnectionCount(); @Override i...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { List<Long> getLatestConnectionCreatedTimes() { return _latestConnectionCreatedTimes; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCreatedTimes); @Override int getConnectionCount(); @Override i...
@Test public void equals() { final long connectionCreatedTime = System.currentTimeMillis(); final ConnectionPrincipalStatistics stats1 = new ConnectionPrincipalStatisticsImpl(1, Collections.singletonList(connectionCreatedTime)); final ConnectionPrincipalStatistics stats2 = new ConnectionPrincipalStatisticsImpl(1, Colle...
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ConnectionPrincipalStatisticsImpl that = (ConnectionPrincipalStatisticsImpl) o; if (_connectionCount != that._connectionCount) { return false; } return _latestConnection...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ConnectionPrincipalStatisticsImpl that = (ConnectionPrincipalStatisticsImpl) o; if (_connect...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ConnectionPrincipalStatisticsImpl that = (ConnectionPrincipalStatisticsImpl) o; if (_connect...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ConnectionPrincipalStatisticsImpl that = (ConnectionPrincipalStatisticsImpl) o; if (_connect...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final ConnectionPrincipalStatisticsImpl that = (ConnectionPrincipalStatisticsImpl) o; if (_connect...
@Test public void testHashCode() { final long connectionCreatedTime = System.currentTimeMillis(); final ConnectionPrincipalStatistics stats1 = new ConnectionPrincipalStatisticsImpl(1, Collections.singletonList(connectionCreatedTime)); final ConnectionPrincipalStatistics stats2 = new ConnectionPrincipalStatisticsImpl(1,...
@Override public int hashCode() { int result = _connectionCount; result = 31 * result + _latestConnectionCreatedTimes.hashCode(); return result; }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int hashCode() { int result = _connectionCount; result = 31 * result + _latestConnectionCreatedTimes.hashCode(); return result; } }
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int hashCode() { int result = _connectionCount; result = 31 * result + _latestConnectionCreatedTimes.hashCode(); return result; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCr...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int hashCode() { int result = _connectionCount; result = 31 * result + _latestConnectionCreatedTimes.hashCode(); return result; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCr...
ConnectionPrincipalStatisticsImpl implements ConnectionPrincipalStatistics { @Override public int hashCode() { int result = _connectionCount; result = 31 * result + _latestConnectionCreatedTimes.hashCode(); return result; } ConnectionPrincipalStatisticsImpl(final int connectionCount, final List<Long> latestConnectionCr...
@Test public void testGetFilesAsZippedContentWithNonExistingFile() throws Exception { String[] fileNames = createTestRolledFilesAndNotifyWatcher(); new File(_baseFolder, fileNames[2]).delete(); String[] requestedFiles = new String[]{ fileNames[0], fileNames[2] }; String[] expectedFiles = new String[]{ fileNames[0] }; Z...
public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = getPath(name); if (filePath != null) { paths.put(name, filePath); } }...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getFilesAsZippedContent(Set<String> fileNames) { if (fileNames == null) { throw new IllegalArgumentException("File name cannot be null"); } Map<String, Path> paths = new TreeMap<>(); for (String name: fileNames) { Path filePath = ...
@Test public void execute() { final QueueManagingVirtualHost vh = mock(QueueManagingVirtualHost.class); when(vh.getName()).thenReturn(getTestName()); final ConnectionPrincipalStatisticsRegistry registry = mock(ConnectionPrincipalStatisticsRegistry.class); ConnectionPrincipalStatisticsCheckingTask task = new ConnectionP...
@Override public void execute() { _connectionPrincipalStatisticsRegistry.reevaluateConnectionStatistics(); }
ConnectionPrincipalStatisticsCheckingTask extends HouseKeepingTask { @Override public void execute() { _connectionPrincipalStatisticsRegistry.reevaluateConnectionStatistics(); } }
ConnectionPrincipalStatisticsCheckingTask extends HouseKeepingTask { @Override public void execute() { _connectionPrincipalStatisticsRegistry.reevaluateConnectionStatistics(); } ConnectionPrincipalStatisticsCheckingTask(final QueueManagingVirtualHost virtualHost, fin...
ConnectionPrincipalStatisticsCheckingTask extends HouseKeepingTask { @Override public void execute() { _connectionPrincipalStatisticsRegistry.reevaluateConnectionStatistics(); } ConnectionPrincipalStatisticsCheckingTask(final QueueManagingVirtualHost virtualHost, fin...
ConnectionPrincipalStatisticsCheckingTask extends HouseKeepingTask { @Override public void execute() { _connectionPrincipalStatisticsRegistry.reevaluateConnectionStatistics(); } ConnectionPrincipalStatisticsCheckingTask(final QueueManagingVirtualHost virtualHost, fin...
@Test public void getCache() { String cacheName = "test"; final Cache<Object, Object> cache = new NullCache<>(); final CacheProvider virtualHost = mock(CacheProvider.class, withSettings().extraInterfaces(VirtualHost.class)); when(virtualHost.getNamedCache(cacheName)).thenReturn(cache); final Subject subject = new Subje...
public static <K, V> Cache<K, V> getCache(final String cacheName, final Cache<K, V> defaultCache) { Cache<K, V> cache = defaultCache; Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null) { VirtualHostPrincipal principal = QpidPrincipal.getSingletonPrincipal(subject, true, VirtualHos...
CacheFactory { public static <K, V> Cache<K, V> getCache(final String cacheName, final Cache<K, V> defaultCache) { Cache<K, V> cache = defaultCache; Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null) { VirtualHostPrincipal principal = QpidPrincipal.getSingletonPrincipal(subject, t...
CacheFactory { public static <K, V> Cache<K, V> getCache(final String cacheName, final Cache<K, V> defaultCache) { Cache<K, V> cache = defaultCache; Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null) { VirtualHostPrincipal principal = QpidPrincipal.getSingletonPrincipal(subject, t...
CacheFactory { public static <K, V> Cache<K, V> getCache(final String cacheName, final Cache<K, V> defaultCache) { Cache<K, V> cache = defaultCache; Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null) { VirtualHostPrincipal principal = QpidPrincipal.getSingletonPrincipal(subject, t...
CacheFactory { public static <K, V> Cache<K, V> getCache(final String cacheName, final Cache<K, V> defaultCache) { Cache<K, V> cache = defaultCache; Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null) { VirtualHostPrincipal principal = QpidPrincipal.getSingletonPrincipal(subject, t...
@Test public void testExceptionOnRecovery() throws Exception { ServerScopedRuntimeException exception = new ServerScopedRuntimeException("test"); doThrow(exception).when(_storeReader).visitMessageInstances(any(TransactionLogResource.class), any(MessageInstanceHandler.class)); Queue<?> queue = mock(Queue.class); when(_v...
@Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } @Override ListenableFuture<Void> recover(fina...
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } @Override ListenableFuture<Void> recover(fina...
@Test public void testRecoveryEmptyQueue() throws Exception { Queue<?> queue = mock(Queue.class); when(_virtualHost.getChildren(eq(Queue.class))).thenReturn(Collections.singleton(queue)); AsynchronousMessageStoreRecoverer recoverer = new AsynchronousMessageStoreRecoverer(); ListenableFuture<Void> result = recoverer.rec...
@Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } @Override ListenableFuture<Void> recover(fina...
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } @Override ListenableFuture<Void> recover(fina...
@Test public void testRecoveryWhenLastRecoveryMessageIsConsumedBeforeRecoveryCompleted() throws Exception { Queue<?> queue = mock(Queue.class); when(queue.getId()).thenReturn(UUID.randomUUID()); when(_virtualHost.getChildren(eq(Queue.class))).thenReturn(Collections.singleton(queue)); when(_store.getNextMessageId()).the...
@Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } }
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } @Override ListenableFuture<Void> recover(fina...
AsynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(final QueueManagingVirtualHost<?> virtualHost) { _asynchronousRecoverer = new AsynchronousRecoverer(virtualHost); return _asynchronousRecoverer.recover(); } @Override ListenableFuture<Void> recover(fina...
@Test public void testValidateMessageStoreCreationFails() { Map<String,Object> attributes = Collections.<String, Object>singletonMap(AbstractVirtualHost.NAME, getTestName()); AbstractVirtualHost host = new AbstractVirtualHost(attributes, _node) { @Override protected MessageStore createMessageStore() { return _failingSt...
protected void validateMessageStoreCreation() { MessageStore store = createMessageStore(); if (store != null) { try { store.openMessageStore(this); } catch (Exception e) { throw new IllegalConfigurationException("Cannot open virtual host message store:" + e.getMessage(), e); } finally { try { store.closeMessageStore();...
AbstractVirtualHost extends AbstractConfiguredObject<X> implements QueueManagingVirtualHost<X> { protected void validateMessageStoreCreation() { MessageStore store = createMessageStore(); if (store != null) { try { store.openMessageStore(this); } catch (Exception e) { throw new IllegalConfigurationException("Cannot ope...
AbstractVirtualHost extends AbstractConfiguredObject<X> implements QueueManagingVirtualHost<X> { protected void validateMessageStoreCreation() { MessageStore store = createMessageStore(); if (store != null) { try { store.openMessageStore(this); } catch (Exception e) { throw new IllegalConfigurationException("Cannot ope...
AbstractVirtualHost extends AbstractConfiguredObject<X> implements QueueManagingVirtualHost<X> { protected void validateMessageStoreCreation() { MessageStore store = createMessageStore(); if (store != null) { try { store.openMessageStore(this); } catch (Exception e) { throw new IllegalConfigurationException("Cannot ope...
AbstractVirtualHost extends AbstractConfiguredObject<X> implements QueueManagingVirtualHost<X> { protected void validateMessageStoreCreation() { MessageStore store = createMessageStore(); if (store != null) { try { store.openMessageStore(this); } catch (Exception e) { throw new IllegalConfigurationException("Cannot ope...
@SuppressWarnings("unchecked") @Test public void testRecoveryOfSingleMessageOnSingleQueue() { final Queue<?> queue = createRegisteredMockQueue(); final long messageId = 1; final StoredMessage<StorableMessageMetaData> storedMessage = createMockStoredMessage(messageId); MessageStore store = new NullMessageStore() { @Over...
@Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.newMessageStoreReader(); MessageStoreLogSubject logSubject = new Mess...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
@SuppressWarnings("unchecked") @Test public void testRecoveryOfMessageInstanceForNonExistingMessage() { final Queue<?> queue = createRegisteredMockQueue(); final long messageId = 1; final Transaction transaction = mock(Transaction.class); MessageStore store = new NullMessageStore() { @Override public void visitMessages...
@Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.newMessageStoreReader(); MessageStoreLogSubject logSubject = new Mess...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
@Test public void testRecoveryOfMessageInstanceForNonExistingQueue() { final UUID queueId = UUID.randomUUID(); final Transaction transaction = mock(Transaction.class); final long messageId = 1; final StoredMessage<StorableMessageMetaData> storedMessage = createMockStoredMessage(messageId); MessageStore store = new Null...
@Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.newMessageStoreReader(); MessageStoreLogSubject logSubject = new Mess...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
@Test public void testRecoveryDeletesOrphanMessages() { final long messageId = 1; final StoredMessage<StorableMessageMetaData> storedMessage = createMockStoredMessage(messageId); MessageStore store = new NullMessageStore() { @Override public void visitMessages(MessageHandler handler) throws StoreException { handler.han...
@Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.newMessageStoreReader(); MessageStoreLogSubject logSubject = new Mess...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
@Test public void testGetAllFilesAsZippedContent() throws Exception { String[] fileNames = createTestRolledFilesAndNotifyWatcher(); ZippedContent content = _rolloverWatcher.getAllFilesAsZippedContent(); assertZippedContent(fileNames, content); }
public ZippedContent getAllFilesAsZippedContent() { Set<String> fileNames = new HashSet<>(_rolledFiles); fileNames.add(getDisplayName(_activeFilePath)); return getFilesAsZippedContent(fileNames); }
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getAllFilesAsZippedContent() { Set<String> fileNames = new HashSet<>(_rolledFiles); fileNames.add(getDisplayName(_activeFilePath)); return getFilesAsZippedContent(fileNames); } }
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getAllFilesAsZippedContent() { Set<String> fileNames = new HashSet<>(_rolledFiles); fileNames.add(getDisplayName(_activeFilePath)); return getFilesAsZippedContent(fileNames); } RolloverWatcher(final String activeFileName); }
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getAllFilesAsZippedContent() { Set<String> fileNames = new HashSet<>(_rolledFiles); fileNames.add(getDisplayName(_activeFilePath)); return getFilesAsZippedContent(fileNames); } RolloverWatcher(final String activeFileName); @Overri...
RolloverWatcher implements RollingPolicyDecorator.RolloverListener { public ZippedContent getAllFilesAsZippedContent() { Set<String> fileNames = new HashSet<>(_rolledFiles); fileNames.add(getDisplayName(_activeFilePath)); return getFilesAsZippedContent(fileNames); } RolloverWatcher(final String activeFileName); @Overri...
@SuppressWarnings("unchecked") @Test public void testRecoveryOfSingleEnqueueWithDistributedTransaction() { Queue<?> queue = createRegisteredMockQueue(); final Transaction transaction = mock(Transaction.class); final StoredMessage<StorableMessageMetaData> storedMessage = createMockStoredMessage(1); long messageId = stor...
@Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.newMessageStoreReader(); MessageStoreLogSubject logSubject = new Mess...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
@Test public void testRecoveryOfSingleDequeueWithDistributedTransaction() { final UUID queueId = UUID.randomUUID(); final Queue<?> queue = createRegisteredMockQueue(queueId); final Transaction transaction = mock(Transaction.class); final StoredMessage<StorableMessageMetaData> storedMessage = createMockStoredMessage(1);...
@Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.newMessageStoreReader(); MessageStoreLogSubject logSubject = new Mess...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
SynchronousMessageStoreRecoverer implements MessageStoreRecoverer { @Override public ListenableFuture<Void> recover(QueueManagingVirtualHost<?> virtualHost) { EventLogger eventLogger = virtualHost.getEventLogger(); MessageStore store = virtualHost.getMessageStore(); MessageStore.MessageStoreReader storeReader = store.n...
@Test public void runExecuteThrowsConnectionScopeRuntimeException() { final VirtualHost virualHost = mock(VirtualHost.class); final AccessControlContext context = AccessController.getContext(); final HouseKeepingTask task = new HouseKeepingTask(getTestName(), virualHost, context) { @Override public void execute() { thr...
@Override final public void run() { String originalThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(_name); try { AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { execute(); } catch (ConnectionScopedRuntimeException e) { LOGGER.warn("Execu...
HouseKeepingTask implements Runnable { @Override final public void run() { String originalThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(_name); try { AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { execute(); } catch (ConnectionScopedR...
HouseKeepingTask implements Runnable { @Override final public void run() { String originalThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(_name); try { AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { execute(); } catch (ConnectionScopedR...
HouseKeepingTask implements Runnable { @Override final public void run() { String originalThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(_name); try { AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { execute(); } catch (ConnectionScopedR...
HouseKeepingTask implements Runnable { @Override final public void run() { String originalThreadName = Thread.currentThread().getName(); Thread.currentThread().setName(_name); try { AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { try { execute(); } catch (ConnectionScopedR...
@Test public void testAddConsumer() throws Exception { final EnumSet<ConsumerOption> options = EnumSet.noneOf(ConsumerOption.class); final ConsumerTarget target = mock(ConsumerTarget.class); when(target.allocateCredit(any(ServerMessage.class))).thenReturn(true); MessageInstanceConsumer consumer = _virtualHostProperties...
@Override public <T extends ConsumerTarget<T>> Consumer<T> addConsumer(final T target, final FilterManager filters, final Class<? extends ServerMessage> messageClass, final String consumerName, final EnumSet<ConsumerOption> options, final Integer priority) throws ExistingExclusiveConsumer, ExistingConsumerPreventsExclu...
VirtualHostPropertiesNode extends AbstractSystemMessageSource { @Override public <T extends ConsumerTarget<T>> Consumer<T> addConsumer(final T target, final FilterManager filters, final Class<? extends ServerMessage> messageClass, final String consumerName, final EnumSet<ConsumerOption> options, final Integer priority)...
VirtualHostPropertiesNode extends AbstractSystemMessageSource { @Override public <T extends ConsumerTarget<T>> Consumer<T> addConsumer(final T target, final FilterManager filters, final Class<? extends ServerMessage> messageClass, final String consumerName, final EnumSet<ConsumerOption> options, final Integer priority)...
VirtualHostPropertiesNode extends AbstractSystemMessageSource { @Override public <T extends ConsumerTarget<T>> Consumer<T> addConsumer(final T target, final FilterManager filters, final Class<? extends ServerMessage> messageClass, final String consumerName, final EnumSet<ConsumerOption> options, final Integer priority)...
VirtualHostPropertiesNode extends AbstractSystemMessageSource { @Override public <T extends ConsumerTarget<T>> Consumer<T> addConsumer(final T target, final FilterManager filters, final Class<? extends ServerMessage> messageClass, final String consumerName, final EnumSet<ConsumerOption> options, final Integer priority)...
@Test public void testUpgradeVirtualHostWithJDBCStoreAndBoneCPPool() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", VIRTUALHOST_NAME); hostAttributes.put("modelVersion", "0.4"); hostAttributes.put("connectionPool", "BONECP"); hostAttributes.put("connectionURL", "jdbc:derby: hostAttri...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeVirtualHostWithJDBCStoreAndDefaultPool() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", VIRTUALHOST_NAME); hostAttributes.put("modelVersion", "0.4"); hostAttributes.put("connectionPool", "DEFAULT"); hostAttributes.put("connectionURL", "jdbc:derby: hostAtt...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeVirtualHostWithDerbyStore() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", VIRTUALHOST_NAME); hostAttributes.put("modelVersion", "0.4"); hostAttributes.put("storePath", "/tmp/vh/derby"); hostAttributes.put("storeType", "derby"); hostAttributes.put("create...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeVirtualHostWithBDBStore() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", VIRTUALHOST_NAME); hostAttributes.put("modelVersion", "0.4"); hostAttributes.put("storePath", "/tmp/vh/bdb"); hostAttributes.put("storeType", "bdb"); hostAttributes.put("createdBy", ...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeVirtualHostWithBDBHAStore() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", VIRTUALHOST_NAME); hostAttributes.put("modelVersion", "0.4"); hostAttributes.put("createdBy", VIRTUALHOST_CREATED_BY); hostAttributes.put("createdTime", VIRTUALHOST_CREATE_TIME); h...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeVirtualHostWithMemoryStore() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", VIRTUALHOST_NAME); hostAttributes.put("modelVersion", "0.4"); hostAttributes.put("storeType", "memory"); hostAttributes.put("createdBy", VIRTUALHOST_CREATED_BY); hostAttributes.pu...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testNoSubject() { _subject.getPrincipals().add(mock(Principal.class)); assertEquals(FilterReply.DENY, _principalLogEventFilter.decide(_event)); }
@Override public FilterReply decide(ILoggingEvent event) { Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null && subject.getPrincipals().contains(_principal)) { return FilterReply.NEUTRAL; } return FilterReply.DENY; }
PrincipalLogEventFilter extends Filter<ILoggingEvent> implements LogBackLogInclusionRule { @Override public FilterReply decide(ILoggingEvent event) { Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null && subject.getPrincipals().contains(_principal)) { return FilterReply.NEUTRAL; } ...
PrincipalLogEventFilter extends Filter<ILoggingEvent> implements LogBackLogInclusionRule { @Override public FilterReply decide(ILoggingEvent event) { Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null && subject.getPrincipals().contains(_principal)) { return FilterReply.NEUTRAL; } ...
PrincipalLogEventFilter extends Filter<ILoggingEvent> implements LogBackLogInclusionRule { @Override public FilterReply decide(ILoggingEvent event) { Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null && subject.getPrincipals().contains(_principal)) { return FilterReply.NEUTRAL; } ...
PrincipalLogEventFilter extends Filter<ILoggingEvent> implements LogBackLogInclusionRule { @Override public FilterReply decide(ILoggingEvent event) { Subject subject = Subject.getSubject(AccessController.getContext()); if (subject != null && subject.getPrincipals().contains(_principal)) { return FilterReply.NEUTRAL; } ...
@Test public void testUpgradeNonAMQPPort() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", "nonAMQPPort"); hostAttributes.put("type", "HTTP"); _brokerRecord.getAttributes().put("modelVersion", "2.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID()...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeImpliedAMQPPort() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", "impliedPort"); _brokerRecord.getAttributes().put("modelVersion", "2.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID(), "Port", hostAttributes, Collec...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeImpliedNonAMQPPort() { Map<String, Object> hostAttributes = new HashMap<>(); hostAttributes.put("name", "nonAMQPPort"); hostAttributes.put("protocols", "HTTP"); _brokerRecord.getAttributes().put("modelVersion", "2.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UUID....
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeBrokerType() { _brokerRecord.getAttributes().put("modelVersion", "3.0"); _brokerRecord.getAttributes().put("type", "broker"); DurableConfigurationStore dcs = new DurableConfigurationStoreStub(_brokerRecord); BrokerStoreUpgraderAndRecoverer recoverer = new BrokerStoreUpgraderAndRecoverer(_sy...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeAMQPPortWithNetworkBuffers() { Map<String, Object> portAttributes = new HashMap<>(); portAttributes.put("name", getTestName()); portAttributes.put("type", "AMQP"); portAttributes.put("receiveBufferSize", "1"); portAttributes.put("sendBufferSize", "2"); _brokerRecord.getAttributes().put("mod...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeRemoveJmxPlugin() { Map<String, Object> jmxPlugin = new HashMap<>(); jmxPlugin.put("name", getTestName()); jmxPlugin.put("type", "MANAGEMENT-JMX"); _brokerRecord.getAttributes().put("modelVersion", "6.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID(),...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeRemoveJmxPortByType() { Map<String, Object> jmxPort = new HashMap<>(); jmxPort.put("name", "jmx1"); jmxPort.put("type", "JMX"); _brokerRecord.getAttributes().put("modelVersion", "6.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID(), "Port", jmxPort, Co...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeRemoveRmiPortByType() { Map<String, Object> rmiPort = new HashMap<>(); rmiPort.put("name", "rmi1"); rmiPort.put("type", "RMI"); _brokerRecord.getAttributes().put("modelVersion", "6.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID(), "Port", rmiPort, Co...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeRemoveJmxPortByProtocol() { Map<String, Object> jmxPort = new HashMap<>(); jmxPort.put("name", "jmx2"); jmxPort.put("protocols", Collections.singleton("JMX_RMI")); _brokerRecord.getAttributes().put("modelVersion", "6.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UU...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeRemoveRmiPortByProtocol() { Map<String, Object> rmiPort2 = new HashMap<>(); rmiPort2.put("name", "rmi2"); rmiPort2.put("protocols", Collections.singleton("RMI")); _brokerRecord.getAttributes().put("modelVersion", "6.0"); ConfiguredObjectRecord portRecord = new ConfiguredObjectRecordImpl(UUI...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testAddStatusEventForIOError() { Status event = createEvent(new IOError(new IOException("Mocked: No disk space left")), Status.ERROR); _statusListener.addStatusEvent(event); verify(_systemConfig).closeAsync(); }
@Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to store log entry. Log messages could be lost.", throwable);...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
@Test public void testUpgradeRemovePreferencesProviderNonJsonLikeStore() { _brokerRecord.getAttributes().put("modelVersion", "6.0"); Map<String, Object> authenticationProvider = new HashMap<>(); authenticationProvider.put("name", "anonymous"); authenticationProvider.put("type", "Anonymous"); ConfiguredObjectRecord auth...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeRemovePreferencesProviderJsonLikeStore() { _brokerRecord.getAttributes().put("modelVersion", "6.0"); Map<String, Object> authenticationProvider = new HashMap<>(); authenticationProvider.put("name", "anonymous"); authenticationProvider.put("type", "Anonymous"); authenticationProvider.put("pr...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeTrustStoreRecordsFrom_6_0() throws Exception { _brokerRecord.getAttributes().put("modelVersion", "6.0"); Map<String, UUID> parents = Collections.singletonMap("Broker", _brokerRecord.getId()); Map<String, Object> trustStoreAttributes1 = new HashMap<>(); trustStoreAttributes1.put("name", "tru...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeJmxRecordsFrom_3_0() throws Exception { _brokerRecord.getAttributes().put("modelVersion", "3.0"); Map<String, UUID> parents = Collections.singletonMap("Broker", _brokerRecord.getId()); Map<String, Object> jmxPortAttributes = new HashMap<>(); jmxPortAttributes.put("name", "jmx1"); jmxPortAtt...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testUpgradeHttpPortFrom_6_0() throws Exception { _brokerRecord.getAttributes().put("modelVersion", "6.0"); Map<String, UUID> parents = Collections.singletonMap("Broker", _brokerRecord.getId()); Map<String, Object> httpPortAttributes = new HashMap<>(); httpPortAttributes.put("name", "http"); httpPortAt...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testBrokerConnectionAttributesRemoval() throws Exception { _brokerRecord.getAttributes().put("modelVersion", "6.1"); _brokerRecord.getAttributes().put("connection.sessionCountLimit", "512"); _brokerRecord.getAttributes().put("connection.heartBeatDelay", "300"); _brokerRecord.getAttributes().put("conne...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testContextVariableUpgradeForTLSProtocolsSetOnBroker() { final Map<String, String> context = new HashMap<>(); context.put("qpid.security.tls.protocolWhiteList", ".*"); context.put("qpid.security.tls.protocolBlackList", "Ssl.*"); _brokerRecord.getAttributes().put("modelVersion", "8.0"); _brokerRecord.g...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testContextVariableUpgradeForTLSCipherSuitesSetOnBroker() { final Map<String, String> context = new HashMap<>(); context.put("qpid.security.tls.cipherSuiteWhiteList", ".*"); context.put("qpid.security.tls.cipherSuiteBlackList", "Ssl.*"); _brokerRecord.getAttributes().put("modelVersion", "8.0"); _broke...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testContextVariableUpgradeForTLSProtocolsSetOnPort() { _brokerRecord.getAttributes().put("modelVersion", "8.0"); final Map<String, String> context = new HashMap<>(); context.put("qpid.security.tls.protocolWhiteList", ".*"); context.put("qpid.security.tls.protocolBlackList", "Ssl.*"); final ConfiguredO...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testContextVariableUpgradeForTLSCipherSuitesSetOnAuthenticationProvider() { _brokerRecord.getAttributes().put("modelVersion", "8.0"); final Map<String, String> context = new HashMap<>(); context.put("qpid.security.tls.cipherSuiteWhiteList", ".*"); context.put("qpid.security.tls.cipherSuiteBlackList", ...
public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpleName(), Broker.MODEL_VERSION); }
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
BrokerStoreUpgraderAndRecoverer extends AbstractConfigurationStoreUpgraderAndRecoverer implements ContainerStoreUpgraderAndRecoverer<Broker> { public List<ConfiguredObjectRecord> upgrade(final DurableConfigurationStore dcs, final List<ConfiguredObjectRecord> records) { return upgrade(dcs, records, Broker.class.getSimpl...
@Test public void testAddStatusEventForIOErrorWithFailOnLoggerIOErrorDisabled() { Status event = createEvent(new IOError(new IOException("Mocked: No disk space left")), Status.ERROR); when(_fileLogger.getContextValue(Boolean.class, BrokerFileLogger.BROKER_FAIL_ON_LOGGER_IO_ERROR)).thenReturn(false); _statusListener.add...
@Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to store log entry. Log messages could be lost.", throwable);...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
@Test public void testRegister() { _recoverer.register(new TestStoreUpgraderPhase("0.0", "1.0")); _recoverer.register(new TestStoreUpgraderPhase("1.0", "1.1")); _recoverer.register(new TestStoreUpgraderPhase("1.1", "2.0")); }
void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. More than on upgrader from version %s", fromVersi...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
@Test public void testRegisterFailsOnUnknownFromVersion() { _recoverer.register(new TestStoreUpgraderPhase("0.0", "1.0")); try { _recoverer.register(new TestStoreUpgraderPhase("1.1", "2.0")); fail("should fail"); } catch (IllegalStateException e) { } }
void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. More than on upgrader from version %s", fromVersi...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
@Test public void testRegisterFailsOnNoVersionNumberChange() { _recoverer.register(new TestStoreUpgraderPhase("0.0", "1.0")); try { _recoverer.register(new TestStoreUpgraderPhase("1.0", "1.0")); fail("should fail"); } catch (IllegalStateException e) { } }
void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. More than on upgrader from version %s", fromVersi...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
@Test public void testRegisterFailsOnDuplicateFromVersion() { _recoverer.register(new TestStoreUpgraderPhase("0.0", "1.0")); try { _recoverer.register(new TestStoreUpgraderPhase("0.0", "2.0")); fail("should fail"); } catch (IllegalStateException e) { } }
void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. More than on upgrader from version %s", fromVersi...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
@Test public void testRegisterFailsOnUnexpectedFromVersionInFirstUpgrader() { try { _recoverer.register(new TestStoreUpgraderPhase("0.1", "1.0")); fail("should fail"); } catch (IllegalStateException e) { } }
void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. More than on upgrader from version %s", fromVersi...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
AbstractConfigurationStoreUpgraderAndRecoverer { void register(StoreUpgraderPhase upgrader) { final String fromVersion = upgrader.getFromVersion(); final String toVersion = upgrader.getToVersion(); if (_upgraders.containsKey(fromVersion)) { throw new IllegalStateException(String.format( "Error in store upgrader chain. ...
@Test public void testNoStorePath() throws Exception { when(_parent.getStorePath()).thenReturn(null); try { _store.init(_parent); fail("Store should not successfully configure if there is no path set"); } catch (ServerScopedRuntimeException e) { } }
@Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSettings) _parent; setup(parent.getName(), fileBasedSettings.getStorePath(), parent.getContextVa...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
@Test public void testInvalidStorePath() throws Exception { String unwritablePath = System.getProperty("file.separator"); assumeThat(new File(unwritablePath).canWrite(), is(equalTo(false))); when(_parent.getStorePath()).thenReturn(unwritablePath); try { _store.init(_parent); fail("Store should not successfully configur...
@Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSettings) _parent; setup(parent.getName(), fileBasedSettings.getStorePath(), parent.getContextVa...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
JsonFileConfigStore extends AbstractJsonFileStore implements DurableConfigurationStore { @Override public void init(ConfiguredObject<?> parent) { assertState(State.CLOSED); _parent = parent; _classNameMapping = generateClassNameMap(_parent.getModel(), _rootClass); FileBasedSettings fileBasedSettings = (FileBasedSetting...
@Test public void testRecoverEmptyPreferences() throws Exception { _recoverer.recoverPreferences(_testObject, Collections.<PreferenceRecord>emptyList(), _store); assertNotNull("Object should have UserPreferences", _testObject.getUserPreferences()); assertNotNull("Child object should have UserPreferences", _testChildObj...
public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenceRecord : preferenceRec...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
@Test public void testRecoverPreferences() throws Exception { final UUID p1Id = UUID.randomUUID(); Map<String, Object> pref1Attributes = PreferenceTestHelper.createPreferenceAttributes( _testObject.getId(), p1Id, "X-testType", "testPref1", null, TestPrincipalUtils.getTestPrincipalSerialization(TEST_USERNAME), null, Col...
public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenceRecord : preferenceRec...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
PreferencesRecoverer { public void recoverPreferences(ConfiguredObject<?> parent, Collection<PreferenceRecord> preferenceRecords, PreferenceStore preferencesStore) { Set<UUID> corruptedRecords = new HashSet<>(); Map<UUID, Collection<PreferenceRecord>> objectToRecordMap = new HashMap<>(); for (PreferenceRecord preferenc...
@Test public void testOpenAndLoad() throws Exception { UUID prefId = UUID.randomUUID(); Map<String, Object> attributes = Collections.<String, Object>singletonMap("test1", "test2"); createSingleEntryTestFile(prefId, attributes); Collection<PreferenceRecord> records = _store.openAndLoad(_updater); assertEquals("Unexpecte...
@Override public synchronized Collection<PreferenceRecord> openAndLoad(final PreferenceStoreUpdater updater) throws StoreException { if (_storeState != StoreState.CLOSED) { throw new IllegalStateException(String.format("PreferenceStore cannot be opened when in state '%s'", _storeState)); } try { setup(DEFAULT_FILE_NAME...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized Collection<PreferenceRecord> openAndLoad(final PreferenceStoreUpdater updater) throws StoreException { if (_storeState != StoreState.CLOSED) { throw new IllegalStateException(String.format("PreferenceStore c...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized Collection<PreferenceRecord> openAndLoad(final PreferenceStoreUpdater updater) throws StoreException { if (_storeState != StoreState.CLOSED) { throw new IllegalStateException(String.format("PreferenceStore c...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized Collection<PreferenceRecord> openAndLoad(final PreferenceStoreUpdater updater) throws StoreException { if (_storeState != StoreState.CLOSED) { throw new IllegalStateException(String.format("PreferenceStore c...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized Collection<PreferenceRecord> openAndLoad(final PreferenceStoreUpdater updater) throws StoreException { if (_storeState != StoreState.CLOSED) { throw new IllegalStateException(String.format("PreferenceStore c...
@Test public void testAddStatusEventForIOException() { Status event = createEvent(new IOException("Mocked: No disk space left"), Status.ERROR); _statusListener.addStatusEvent(event); verify(_systemConfig).closeAsync(); }
@Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to store log entry. Log messages could be lost.", throwable);...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
@Test public void testUpdateOrCreate() throws Exception { final UUID id = UUID.randomUUID(); final Map<String, Object> attributes = new HashMap<>(); attributes.put("test1", "test2"); final PreferenceRecord record = new PreferenceRecordImpl(id, attributes); _store.openAndLoad(_updater); _store.updateOrCreate(Collections...
@Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.isEmpty()) { return; } updateOrCreateInternal(preferenceRecords); }
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
@Test public void testReplace() throws Exception { UUID prefId = UUID.randomUUID(); Map<String, Object> attributes = Collections.<String, Object>singletonMap("test1", "test2"); createSingleEntryTestFile(prefId, attributes); final UUID newPrefId = UUID.randomUUID(); final Map<String, Object> newAttributes = new HashMap<...
@Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecordsToRemove.isEmpty() && preferenceRecor...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
@Test public void testUpdateFailIfNotOpened() throws Exception { try { _store.updateOrCreate(Collections.<PreferenceRecord>emptyList()); fail("Should not be able to update or create"); } catch (IllegalStateException e) { } }
@Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.isEmpty()) { return; } updateOrCreateInternal(preferenceRecords); }
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void updateOrCreate(final Collection<PreferenceRecord> preferenceRecords) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecords.i...
@Test public void testReplaceFailIfNotOpened() throws Exception { try { _store.replace(Collections.<UUID>emptyList(), Collections.<PreferenceRecord>emptyList()); fail("Should not be able to replace"); } catch (IllegalStateException e) { } }
@Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("PreferenceStore is not opened"); } if (preferenceRecordsToRemove.isEmpty() && preferenceRecor...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
JsonFilePreferenceStore extends AbstractJsonFileStore implements PreferenceStore { @Override public synchronized void replace(final Collection<UUID> preferenceRecordsToRemove, final Collection<PreferenceRecord> preferenceRecordsToAdd) { if (_storeState != StoreState.OPENED) { throw new IllegalStateException("Preference...
@Test public void renameContextVariables() { final Map<String, String> context = new HashMap<>(); context.put("foo", "fooValue"); context.put("bar", "barValue"); final Map<String, String> newContext = UpgraderHelper.renameContextVariables(context, Collections.singletonMap("foo", "newFoo")); assertThat(newContext, is(no...
public static Map<String, String> renameContextVariables(final Map<String, String> context, final Map<String, String> oldToNewNameMapping) { final Map<String, String> newContext = new HashMap<>(context); oldToNewNameMapping.forEach((oldName, newName) -> { if (newContext.containsKey(oldName)) { final String value = newC...
UpgraderHelper { public static Map<String, String> renameContextVariables(final Map<String, String> context, final Map<String, String> oldToNewNameMapping) { final Map<String, String> newContext = new HashMap<>(context); oldToNewNameMapping.forEach((oldName, newName) -> { if (newContext.containsKey(oldName)) { final St...
UpgraderHelper { public static Map<String, String> renameContextVariables(final Map<String, String> context, final Map<String, String> oldToNewNameMapping) { final Map<String, String> newContext = new HashMap<>(context); oldToNewNameMapping.forEach((oldName, newName) -> { if (newContext.containsKey(oldName)) { final St...
UpgraderHelper { public static Map<String, String> renameContextVariables(final Map<String, String> context, final Map<String, String> oldToNewNameMapping) { final Map<String, String> newContext = new HashMap<>(context); oldToNewNameMapping.forEach((oldName, newName) -> { if (newContext.containsKey(oldName)) { final St...
UpgraderHelper { public static Map<String, String> renameContextVariables(final Map<String, String> context, final Map<String, String> oldToNewNameMapping) { final Map<String, String> newContext = new HashMap<>(context); oldToNewNameMapping.forEach((oldName, newName) -> { if (newContext.containsKey(oldName)) { final St...
@Test public void testClose() throws Exception { _consumerTarget = new TestAbstractConsumerTarget(); assertEquals("Unexpected number of consumers", (long) 0, (long) _consumerTarget.getConsumers().size()); _consumerTarget.consumerAdded(_consumer); assertEquals("Unexpected number of consumers after add", (long) 1, (long)...
@Override final public boolean close() { if (_state.compareAndSet(State.OPEN, State.CLOSED)) { setNotifyWorkDesired(false); List<MessageInstanceConsumer> consumers = new ArrayList<>(_consumers); _consumers.clear(); for (MessageInstanceConsumer consumer : consumers) { consumer.close(); } getSession().removeTicker(_suspe...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override final public boolean close() { if (_state.compareAndSet(State.OPEN, State.CLOSED)) { setNotifyWorkDesired(false); List<MessageInstanceConsumer> consumers = new ArrayList<>(_consumers); _consumers.clear(); for (MessageInstanceConsumer consumer : consumers) ...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override final public boolean close() { if (_state.compareAndSet(State.OPEN, State.CLOSED)) { setNotifyWorkDesired(false); List<MessageInstanceConsumer> consumers = new ArrayList<>(_consumers); _consumers.clear(); for (MessageInstanceConsumer consumer : consumers) ...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override final public boolean close() { if (_state.compareAndSet(State.OPEN, State.CLOSED)) { setNotifyWorkDesired(false); List<MessageInstanceConsumer> consumers = new ArrayList<>(_consumers); _consumers.clear(); for (MessageInstanceConsumer consumer : consumers) ...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override final public boolean close() { if (_state.compareAndSet(State.OPEN, State.CLOSED)) { setNotifyWorkDesired(false); List<MessageInstanceConsumer> consumers = new ArrayList<>(_consumers); _consumers.clear(); for (MessageInstanceConsumer consumer : consumers) ...
@Test public void testNotifyWork() throws Exception { InOrder order = inOrder(_consumer); _consumerTarget = new TestAbstractConsumerTarget(); assertEquals("Unexpected number of consumers", (long) 0, (long) _consumerTarget.getConsumers().size()); _consumerTarget.consumerAdded(_consumer); _consumerTarget.setNotifyWorkDes...
@Override public void notifyWork() { @SuppressWarnings("unchecked") final T target = (T) this; getSession().notifyWork(target); }
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public void notifyWork() { @SuppressWarnings("unchecked") final T target = (T) this; getSession().notifyWork(target); } }
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public void notifyWork() { @SuppressWarnings("unchecked") final T target = (T) this; getSession().notifyWork(target); } protected AbstractConsumerTarget(final boolean isMultiQueue, final AMQPConnection<?> amqpConnectio...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public void notifyWork() { @SuppressWarnings("unchecked") final T target = (T) this; getSession().notifyWork(target); } protected AbstractConsumerTarget(final boolean isMultiQueue, final AMQPConnection<?> amqpConnectio...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public void notifyWork() { @SuppressWarnings("unchecked") final T target = (T) this; getSession().notifyWork(target); } protected AbstractConsumerTarget(final boolean isMultiQueue, final AMQPConnection<?> amqpConnectio...
@Test public void testConversionExceptionPolicyClose() throws Exception { configureBehaviour(true, MessageSource.MessageConversionExceptionHandlingPolicy.CLOSE); try { _consumerTarget.sendNextMessage(); fail("exception not thrown"); } catch (ConnectionScopedRuntimeException e) { final boolean condition = e.getCause() i...
@Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iteratedCompleteList) { break; } iteratedCompleteList = tr...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
@Test public void testConversionExceptionPolicyCloseForNonAcquiringConsumer() throws Exception { configureBehaviour(false, MessageSource.MessageConversionExceptionHandlingPolicy.CLOSE); try { _consumerTarget.sendNextMessage(); fail("exception not thrown"); } catch (ConnectionScopedRuntimeException e) { final boolean co...
@Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iteratedCompleteList) { break; } iteratedCompleteList = tr...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
@Test public void testConversionExceptionPolicyReroute() throws Exception { configureBehaviour(true, MessageSource.MessageConversionExceptionHandlingPolicy.ROUTE_TO_ALTERNATE); _consumerTarget.sendNextMessage(); assertTrue("message credit was not restored", _consumerTarget.isCreditRestored()); verify(_messageInstance)....
@Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iteratedCompleteList) { break; } iteratedCompleteList = tr...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
@Test public void testAddStatusEventForIOExceptionReportedAsWarning() { Status event = createEvent(new IOException("Mocked: No disk space left"), Status.WARN); _statusListener.addStatusEvent(event); verify(_systemConfig, never()).closeAsync(); }
@Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to store log entry. Log messages could be lost.", throwable);...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
@Test public void testConversionExceptionPolicyRerouteForNonAcquiringConsumer() throws Exception { configureBehaviour(false, MessageSource.MessageConversionExceptionHandlingPolicy.ROUTE_TO_ALTERNATE); _consumerTarget.sendNextMessage(); assertTrue("message credit was not restored", _consumerTarget.isCreditRestored()); v...
@Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iteratedCompleteList) { break; } iteratedCompleteList = tr...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
@Test public void testConversionExceptionPolicyReject() throws Exception { configureBehaviour(true, MessageSource.MessageConversionExceptionHandlingPolicy.REJECT); _consumerTarget.sendNextMessage(); assertTrue("message credit was not restored", _consumerTarget.isCreditRestored()); verify(_messageInstance).reject(_consu...
@Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iteratedCompleteList) { break; } iteratedCompleteList = tr...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
@Test public void testConversionExceptionPolicyRejectForNonAcquiringConsumer() throws Exception { configureBehaviour(false, MessageSource.MessageConversionExceptionHandlingPolicy.REJECT); _consumerTarget.sendNextMessage(); assertTrue("message credit was not restored", _consumerTarget.isCreditRestored()); verify(_messag...
@Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iteratedCompleteList) { break; } iteratedCompleteList = tr...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
@Test public void testConversionExceptionPolicyWhenOwningResourceIsNotMessageSource() throws Exception { final TransactionLogResource owningResource = mock(TransactionLogResource.class); when(_messageInstance.getOwningResource()).thenReturn(owningResource); try { _consumerTarget.sendNextMessage(); fail("exception not t...
@Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iteratedCompleteList) { break; } iteratedCompleteList = tr...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
AbstractConsumerTarget implements ConsumerTarget<T> { @Override public boolean sendNextMessage() { MessageContainer messageContainer = null; MessageInstanceConsumer consumer = null; boolean iteratedCompleteList = false; while (messageContainer == null) { if (_pullIterator == null || !_pullIterator.hasNext()) { if (iter...
@Test public void testActivateVHN_StoreHasVH() throws Exception { UUID virtualHostId = UUID.randomUUID(); ConfiguredObjectRecord vhostRecord = createVirtualHostConfiguredObjectRecord(virtualHostId); DurableConfigurationStore configStore = configStoreThatProduces(vhostRecord); Map<String, Object> nodeAttributes = new Ha...
@Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } else { throw new IllegalStateException(this + " has a virtual host which is not a queue managing vi...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
@Test public void testActivateVHN_StoreHasNoVH() throws Exception { DurableConfigurationStore configStore = configStoreThatProducesNoRecords(); Map<String, Object> nodeAttributes = new HashMap<>(); nodeAttributes.put(VirtualHostNode.NAME, TEST_VIRTUAL_HOST_NODE_NAME); nodeAttributes.put(VirtualHostNode.ID, _nodeId); Vi...
@Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } else { throw new IllegalStateException(this + " has a virtual host which is not a queue managing vi...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
@Test public void testActivateVHNWithVHBlueprint_StoreHasNoVH() throws Exception { DurableConfigurationStore configStore = new NullMessageStore() {}; String vhBlueprint = String.format("{ \"type\" : \"%s\", \"name\" : \"%s\"}", TestMemoryVirtualHost.VIRTUAL_HOST_TYPE, TEST_VIRTUAL_HOST_NAME); Map<String, String> contex...
@Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } else { throw new IllegalStateException(this + " has a virtual host which is not a queue managing vi...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
@Test public void testActivateVHNWithVHBlueprintUsed_StoreHasNoVH() throws Exception { DurableConfigurationStore configStore = configStoreThatProducesNoRecords(); String vhBlueprint = String.format("{ \"type\" : \"%s\", \"name\" : \"%s\"}", TestMemoryVirtualHost.VIRTUAL_HOST_TYPE, TEST_VIRTUAL_HOST_NAME); Map<String, S...
@Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } else { throw new IllegalStateException(this + " has a virtual host which is not a queue managing vi...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
@Test public void testActivateVHNWithVHBlueprint_StoreHasExistingVH() throws Exception { UUID virtualHostId = UUID.randomUUID(); ConfiguredObjectRecord record = createVirtualHostConfiguredObjectRecord(virtualHostId); DurableConfigurationStore configStore = configStoreThatProduces(record); String vhBlueprint = String.fo...
@Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } else { throw new IllegalStateException(this + " has a virtual host which is not a queue managing vi...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
AbstractStandardVirtualHostNode extends AbstractVirtualHostNode<X> implements VirtualHostNode<X> { @Override public QueueManagingVirtualHost<?> getVirtualHost() { VirtualHost<?> vhost = super.getVirtualHost(); if(vhost == null || vhost instanceof QueueManagingVirtualHost) { return (QueueManagingVirtualHost<?>)vhost; } ...
@Test public void testAccessControlContextIsNotInheritedByThread() throws Exception { final String principalName = getTestName(); final CountDownLatch latch = new CountDownLatch(1); final AtomicReference<AccessControlContext> threadAccessControlContextCapturer = new AtomicReference<>(); final AtomicReference<AccessCont...
@Override public Thread newThread(final Runnable runnable) { return Subject.doAsPrivileged(_subject, new PrivilegedAction<Thread>() { @Override public Thread run() { Thread thread = _defaultThreadFactory.newThread(runnable); if (_threadNamePrefix != null) { thread.setName(_threadNamePrefix + "-" + _threadId.getAndIncre...
SuppressingInheritedAccessControlContextThreadFactory implements ThreadFactory { @Override public Thread newThread(final Runnable runnable) { return Subject.doAsPrivileged(_subject, new PrivilegedAction<Thread>() { @Override public Thread run() { Thread thread = _defaultThreadFactory.newThread(runnable); if (_threadNam...
SuppressingInheritedAccessControlContextThreadFactory implements ThreadFactory { @Override public Thread newThread(final Runnable runnable) { return Subject.doAsPrivileged(_subject, new PrivilegedAction<Thread>() { @Override public Thread run() { Thread thread = _defaultThreadFactory.newThread(runnable); if (_threadNam...
SuppressingInheritedAccessControlContextThreadFactory implements ThreadFactory { @Override public Thread newThread(final Runnable runnable) { return Subject.doAsPrivileged(_subject, new PrivilegedAction<Thread>() { @Override public Thread run() { Thread thread = _defaultThreadFactory.newThread(runnable); if (_threadNam...
SuppressingInheritedAccessControlContextThreadFactory implements ThreadFactory { @Override public Thread newThread(final Runnable runnable) { return Subject.doAsPrivileged(_subject, new PrivilegedAction<Thread>() { @Override public Thread run() { Thread thread = _defaultThreadFactory.newThread(runnable); if (_threadNam...
@Test public void testAddStatusEventForNonIOException() { Status event = createEvent(new RuntimeException("Mocked: No disk space left"), Status.ERROR); _statusListener.addStatusEvent(event); verify(_systemConfig, never()).closeAsync(); }
@Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to store log entry. Log messages could be lost.", throwable);...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
BrokerLoggerStatusListener implements StatusListener { @Override public void addStatusEvent(Status status) { Throwable throwable = status.getThrowable(); if (status.getEffectiveLevel() == Status.ERROR && _errorClasses.stream().anyMatch(c -> c.isInstance(throwable))) { LOGGER.error("Unexpected error whilst trying to sto...
@Test public void testNoFormatting() throws Exception { assertEquals("10", _resolver.resolve(POSITIVE_VALUE_STAT_NAME, null)); assertEquals("0", _resolver.resolve(ZERO_VALUE_STAT_NAME, null)); assertEquals("-1", _resolver.resolve(NEGATIVE_VALUE_STAT_NAME, null)); }
@Override public String resolve(String statNameWithFormatSpecifier, final Resolver unused) { String[] split = statNameWithFormatSpecifier.split(":", 2); String statName = split[0]; Object statisticValue = _statistics.get(statName); if (split.length > 1) { String formatterName = split[1].toLowerCase(); if (statisticValu...
FormattingStatisticsResolver implements Resolver { @Override public String resolve(String statNameWithFormatSpecifier, final Resolver unused) { String[] split = statNameWithFormatSpecifier.split(":", 2); String statName = split[0]; Object statisticValue = _statistics.get(statName); if (split.length > 1) { String format...
FormattingStatisticsResolver implements Resolver { @Override public String resolve(String statNameWithFormatSpecifier, final Resolver unused) { String[] split = statNameWithFormatSpecifier.split(":", 2); String statName = split[0]; Object statisticValue = _statistics.get(statName); if (split.length > 1) { String format...
FormattingStatisticsResolver implements Resolver { @Override public String resolve(String statNameWithFormatSpecifier, final Resolver unused) { String[] split = statNameWithFormatSpecifier.split(":", 2); String statName = split[0]; Object statisticValue = _statistics.get(statName); if (split.length > 1) { String format...
FormattingStatisticsResolver implements Resolver { @Override public String resolve(String statNameWithFormatSpecifier, final Resolver unused) { String[] split = statNameWithFormatSpecifier.split(":", 2); String statName = split[0]; Object statisticValue = _statistics.get(statName); if (split.length > 1) { String format...